SourceForge logo
SourceForge logo
Menu

matplotlib-users — Discussion related to using matplotlib

You can subscribe to this list here.

2003 Jan
Feb
Mar
Apr
May
(3)
Jun
Jul
Aug
(12)
Sep
(12)
Oct
(56)
Nov
(65)
Dec
(37)
2004 Jan
(59)
Feb
(78)
Mar
(153)
Apr
(205)
May
(184)
Jun
(123)
Jul
(171)
Aug
(156)
Sep
(190)
Oct
(120)
Nov
(154)
Dec
(223)
2005 Jan
(184)
Feb
(267)
Mar
(214)
Apr
(286)
May
(320)
Jun
(299)
Jul
(348)
Aug
(283)
Sep
(355)
Oct
(293)
Nov
(232)
Dec
(203)
2006 Jan
(352)
Feb
(358)
Mar
(403)
Apr
(313)
May
(165)
Jun
(281)
Jul
(316)
Aug
(228)
Sep
(279)
Oct
(243)
Nov
(315)
Dec
(345)
2007 Jan
(260)
Feb
(323)
Mar
(340)
Apr
(319)
May
(290)
Jun
(296)
Jul
(221)
Aug
(292)
Sep
(242)
Oct
(248)
Nov
(242)
Dec
(332)
2008 Jan
(312)
Feb
(359)
Mar
(454)
Apr
(287)
May
(340)
Jun
(450)
Jul
(403)
Aug
(324)
Sep
(349)
Oct
(385)
Nov
(363)
Dec
(437)
2009 Jan
(500)
Feb
(301)
Mar
(409)
Apr
(486)
May
(545)
Jun
(391)
Jul
(518)
Aug
(497)
Sep
(492)
Oct
(429)
Nov
(357)
Dec
(310)
2010 Jan
(371)
Feb
(657)
Mar
(519)
Apr
(432)
May
(312)
Jun
(416)
Jul
(477)
Aug
(386)
Sep
(419)
Oct
(435)
Nov
(320)
Dec
(202)
2011 Jan
(321)
Feb
(413)
Mar
(299)
Apr
(215)
May
(284)
Jun
(203)
Jul
(207)
Aug
(314)
Sep
(321)
Oct
(259)
Nov
(347)
Dec
(209)
2012 Jan
(322)
Feb
(414)
Mar
(377)
Apr
(179)
May
(173)
Jun
(234)
Jul
(295)
Aug
(239)
Sep
(276)
Oct
(355)
Nov
(144)
Dec
(108)
2013 Jan
(170)
Feb
(89)
Mar
(204)
Apr
(133)
May
(142)
Jun
(89)
Jul
(160)
Aug
(180)
Sep
(69)
Oct
(136)
Nov
(83)
Dec
(32)
2014 Jan
(71)
Feb
(90)
Mar
(161)
Apr
(117)
May
(78)
Jun
(94)
Jul
(60)
Aug
(83)
Sep
(102)
Oct
(132)
Nov
(154)
Dec
(96)
2015 Jan
(45)
Feb
(138)
Mar
(176)
Apr
(132)
May
(119)
Jun
(124)
Jul
(77)
Aug
(31)
Sep
(34)
Oct
(22)
Nov
(23)
Dec
(9)
2016 Jan
(26)
Feb
(17)
Mar
(10)
Apr
(8)
May
(4)
Jun
(8)
Jul
(6)
Aug
(5)
Sep
(9)
Oct
(4)
Nov
Dec
2017 Jan
(5)
Feb
(7)
Mar
(1)
Apr
(5)
May
Jun
(3)
Jul
(6)
Aug
(1)
Sep
Oct
(2)
Nov
(1)
Dec
2018 Jan
Feb
Mar
Apr
(1)
May
Jun
Jul
Aug
Sep
Oct
Nov
Dec
2020 Jan
Feb
Mar
Apr
May
(1)
Jun
Jul
Aug
Sep
Oct
Nov
Dec
2025 Jan
(1)
Feb
Mar
Apr
May
Jun
Jul
Aug
Sep
Oct
Nov
Dec
S M T W T F S


1
(2)
2
(4)
3
(6)
4
(20)
5
(2)
6
(9)
7
(18)
8
(14)
9
(5)
10
(27)
11
(40)
12
(9)
13
(4)
14
(20)
15
(9)
16
(8)
17
(10)
18
(17)
19
(1)
20
(5)
21
(6)
22
(4)
23
(4)
24
(6)
25
(4)
26
(2)
27
28
(2)
29
(10)
30
(6)
31
(16)


Showing results of 39

1 2 > >> (Page 1 of 2)
From: Michele M. <mic...@gm...> - 2007年05月11日 22:32:19
Yes, because dvipng - version works fine.
On 5/11/07, Darren Dale <dd...@co...> wrote:
> Is dvipng on your path?
>
> On Friday 11 May 2007 05:16:04 pm Michele Mazzucco wrote:
> > Hi all,
> >
> > I'm running matplotlib on Mac OS X and I've set text.usetex to True in
> > matplotlibrc, but if I try to run the tex_demo I get the error shown
> > below. If I'm right it's a problem with dvipng:
> >
> > dvipng -version
> > This is dvipng 1.6 Copyright 2002-2005 Jan-Ake Larsson
> > dvipng 1.6
> > kpathsea version 3.5.5
> > Copyright (C) 2002-2005 Jan-Ake Larsson.
> > There is NO warranty. You may redistribute this software
> > under the terms of the GNU General Public License.
> > For more information about these matters, see the files
> > named COPYING and dvipng.c.
> >
> >
> > Any idea?
> >
> > Thanks,
> > Michele
> >
> > /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packag
> >es/matplotlib/__init__.py:959: UserWarning: Bad val "true" on line #123
> > "text.usetex : true # use latex for all text handling. For
> > more information, see"
> > in file
> > "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packa
> >ges/matplotlib/mpl-data/matplotlibrc" 'NoneType' object has no attribute
> > 'group'
> > val, cnt, line, fname, msg))
> > Traceback (most recent call last):
> > File "/Users/nmm42/devel/workspace/PythonPlots/src/examples/tex_demo.py",
> > line 31, in <module>
> > savefig('tex_demo')
> > File
> > "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packa
> >ges/matplotlib/pylab.py", line 796, in savefig
> > return fig.savefig(*args, **kwargs)
> > File
> > "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packa
> >ges/matplotlib/figure.py", line 727, in savefig
> > self.canvas.print_figure(*args, **kwargs)
> > File
> > "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packa
> >ges/matplotlib/backends/backend_tkagg.py", line 187, in print_figure
> > **kwargs)
> > File
> > "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packa
> >ges/matplotlib/backends/backend_agg.py", line 456, in print_figure
> > self.draw()
> > File
> > "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packa
> >ges/matplotlib/backends/backend_agg.py", line 392, in draw
> > self.figure.draw(renderer)
> > File
> > "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packa
> >ges/matplotlib/figure.py", line 569, in draw
> > for a in self.axes: a.draw(renderer)
> > File
> > "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packa
> >ges/matplotlib/axes.py", line 1155, in draw
> > a.draw(renderer)
> > File
> > "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packa
> >ges/matplotlib/axis.py", line 591, in draw
> > tick.draw(renderer)
> > File
> > "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packa
> >ges/matplotlib/axis.py", line 175, in draw
> > if self.label1On: self.label1.draw(renderer)
> > File
> > "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packa
> >ges/matplotlib/text.py", line 902, in draw
> > Text.draw(self, renderer)
> > File
> > "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packa
> >ges/matplotlib/text.py", line 400, in draw
> > bbox, info = self._get_layout(renderer)
> > File
> > "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packa
> >ges/matplotlib/text.py", line 246, in _get_layout
> > line, self._fontproperties, ismath=self.is_math_text())
> > File
> > "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packa
> >ges/matplotlib/backends/backend_agg.py", line 239, in get_text_width_height
> > texmanager = self.get_texmanager()
> > File
> > "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packa
> >ges/matplotlib/backend_bases.py", line 415, in get_texmanager
> > from matplotlib.texmanager import TexManager
> > File
> > "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packa
> >ges/matplotlib/texmanager.py", line 61, in <module>
> > class TexManager:
> > File
> > "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packa
> >ges/matplotlib/texmanager.py", line 83, in TexManager
> > dvipngVersion = get_dvipng_version()
> > File
> > "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packa
> >ges/matplotlib/texmanager.py", line 58, in get_dvipng_version
> > raise RuntimeError('Could not obtain dvipng version')
> > RuntimeError: Could not obtain dvipng version
> >
> > -------------------------------------------------------------------------
> > 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
> > Mat...@li...
> > https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
>
>
> --
> Darren S. Dale, Ph.D.
> Staff Scientist
> Cornell High Energy Synchrotron Source
> Cornell University
> 275 Wilson Lab
> Rt. 366 & Pine Tree Road
> Ithaca, NY 14853
>
> dd...@co...
> office: (607) 255-3819
> fax: (607) 255-9001
> http://www.chess.cornell.edu
>
From: Matt N. <new...@ca...> - 2007年05月11日 21:45:05
> 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
From: Darren D. <dd...@co...> - 2007年05月11日 21:28:59
On Friday 11 May 2007 12:12:37 pm Lev Givon wrote:
> Setting the font family with matplotlib.rc (or in my
> .matplotlib/matplotlibrc file) doesn't seem to have any effect on the
> font used to generate text when the usetex setting is enabled. This
> seems to imply that the fonts I have listed in the font.serif,
> font.sans-serif, and font.monospace settings (specifically, Times,
> Helvetica, and Courier) are not deemed to be valid from LaTeX's point
> of view. However, my LaTeX installation does appear to contain the
> psnfss files. Is there something I am overlooking?
>
> I am using matplotlib 0.90.0 and teTeX 3.0 on Linux.
changing the font family works for me. Maybe you should try deleting 
your .matplotlib/tex.cache and trying again.
From: Darren D. <dd...@co...> - 2007年05月11日 21:25:45
Is dvipng on your path?
On Friday 11 May 2007 05:16:04 pm Michele Mazzucco wrote:
> Hi all,
>
> I'm running matplotlib on Mac OS X and I've set text.usetex to True in
> matplotlibrc, but if I try to run the tex_demo I get the error shown
> below. If I'm right it's a problem with dvipng:
>
> dvipng -version
> This is dvipng 1.6 Copyright 2002-2005 Jan-Ake Larsson
> dvipng 1.6
> kpathsea version 3.5.5
> Copyright (C) 2002-2005 Jan-Ake Larsson.
> There is NO warranty. You may redistribute this software
> under the terms of the GNU General Public License.
> For more information about these matters, see the files
> named COPYING and dvipng.c.
>
>
> Any idea?
>
> Thanks,
> Michele
>
> /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packag
>es/matplotlib/__init__.py:959: UserWarning: Bad val "true" on line #123
> 	"text.usetex : true # use latex for all text handling. For
> more information, see"
> 	in file
> "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packa
>ges/matplotlib/mpl-data/matplotlibrc" 'NoneType' object has no attribute
> 'group'
> val, cnt, line, fname, msg))
> Traceback (most recent call last):
> File "/Users/nmm42/devel/workspace/PythonPlots/src/examples/tex_demo.py",
> line 31, in <module>
> savefig('tex_demo')
> File
> "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packa
>ges/matplotlib/pylab.py", line 796, in savefig
> return fig.savefig(*args, **kwargs)
> File
> "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packa
>ges/matplotlib/figure.py", line 727, in savefig
> self.canvas.print_figure(*args, **kwargs)
> File
> "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packa
>ges/matplotlib/backends/backend_tkagg.py", line 187, in print_figure
> **kwargs)
> File
> "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packa
>ges/matplotlib/backends/backend_agg.py", line 456, in print_figure
> self.draw()
> File
> "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packa
>ges/matplotlib/backends/backend_agg.py", line 392, in draw
> self.figure.draw(renderer)
> File
> "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packa
>ges/matplotlib/figure.py", line 569, in draw
> for a in self.axes: a.draw(renderer)
> File
> "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packa
>ges/matplotlib/axes.py", line 1155, in draw
> a.draw(renderer)
> File
> "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packa
>ges/matplotlib/axis.py", line 591, in draw
> tick.draw(renderer)
> File
> "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packa
>ges/matplotlib/axis.py", line 175, in draw
> if self.label1On: self.label1.draw(renderer)
> File
> "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packa
>ges/matplotlib/text.py", line 902, in draw
> Text.draw(self, renderer)
> File
> "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packa
>ges/matplotlib/text.py", line 400, in draw
> bbox, info = self._get_layout(renderer)
> File
> "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packa
>ges/matplotlib/text.py", line 246, in _get_layout
> line, self._fontproperties, ismath=self.is_math_text())
> File
> "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packa
>ges/matplotlib/backends/backend_agg.py", line 239, in get_text_width_height
> texmanager = self.get_texmanager()
> File
> "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packa
>ges/matplotlib/backend_bases.py", line 415, in get_texmanager
> from matplotlib.texmanager import TexManager
> File
> "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packa
>ges/matplotlib/texmanager.py", line 61, in <module>
> class TexManager:
> File
> "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packa
>ges/matplotlib/texmanager.py", line 83, in TexManager
> dvipngVersion = get_dvipng_version()
> File
> "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packa
>ges/matplotlib/texmanager.py", line 58, in get_dvipng_version
> raise RuntimeError('Could not obtain dvipng version')
> RuntimeError: Could not obtain dvipng version
>
> -------------------------------------------------------------------------
> 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
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
-- 
Darren S. Dale, Ph.D.
Staff Scientist
Cornell High Energy Synchrotron Source
Cornell University
275 Wilson Lab
Rt. 366 & Pine Tree Road
Ithaca, NY 14853
dd...@co...
office: (607) 255-3819
fax: (607) 255-9001
http://www.chess.cornell.edu
From: Michele M. <mic...@gm...> - 2007年05月11日 21:16:23
Hi all,
I'm running matplotlib on Mac OS X and I've set text.usetex to True in
matplotlibrc, but if I try to run the tex_demo I get the error shown
below. If I'm right it's a problem with dvipng:
dvipng -version
This is dvipng 1.6 Copyright 2002-2005 Jan-Ake Larsson
dvipng 1.6
kpathsea version 3.5.5
Copyright (C) 2002-2005 Jan-Ake Larsson.
There is NO warranty. You may redistribute this software
under the terms of the GNU General Public License.
For more information about these matters, see the files
named COPYING and dvipng.c.
Any idea?
Thanks,
Michele
/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/matplotlib/__init__.py:959:
UserWarning: Bad val "true" on line #123
	"text.usetex : true # use latex for all text handling. For
more information, see"
	in file "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/matplotlib/mpl-data/matplotlibrc"
	'NoneType' object has no attribute 'group'
 val, cnt, line, fname, msg))
Traceback (most recent call last):
 File "/Users/nmm42/devel/workspace/PythonPlots/src/examples/tex_demo.py",
line 31, in <module>
 savefig('tex_demo')
 File "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/matplotlib/pylab.py",
line 796, in savefig
 return fig.savefig(*args, **kwargs)
 File "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/matplotlib/figure.py",
line 727, in savefig
 self.canvas.print_figure(*args, **kwargs)
 File "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/matplotlib/backends/backend_tkagg.py",
line 187, in print_figure
 **kwargs)
 File "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/matplotlib/backends/backend_agg.py",
line 456, in print_figure
 self.draw()
 File "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/matplotlib/backends/backend_agg.py",
line 392, in draw
 self.figure.draw(renderer)
 File "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/matplotlib/figure.py",
line 569, in draw
 for a in self.axes: a.draw(renderer)
 File "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/matplotlib/axes.py",
line 1155, in draw
 a.draw(renderer)
 File "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/matplotlib/axis.py",
line 591, in draw
 tick.draw(renderer)
 File "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/matplotlib/axis.py",
line 175, in draw
 if self.label1On: self.label1.draw(renderer)
 File "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/matplotlib/text.py",
