SVG vs PNG

Bingo! My prayer appears to have been answered.

inkscape has no trouble reading the .svg files created by MPL, and Word has no trouble reading the .eps files created by inkscape. So, at least I can use it to preserve the vectors. Too bad inkscape doesn't read .eps directly (complaining...complaining....) :=)

inkscape treats everything as objects and allows you to ungroup the plots into elements and then you can play with each of the elements individually. When I am done, I can then insert into Word. Too bad it doesn't allow me to paste the objects directly over to Windows but I am not complaining.

Thanks, Fernando.

···

-----Original Message-----
From: Fernando Perez [mailto:fperez.net@…287…]
Sent: Friday, May 11, 2007 11:05 AM
To: kc106_2005-matplotlib@…9…
Cc: matplotlib-users@lists.sourceforge.net
Subject: Re: [Matplotlib-users] SVG vs PNG

On 5/11/07, kc106_2005-matplotlib@...9... > <kc106_2005-matplotlib@...9...> wrote:
> Thanks everybody for the explanation of svg in Gimp. That makes
> sense. Is there any vector based program that does what Gimp does?

Try inkscape. I've used it successfully for simple things,
though I've never tried to handle a MPL SVG file with it.

cheers,

f

--
John Henry

inkscape has no trouble reading the .svg files created by MPL, and
Word has no trouble reading the .eps files created by inkscape.

hmm. I wonder what it is about MPL's .eps files that Word doesn't like.

Bug in MPL or Word??

-Chris

···

--
Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/OR&R (206) 526-6959 voice
7600 Sand Point Way NE (206) 526-6329 fax
Seattle, WA 98115 (206) 526-6317 main reception

Chris.Barker@...259...

Bingo! My prayer appears to have been answered.

inkscape has no trouble reading the .svg files created by MPL, and Word has no trouble reading the .eps files created by inkscape. So, at least I can use it to preserve the vectors. Too bad inkscape doesn't read .eps directly (complaining...complaining....) :=)

Did you install pstoedit? If you do, you'll see that inkscape will
then be able to load .eps/.ps files in a fully editable format. I've
used it to fix decade-old plots for which the only thing around was
the eps file.

Thanks, Fernando.

Glad it helped.

Cheers,

f

···

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

Fernando Perez wrote:

Did you install pstoedit? If you do, you'll see that inkscape will
then be able to load .eps/.ps files in a fully editable format. I've
used it to fix decade-old plots for which the only thing around was
the eps file.

I tried to export an .svg from MPL (0.90.0rev3131) with
rcParams['text.usetex']=True and got a NotImplementedError (same for the pdf backend
with usetex, see attached log). I was wondering: Is it (technically) possible to have
.svg export capabilities with usetex-support and if so, has there been no need for
this feature so far (not that I need it urgently, just curious..)?

Anyway, to work with MPL-images (.ps/.eps) in Inkscape, I installed pstoedit but
loading these files doesn't work (seems not to recognize them as images).
Sorry if I'm driving the Inkscape-stuff a bit OT here, but:
What version of Inkscape & friends are you using? I'm using pstoedit 3.44, Inkscape
0.44.1. The Latex-formula-feature of Inkscape is also not working and the error seems
related to pstoedit. Maybe someone had similar experiences ...

Thanks for any hint!

error.log (1.58 KB)

···

--
cheers,
steve

I love deadlines. I like the whooshing sound they make as they fly by. -- Douglas Adams

Fernando Perez wrote:
>
> Did you install pstoedit? If you do, you'll see that inkscape will
> then be able to load .eps/.ps files in a fully editable format. I've
> used it to fix decade-old plots for which the only thing around was
> the eps file.
>

I tried to export an .svg from MPL (0.90.0rev3131) with
rcParams['text.usetex']=True and got a NotImplementedError (same for the pdf backend
with usetex, see attached log). I was wondering: Is it (technically) possible to have
.svg export capabilities with usetex-support and if so, has there been no need for
this feature so far (not that I need it urgently, just curious..)?

There's actually a real MPL bug in there (not just the
NotImplementedError) but I'll report it separately in a minute.

Anyway, to work with MPL-images (.ps/.eps) in Inkscape, I installed pstoedit but
loading these files doesn't work (seems not to recognize them as images).
Sorry if I'm driving the Inkscape-stuff a bit OT here, but:
What version of Inkscape & friends are you using? I'm using pstoedit 3.44, Inkscape
0.44.1. The Latex-formula-feature of Inkscape is also not working and the error seems
related to pstoedit. Maybe someone had similar experiences ...

Thanks for any hint!

Well, unfortunately it seems that inkscape is crashing python
itself... I made a trivial .eps in mpl with:

In [1]: plot(range(10))
Out[1]: [<matplotlib.lines.Line2D instance at 0x8f45a8c>]

In [2]: title(r'Some \LaTeX $\int_0^\infty f(\gamma) d\gamma = 1$')
Out[2]: <matplotlib.text.Text instance at 0x8f4590c>

In [3]: savefig('foo.eps')

and when I tried to load it into inkscape, I got this very nasty traceback:

*** glibc detected *** /usr/bin/python: free(): invalid pointer: 0x4081e4e0 ***
======= Backtrace: =========
/lib/tls/i686/cmov/libc.so.6[0x400ee7cd]
/lib/tls/i686/cmov/libc.so.6(cfree+0x90)[0x400f1e30]
/usr/lib/skencil/Sketch/../Lib/streamfilter.so[0x404e7ce5]
/usr/lib/skencil/Sketch/../Lib/streamfilter.so[0x404e7cd2]
/usr/bin/python[0x8110e6a]
/usr/bin/python(PyEval_EvalCodeEx+0x313)[0x80c9903]

etc.

At this point, this is really becoming OT for the mpl list, so I'll
stop. But if anyone has the time, it might be worth sending this
example to the inkscape list so they work on it and hopefully fix it.

Cheers,

f

···

On 5/12/07, Steve Schmerler <elcorto@...361...> wrote: