Re: [Matplotlib-users] SVG vs PNG

2007-05-15 Thread kc106_2005-matplotlib
This SVG format gets better everyday.

For those of you unfortunate enough not to have the
choice of freedom from the M$ Monopoly, I discovered
that Visio supports SVG file directly.  In fact, the
rendering is better then Inscape and get this: you can
copy and paste *directly* over to PowerPoint and Word
and you can even embed it as a Visio object.  The
quality is superb!

Even the browser can read SVG file (somewhat - the
quality isn't very good).

 -Original Message-
 From: Derek Hohls 
 Sent: Tuesday, May 15, 2007 12:19 AM
 Subject: Re: [Matplotlib-users] SVG vs PNG
 
 
 For those of you fortunate enough to have the 
 choice be free from the M$ Monopoly, you can 
 use the Open Office Impress package to do 
 something similar to the steps below.
  
 However, if you want to work directly with SVG 
 files, then you should install the SVG import 
 filter, available from:
http://www.ipd.uka.de/~hauma/svg-import/ 
 (Installation and use are described very clearly).
  
 If you have saved an SVG file from MPL, you 
 can now open it in Open Office Draw, ungroup 
 it (you will need to repeat this command a 
 number of times) and edit the elements.  
 Save the file as an Open Office drawing 
 (.odg) for use in other Open Office applications.
  
 One strange thing I encountered was that the 
 default background for fonts was blue?  
 This seems to be a problem with the 
 import filter, and has been reported on the 
 wiki support page: 

http://wiki.services.openoffice.org/wiki/SVG_User_Experiences#
 Blue_background_for_all_text_elements
 
 but not fixed.  To change this manually: 
 left-click to select a text element, then 
 right-click and choosing Edit Style... and 
 then select White or None from the Area menu.
  
 
 *** As a footnote, I see that an integrated 
 SVG filter, designed to be shipped as part of 
 Open Office, is scheduled to be developed as 
 part of the Google 2007 Summer of Code - see: 

http://wiki.services.openoffice.org/wiki/Summer_of_Code_2007/p
 roposals#Draw.2FImpress:_SVG_Import_Filter
 
 
  [EMAIL PROTECTED] 2007/05/15
01:08 AM 
 
 Not exactly OT.
 
 I would not recommend using .eps format in order to
 export MPL graphs for Inkscape.  I've been playing
 around with Inkscape for a few days now and I've
been
 using .svg exclusively and don't have any problem.  
 
 As I said before, I like the fact that once I am
 inside Inscape, I can do an ungroup of the graph,
and
 work with all of the plotting elements individually.

 In fact, I just discover a nice way to cut and
paste
 a particular subplot over to PowerPoint.  This gives
 me very high quality graphs in Power Point (I can
 scale all I want).  No more fuzzy, ugly-looking
Power
 Point charts.  
 
 Here's how:
 
 a) Create MPL plots in .svg format
 b) From Inscape, read in .svg
 c) Select subplot and ungroup
 d) Copy and paste to a new page 
 e) Shrink the page down to the size of the object
 f) Save as emf file
 g) Import into PowerPoint  
 
 In addition, I am also using Inscape to get around
the
 problem with the PDF backend in MPL.  I reported
 previously that I am unable to save more then 8 PDF
 files per execuation.  Now, I save the files in .svg
 format, then invoke Inscape in command line mode and
 export the file in pdf format.   Works great.
 
 Regards,
 
 
 
 
  -Original Message-
  From:
[EMAIL PROTECTED]
 
 

[mailto:[EMAIL PROTECTED]

 On 
  Behalf Of Fernando Perez
  Sent: Saturday, May 12, 2007 9:57 AM
  To: Steve Schmerler
  Cc: matplotlib-users@lists.sourceforge.net
  Subject: Re: [Matplotlib-users] SVG vs PNG
  
  
  On 5/12/07, Steve Schmerler 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..)?
  
  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

Re: [Matplotlib-users] SVG vs PNG

2007-05-14 Thread kc106_2005-matplotlib
Not exactly OT.

I would not recommend using .eps format in order to
export MPL graphs for Inkscape.  I've been playing
around with Inkscape for a few days now and I've been
using .svg exclusively and don't have any problem.  

As I said before, I like the fact that once I am
inside Inscape, I can do an ungroup of the graph, and
work with all of the plotting elements individually. 
In fact, I just discover a nice way to cut and paste
a particular subplot over to PowerPoint.  This gives
me very high quality graphs in Power Point (I can
scale all I want).  No more fuzzy, ugly-looking Power
Point charts.  

Here's how:

a) Create MPL plots in .svg format
b) From Inscape, read in .svg
c) Select subplot and ungroup
d) Copy and paste to a new page 
e) Shrink the page down to the size of the object
f) Save as emf file
g) Import into PowerPoint  

In addition, I am also using Inscape to get around the
problem with the PDF backend in MPL.  I reported
previously that I am unable to save more then 8 PDF
files per execuation.  Now, I save the files in .svg
format, then invoke Inscape in command line mode and
export the file in pdf format.   Works great.

Regards,




 -Original Message-
 From: [EMAIL PROTECTED]


[mailto:[EMAIL PROTECTED]
On 
 Behalf Of Fernando Perez
 Sent: Saturday, May 12, 2007 9:57 AM
 To: Steve Schmerler
 Cc: matplotlib-users@lists.sourceforge.net
 Subject: Re: [Matplotlib-users] SVG vs PNG
 
 
 On 5/12/07, Steve Schmerler 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..)?
 
 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


--
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
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] SVG vs PNG

2007-05-12 Thread Steve Schmerler
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!

-- 
cheers,
steve

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

Traceback (most recent call last):
  File string, line 1, in ?
  File /usr/local/lib/python2.4/site-packages/matplotlib/pylab.py, line 796, in savefig
return fig.savefig(*args, **kwargs)
  File /usr/local/lib/python2.4/site-packages/matplotlib/figure.py, line 732, in savefig
self.canvas.print_figure(*args, **kwargs)
  File /usr/local/lib/python2.4/site-packages/matplotlib/backends/backend_gtkagg.py, line 114, in print_figure
orientation, **kwargs)
  File /usr/local/lib/python2.4/site-packages/matplotlib/backends/backend_agg.py, line 483, in print_figure
orientation, **kwargs)
  File /usr/local/lib/python2.4/site-packages/matplotlib/backends/backend_svg.py, line 330, in print_figure
self.figure.draw(renderer)
  File /usr/local/lib/python2.4/site-packages/matplotlib/figure.py, line 574, in draw
for a in self.axes: a.draw(renderer)
  File /usr/local/lib/python2.4/site-packages/matplotlib/axes.py, line 1285, in draw
a.draw(renderer)
  File /usr/local/lib/python2.4/site-packages/matplotlib/axis.py, line 601, in draw
tick.draw(renderer)
  File /usr/local/lib/python2.4/site-packages/matplotlib/axis.py, line 176, in draw
if self.label1On: self.label1.draw(renderer)
  File /usr/local/lib/python2.4/site-packages/matplotlib/text.py, line 905, in draw
Text.draw(self, renderer)
  File /usr/local/lib/python2.4/site-packages/matplotlib/text.py, line 415, in draw
self._fontproperties, angle)
  File /usr/local/lib/python2.4/site-packages/matplotlib/backend_bases.py, line 383, in draw_tex
raise NotImplementedError
NotImplementedError
-
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
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] SVG vs PNG

2007-05-12 Thread Fernando Perez
On 5/12/07, Steve Schmerler [EMAIL PROTECTED] 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..)?

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

-
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
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] SVG vs PNG

2007-05-11 Thread Fernando Perez
On 5/11/07, [EMAIL PROTECTED]
[EMAIL PROTECTED] 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

-
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
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] SVG vs PNG

2007-05-11 Thread kc106_2005-matplotlib
Chris,

All I want is to:

a) Insert all of the plots I create with MPL onto a Word document.  

As I said before, my version of Word does not recognize the EPS or PS format 
created by MPL.  I am not blaiming MPL.  I am just not willing to send Redmond 
money to see if their later version does the job properly.   The version of 
Word I have does not import PDF files neither.   Besides, the PDF backend of 
MPL fails when the total number of figures is more then 8.

b) Be able to cut and paste part of a MPL figure and insert that to Word.  I 
can do it now via the Gimp path but as I explained previously, the quality is 
not the greatest.   I'll look up the cookbook you cited and try that.

Thanks,

 -Original Message-
 From: Christopher Barker [mailto:[EMAIL PROTECTED] 
 Sent: Friday, May 11, 2007 11:10 AM
 To: [EMAIL PROTECTED]
 Subject: Re: [Matplotlib-users] SVG vs PNG
 
 
 [EMAIL PROTECTED] wrote:
  Thanks everybody for the explanation of svg in Gimp.  That makes 
  sense.  Is there any vector based program that does what Gimp does?
 
 By definition, No. GIMP is a raster editor, it is similar to other 
 raster editors, and fundamentally different than vector 
 graphics programs.
 
 There is a little overlap, what do you want to do?
 
 It sound like what you really need is a way to put MPL plots 
 in a Word 
 doc. Ideally, you'd use a vector format like EPS, because 
 that's exactly 
 what EPS is for. However, MS has never been good at supporting open 
 formats like that.
 
 I'd try PDF. Recent versions of Word may do OK with that.
 
 Otherwise, you're back to a lowest common denominator. I've ended up 
 just using PNG. If you set the ppi right, it works just fine. 
 See this 
 Wiki page for how to do that:
 
http://www.scipy.org/Cookbook/Matplotlib/AdjustingImageSize

-Chris

-- 
Christopher Barker, Ph.D.
Oceanographer

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

[EMAIL PROTECTED]

 
--
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
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] SVG vs PNG

2007-05-11 Thread Alan G Isaac
On Fri, 11 May 2007, [EMAIL PROTECTED] apparently wrote: 
 All I want is to: a) Insert all of the plots I create with 
 MPL onto a Word document. 

This part should be achievable with PNG.
Just set the figsize.
I have not had problems...

 b) Be able to cut and paste part of a MPL figure and 
 insert that to Word

You can select part of a PDF for copying to the clipboard
in Acrobat.

fwiw,
Alan Isaac




-
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
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] SVG vs PNG

2007-05-11 Thread kc106_2005-matplotlib
 
 On Fri, 11 May 2007, [EMAIL PROTECTED] 
 apparently wrote: 
  All I want is to: a) Insert all of the plots I create with
  MPL onto a Word document. 
 
 This part should be achievable with PNG.
 Just set the figsize.
 I have not had problems...
 

Correct.  I am doing that right now.   However, because it's not vector based, 
if I start chaning the figure size, the quality suffers.

  b) Be able to cut and paste part of a MPL figure and
  insert that to Word
 
 You can select part of a PDF for copying to the clipboard
 in Acrobat.
 

Been there, done that.  Doesn't work.   It selects the titles, and anotations.  
Doesn't select the graphs.

 fwiw,
 Alan Isaac
 
 
 

 
--
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
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] SVG vs PNG

2007-05-11 Thread Andy.Henshaw
[EMAIL PROTECTED] wrote

 
 On Fri, 11 May 2007, [EMAIL PROTECTED] apparently
wrote:
  All I want is to: a) Insert all of the plots I create with MPL onto

  a Word document.
 
 This part should be achievable with PNG.
 Just set the figsize.
 I have not had problems...
 

Correct.  I am doing that right now.   However, because it's not 
vector based, if I start chaning the figure size, the quality suffers.

  b) Be able to cut and paste part of a MPL figure and insert that to

  Word
 
 You can select part of a PDF for copying to the clipboard in Acrobat.
 

Been there, done that.  Doesn't work.   It selects the titles, 
and anotations.  Doesn't select the graphs.



Perhaps you could use OpenOffice Draw as described in this url:

http://wolfey.sillydog.org/blog/2006/09/20/vector-image-file-conversion-
svg-wmf/

It's a shame that it takes such a workaround.
 

-
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
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] SVG vs PNG

2007-05-11 Thread kc106_2005-matplotlib
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:[EMAIL PROTECTED] 
 Sent: Friday, May 11, 2007 11:05 AM
 To: [EMAIL PROTECTED]
 Cc: matplotlib-users@lists.sourceforge.net
 Subject: Re: [Matplotlib-users] SVG vs PNG
 
 
 On 5/11/07, [EMAIL PROTECTED] 
 [EMAIL PROTECTED] 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



-
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
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] SVG vs PNG

2007-05-11 Thread Christopher Barker
 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/ORR(206) 526-6959   voice
7600 Sand Point Way NE   (206) 526-6329   fax
Seattle, WA  98115   (206) 526-6317   main reception

[EMAIL PROTECTED]

-
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
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] SVG vs PNG

2007-05-11 Thread kc106_2005-matplotlib
  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??

Most likely Word.   It's very picky.  I have .eps files created by other 
programs where Word would simply tell you that it's not a supported format.  
Doesn't say why.



--
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
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] SVG vs PNG

2007-05-11 Thread kc106_2005-matplotlib
Actually, Gimp is the problem.  It's obvious they don't have a very good 
rendering engine.   The plots looks very good under Inkscape.

  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
 

--
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
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] SVG vs PNG

2007-05-11 Thread Fernando Perez
On 5/11/07, [EMAIL PROTECTED]
[EMAIL PROTECTED] wrote:
 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

-
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
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] SVG vs PNG

2007-05-11 Thread Matt Newville
 All I want is to: a) Insert all of the plots I create with  MPL onto a Word 
 document.

If you're fortunate enough to be using the wx backend, there is a
Copy_to_Clipboard() method which works great: In a wx App, Ctrl-C can
easily be bound to copy the figure to the clipboard,  then paste it
into apps such as Word.I tend to find better results from saving a
higher-resolution PNG and inserting that into documents, but this
copy-and-paste works great for quick prints (whereas printing directly
from a wxApp seems to be very fragile and change with every wxPython
release)

I think pylab may not give you access to the Copy_to_Clipboard() method.

--Matt Newville

-
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
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] SVG vs PNG

2007-05-10 Thread Alan G Isaac
On Thu, 10 May 2007 15:51:09 -0700 (PDT) [EMAIL PROTECTED] apparently wrote:
 png (works but each plot needs to be magified manually 
 before saving)

Use the figsize argument.

Cheers,
Alan Isaac





-
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
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] SVG vs PNG

2007-05-10 Thread Eric Firing
[EMAIL PROTECTED] 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:
 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
 
 
 
 -
  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 
 https://lists.sourceforge.net/lists/listinfo/matplotlib-users


-
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
https://lists.sourceforge.net/lists/listinfo/matplotlib-users