line 902, in draw
 Text.draw(self, renderer)
 File "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/matplotlib/text.py",
line 400, in draw
 bbox, info = self._get_layout(renderer)
 File "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/matplotlib/text.py",
line 246, in _get_layout
 line, self._fontproperties, ismath=self.is_math_text())
 File "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/matplotlib/backends/backend_agg.py",
line 239, in get_text_width_height
 texmanager = self.get_texmanager()
 File "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/matplotlib/backend_bases.py",
line 415, in get_texmanager
 from matplotlib.texmanager import TexManager
 File "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/matplotlib/texmanager.py",
line 61, in <module>
 class TexManager:
 File "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/matplotlib/texmanager.py",
line 83, in TexManager
 dvipngVersion = get_dvipng_version()
 File "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/matplotlib/texmanager.py",
line 58, in get_dvipng_version
 raise RuntimeError('Could not obtain dvipng version')
RuntimeError: Could not obtain dvipng version
From: Fernando P. <fpe...@gm...> - 2007年05月11日 21:02:39
On 5/11/07, kc1...@ya...
<kc1...@ya...> 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
From: <kc1...@ya...> - 2007年05月11日 20:50:18
Sorry. Just discover that saving the file in emf format under Inkscape and then import into Word works even better. The eps engine in Word is really bad.
Hope that this info is helpful to others who are stuck in an Office world like me.
> -----Original Message-----
> From: mat...@li... 
> [mailto:mat...@li...] On 
> Behalf Of kc1...@ya...
> Sent: Friday, May 11, 2007 1:39 PM
> To: mat...@li...
> Subject: [Matplotlib-users] This is just so perfect! (was: 
> Re: SVG vs PNG)
> 
> 
> This is simply too good to be true. I played with 
> manupulating MPL plots using Inkscape and man, somebody ought 
> to include this in the MPL FAQ. I can move everything 
> around by elements, touch-up or remove things I don't want, 
> scale it, rotate it, you name it.
> 
> And then I can save the file in .eps and include into Office 
> - and I don't loose any quality.
> 
> Perfect!
> 
> Here's what I learned:
> 
> a) Create the plot under MPL, saving the file in .svg format, 
> and use the figsize argument to figure to create a plot of 
> the proper size
> 
> b) Use Inkscape to open the .svg file and manupulate it. 
> Save in .eps format.
> 
> c) Import the .eps file into Office.
> 
> d) Be happy and become famous and rich. (not)
> 
> Thanks again for all of the suggestions and tips.
> 
> Regards,
> 
 
