SVG vs PNG

Hi, list:

In my quest to create MPL plots for insertion into Word documents, I tried post-script (doesn't work well - Word doesn't like the ps file created by MPL), pdf (can't create more then 8 plots per job and can not import into word), png (works but each plot needs to be magified manually before saving), and now I am playing around with the svg format. Word doesn't recognize the svg format but I can open the file in gimp, select the portion of the chart I need, and do cut-and-paste over to Word. I can do the same with png format too but svg format works better if I have to do cut and paste and scale.

My question is this:

While the svg files are much smaller then the cooresponding png file (yes, and scalable), I am surprised that the quality of the plot doesn't seem to be that much better (seem like about the same as compared to a corresponding png figure). I would have thought that they should (see for example: http://luxor-xul.sourceforge.net/talk/jug-nov-2002/slides.html#svg-1). Is this because MPL is not taking advantage of the capabilities offered by svg?

I know that not every one works with Word but for good or for bad, that's what I have to work with in oder to submit my paper for publishing. Surely many of you have come across this kind of chanllenge. What have you been doing for inserting MPL created charts into Word?

Thanks,

···

--
John Henry

Use the figsize argument.

Cheers,
Alan Isaac

···

On Thu, 10 May 2007 15:51:09 -0700 (PDT) kc106_2005-matplotlib@...9... apparently wrote:

png (works but each plot needs to be magified manually
before saving)

kc106_2005-matplotlib@...9... wrote:

Hi, list:

In my quest to create MPL plots for insertion into Word documents, I
tried post-script (doesn't work well - Word doesn't like the ps file
created by MPL), pdf (can't create more then 8 plots per job and can
not import into word), png (works but each plot needs to be magified
manually before saving), and now I am playing around with the svg
format. Word doesn't recognize the svg format but I can open the
file in gimp, select the portion of the chart I need, and do
cut-and-paste over to Word. I can do the same with png format too
but svg format works better if I have to do cut and paste and scale.

When you open the svg in gimp, it is being rendered as pixels; from that point on, it is the same as if you had made a png at the same resolution, except that there are subtle differences in positioning and probably antialiasing between externally rendered svg and mpl/agg-produced png.

Did you try eps rather than ps?

Eric

···

My question is this:

While the svg files are much smaller then the cooresponding png file
(yes, and scalable), I am surprised that the quality of the plot
doesn't seem to be that much better (seem like about the same as
compared to a corresponding png figure). I would have thought that
they should (see for example:
Scalable Vector Graphics (SVG): Creating High-End 2D Graphics Using XML).
Is this because MPL is not taking advantage of the capabilities
offered by svg?

I know that not every one works with Word but for good or for bad,
that's what I have to work with in oder to submit my paper for
publishing. Surely many of you have come across this kind of
chanllenge. What have you been doing for inserting MPL created
charts into Word?

Thanks,

-- John Henry

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express Download DB2 Express C
- the FREE version of DB2 express and take control of your XML. No
limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ Matplotlib-users
mailing list Matplotlib-users@lists.sourceforge.net matplotlib-users List Signup and Options

Hi,

···

On 11 May 2007, Eric Firing wrote:

When you open the svg in gimp, it is being rendered as pixels; from that
point on, it is the same as if you had made a png at the same
resolution, except that there are subtle differences in positioning and
probably antialiasing between externally rendered svg and
mpl/agg-produced png.

Right. SVG in Matplotlib is NOT vector format and it has no sense to use it
instead of PNG or any others.

I'm just wondering, why it was implemented... if it implemented wrong.

--
Zack

The quality of the svg plot depends in large plot on the svg renderer
-- perhaps word doesn't do a good job rendering SVG? The matplotlib
PNG files look good because agg is a good rendering engine.

JDH

···

On 5/10/07, kc106_2005-matplotlib@...9... <kc106_2005-matplotlib@...9...> wrote:

While the svg files are much smaller then the cooresponding png file (yes, and
scalable), I am surprised that the quality of the plot doesn't seem to be that much
better (seem like about the same as compared to a corresponding png figure).
I would have thought that they should (see for example:
Scalable Vector Graphics (SVG): Creating High-End 2D Graphics Using XML).
Is this because MPL is not taking advantage of the capabilities offered by svg?