dpi

Damon McDougall <damon.mcdougall-Re5JQEeQqe8AvxtiuMwx3w@...1455...> writes:

When saving the figure in some vector graphics format, I
don't see what the meaning of the dpi is at all.

Sure, I use `dpi=` all the time for vector formats. Purely because
when you make calls to `imshow`, you get a rasterised image embedded
in a figure with vector text and tickmarks and labels, for example.

matplotlib actually rescales the raw imshow data when saving to a vector
format? Why is that? I think it should embed the bitmap with full
resolution in the vector file and rely on the consumer of the vector
file to scale it to whatever resolution is supported by the display
device.

Best,

   -Nikolaus

···

On Thu, Oct 11, 2012 at 4:00 PM, Nikolaus Rath <Nikolaus-BTH8mxji4b0@...1836...455...> wrote:

--
»Time flies like an arrow, fruit flies like a Banana.«

  PGP fingerprint: 5B93 61F8 4EA2 E279 ABF6 02CF A9AD B7F8 AE4E 425C

imshow supports interpolation and that's why rasterization comes in.
If you turn off interpolation (w/ interpolation="none"), the original
image will be embedded. Of course dpi has no meaning in this case.

However, I agree with you that dpi should be a property of the backend
only, not the figure. But I am not sure if this can be fixed soon. It
will be difficult and will take lots of effort I think.

-JJ

···

On Fri, Oct 12, 2012 at 3:39 AM, Nikolaus Rath <Nikolaus@...3072...> wrote:

matplotlib actually rescales the raw imshow data when saving to a vector
format? Why is that? I think it should embed the bitmap with full
resolution in the vector file and rely on the consumer of the vector
file to scale it to whatever resolution is supported by the display
device.