--
John Henry
From: <kc1...@ya...> - 2007年05月11日 20:38:43
This is simply too good to be true. I played with manupulating MPL plots using Inkscape and man, somebody ought to include this in the MPL FAQ. I can move everything around by elements, touch-up or remove things I don't want, scale it, rotate it, you name it.
And then I can save the file in .eps and include into Office - and I don't loose any quality.
Perfect!
Here's what I learned:
a) Create the plot under MPL, saving the file in .svg format, and use the figsize argument to figure to create a plot of the proper size
b) Use Inkscape to open the .svg file and manupulate it. Save in .eps format.
c) Import the .eps file into Office.
d) Be happy and become famous and rich. (not)
Thanks again for all of the suggestions and tips.
Regards,
> -----Original Message-----
> From: mat...@li... 
> [mailto:mat...@li...] On 
> Behalf Of kc1...@ya...
> Sent: Friday, May 11, 2007 12:23 PM
> To: mat...@li...
> Subject: Re: [Matplotlib-users] 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:fpe...@gm...]
> > Sent: Friday, May 11, 2007 11:05 AM
> > To: kc1...@ya...
> > Cc: mat...@li...
> > Subject: Re: [Matplotlib-users] SVG vs PNG
> > 
> > 
> > On 5/11/07, kc1...@ya...
> > <kc1...@ya...> 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
> 
 
--
John Henry
From: <kc1...@ya...> - 2007年05月11日 19:45:44
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
From: Michele M. <mic...@gm...> - 2007年05月11日 19:42:06
I've sorted it out. Thanks John.
Michele
On 5/11/07, Michele Mazzucco <mic...@gm...> wrote:
> John,
>
> thanks for your reply. Unfortunately it does not work for Axes (at
> least for me).
> I've got 3 axes (like the finance sample) and the ylabel appears only
> for the last one and only if I use ylabel(...) (yes, I'm using
> ax1.set_ylabel, ax2.set_yabel and ax3.set_ylabel)
> Any idea?
>
> Michele
>
> On 5/11/07, John Hunter <jd...@gm...> wrote:
> > On 5/11/07, Michele Mazzucco <mic...@gm...> wrote:
> > > Hi all,
> > >
> > > when using subplot is very easy to plot an ylabel for each subplot
> > > (see http://matplotlib.sourceforge.net/screenshots/subplot_demo_large.png
> > > for example), however I have not found any sample to accomplish the
> > > same goal when using sub-figures obtained as
> > >
> > > ax1 = axes(...)
> > > like http://matplotlib.sourceforge.net/screenshots/finance_work2_small.png,
> > > for example.
> > >
> > > With gnuplot is very easy. Is there any way to achieve the same result
> > > with matplotlib?
> >
> > Not sure I understand your question, but
> >
> > ax.set_ylabel('my label')
> >
> > will work for Axes or Subplots (a Subplot is an Axes instance...)
> >
> > JDH
> >
>
From: <kc1...@ya...> - 2007年05月11日 19:41:58
> > 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
From: Christopher B. <Chr...@no...> - 2007年05月11日 19:32:57
> 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
Chr...@no...
From: <kc1...@ya...> - 2007年05月11日 19:28:56
Yes, that's what I've been forced to do. The problem with that is that it forces you to fix the size of the figures in your paper. When I reformat things around in subsequent revisions, I have to go back and recreate the figures - if the spacing changes. I would much rather retaining the ability to rescale in Word. Yes, I know that it does change the font size.
But as I indicated in my other message, I think Inkscape is the solution. I am still playing around with it and see if that really does it but it looks real promising.
Regards,
-----Original Message-----
From: David Huard 
[mailto:dav...@gm...] 
Sent: Friday, May 11, 2007 12:06 
PM
To: kc1...@ya...
Subject: Re: 
[Matplotlib-users] SVG vs PNG
My advice would be to define 
the size you'll want the figure to be on paper once printed, and set the 
resolution to 300 dpi (for paper) or 100 (for 
screen):
e.g.
fig.savefig(figsize=(8,8), dpi=300)
Rescaling the 
figure is generally a bad idea for inclusion in a paper since it changes the 
font size as well. To get a nice output, you try to keep the same font size for 
both paper and figures, and the simplest was to do this is by avoiding 
rescaling. 
Cheers, 
David
2007年5月11日, kc1...@ya... 
< 
kc1...@ya...>:
>
> 
On 2007年5月11日, kc1...@ya...
> 
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
Mat...@li...
https://lists.sourceforge.net/lists/listinfo/matplotlib-users
 
--
John Henry
From: <kc1...@ya...> - 2007年05月11日 19:23:33
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:fpe...@gm...] 
> Sent: Friday, May 11, 2007 11:05 AM
> To: kc1...@ya...
> Cc: mat...@li...
> Subject: Re: [Matplotlib-users] SVG vs PNG
> 
> 
> On 5/11/07, kc1...@ya... 
> <kc1...@ya...> 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
From: Michele M. <mic...@gm...> - 2007年05月11日 19:12:54
John,
thanks for your reply. Unfortunately it does not work for Axes (at
least for me).
I've got 3 axes (like the finance sample) and the ylabel appears only
for the last one and only if I use ylabel(...) (yes, I'm using
ax1.set_ylabel, ax2.set_yabel and ax3.set_ylabel)
Any idea?
Michele
On 5/11/07, John Hunter <jd...@gm...> wrote:
> On 5/11/07, Michele Mazzucco <mic...@gm...> wrote:
> > Hi all,
> >
> > when using subplot is very easy to plot an ylabel for each subplot
> > (see http://matplotlib.sourceforge.net/screenshots/subplot_demo_large.png
> > for example), however I have not found any sample to accomplish the
> > same goal when using sub-figures obtained as
> >
> > ax1 = axes(...)
> > like http://matplotlib.sourceforge.net/screenshots/finance_work2_small.png,
> > for example.
> >
> > With gnuplot is very easy. Is there any way to achieve the same result
> > with matplotlib?
>
> Not sure I understand your question, but
>
> ax.set_ylabel('my label')
>
> will work for Axes or Subplots (a Subplot is an Axes instance...)
>
> JDH
>
From: John H. <jd...@gm...> - 2007年05月11日 19:09:33
On 5/10/07, kc1...@ya...
<kc1...@ya...> 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:
> 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?
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
From: <And...@gt...> - 2007年05月11日 19:04:00
kc1...@ya... wrote
>>=20
>> On 2007年5月11日, kc1...@ya... apparently
wrote:
>> > All I want is to: a) Insert all of the plots I create with MPL onto
>> > a Word document.
>>=20
>> This part should be achievable with PNG.
>> Just set the figsize.
>> I have not had problems...
>>=20
>
>Correct. I am doing that right now. However, because it's not=20
>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
>>=20
>> You can select part of a PDF for copying to the clipboard in Acrobat.
>>=20
>
>Been there, done that. Doesn't work. It selects the titles,=20
>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.
=20
From: <kc1...@ya...> - 2007年05月11日 18:39:43
> 
> On 2007年5月11日, kc1...@ya... 
> 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
From: Alan G I. <ai...@am...> - 2007年05月11日 18:30:32
On 2007年5月11日, kc1...@ya... 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
From: <kc1...@ya...> - 2007年05月11日 18:22:24
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:Chr...@no...] 
> Sent: Friday, May 11, 2007 11:10 AM
> To: kc1...@ya...
> Subject: Re: [Matplotlib-users] SVG vs PNG
> 
> 
> kc1...@ya... 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/OR&R (206) 526-6959 voice
7600 Sand Point Way NE (206) 526-6329 fax
Seattle, WA 98115 (206) 526-6317 main reception
Chr...@no...
 
--
John Henry
From: Fernando P. <fpe...@gm...> - 2007年05月11日 18:05:05
On 5/11/07, kc1...@ya...
<kc1...@ya...> 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
From: Christopher F. <fon...@gm...> - 2007年05月11日 17:57:13
On 5/4/07, Christopher Barker <Chr...@no...> wrote:
>
> Samuel M. Smith wrote:
> > I did not have this problem with the matplotlib on
> >
> http://pythonmac.org/packages/py25-fat/dmg/matplotlib-0.90.0-py2.5-macosx10.4-2007年02月20日.dmg
>
>
> That one was probably built with a statically linked freetype, as the
> one Apple provides doesn't work with MPL.
Strange. I have libfreetype.a in a staticlibs directory that I link to when
building these things. I will try again.
cf
From: <kc1...@ya...> - 2007年05月11日 17:54:43
Thanks everybody for the explanation of svg in Gimp. That makes sense. Is there any vector based program that does what Gimp does? 
> Did you try eps rather than ps?
> 
> Eric
Yes, I tried eps. Word won't recognize that neither.
As to the EMF format, I downloaded the package and attempted to apply the patch. Failed - probably because it's intended for 0.85 only. I am running 0.90 of MPL. Has anybody added EMF support to MPL 0.90 successfully?
Regards,
 
--
John Henry
From: Antonino I. <tri...@gm...> - 2007年05月11日 17:05:13
2007年5月11日, John Hunter <jd...@gm...>:
> On 5/3/07, Emmanuel <emm...@fa...> wrote:
> > With gnuplot one can do a plot like that :
> >
> > http://www.deqnotes.net/gnuplot/images/impulses.png
> >
> > It is using option "with impulse".
> > Is there an equivalent in matplotlib?
>
>
> In [5]: t = arange(0.0, 2.0, 0.05)
>
> In [6]: s = sin(2*pi*t)
>
> In [7]: vlines(t, 0, s)
> Out[7]: <matplotlib.collections
You are right! Very nice :-).
 ~ Antonio
From: John H. <jd...@gm...> - 2007年05月11日 16:49:03
On 5/3/07, Emmanuel <emm...@fa...> wrote:
> With gnuplot one can do a plot like that :
>
> http://www.deqnotes.net/gnuplot/images/impulses.png
>
> It is using option "with impulse".
> Is there an equivalent in matplotlib?
In [5]: t = arange(0.0, 2.0, 0.05)
In [6]: s = sin(2*pi*t)
In [7]: vlines(t, 0, s)
Out[7]: <matplotlib.collections
1 message has been excluded from this view by a project administrator.

Showing results of 39

1 2 > >> (Page 1 of 2)
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.
Thanks for helping keep SourceForge clean.
X





Briefly describe the problem (required):
Upload screenshot of ad (required):
Select a file, or drag & drop file here.
Screenshot instructions:

Click URL instructions:
Right-click on the ad, choose "Copy Link", then paste here →
(This may not be possible with some types of ads)

More information about our ad policies

Ad destination/click URL:

AltStyle によって変換されたページ (->オリジナル) /