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
(9) |
2
(6) |
3
(8) |
4
(6) |
5
|
6
(1) |
7
(4) |
8
(15) |
9
(11) |
10
|
11
(1) |
12
(13) |
13
(5) |
14
(10) |
15
(12) |
16
(7) |
17
(12) |
18
(5) |
19
(4) |
20
(11) |
21
(4) |
22
(11) |
23
(28) |
24
(24) |
25
(23) |
26
(6) |
27
(7) |
28
(17) |
29
(21) |
30
(6) |
|
|
|
I'm using SVN matplotlib and wxPython 2.8.7.1, and I'm not running into the problem. Though I may be interpreting your problem incorrectly. I've attached a screen capture of the window that opens up when I run your program. Josh On Wed, Apr 23, 2008 at 5:33 PM, Brian Blais <bb...@br...> wrote: > > > On Apr 23, 2008, at Apr 23:6:56 PM, Brian Blais wrote: > > On Apr 23, 2008, at Apr 23:4:33 PM, Brian Blais wrote: > > I just upgraded a number of things on my Mac OS X (Tiger) machine, including > to the latest version of wx and matplotlib. I found that there is a bug in > the display of dynamic plots with subplots. If I change the subplot line in > the examples/dynamic_demo_wx.py to: > > > a = self.fig.add_subplot(221) > > instead of > > > a = self.fig.add_subplot(111) > > the plot never shows. > > > In the quest to discover the problem, I found that the problem exists in svn > (version .98pre) but not in .91.2. Both with version wx-2.8.7.1. > > > > > bb > > > > -- > Brian Blais > bb...@br... > http://web.bryant.edu/~bblais > > > > > ------------------------------------------------------------------------- > This SF.net email is sponsored by the 2008 JavaOne(SM) Conference > Don't miss this year's exciting event. There's still time to save 100ドル. > Use priority code J8TL2D2. > > http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > >
I've had an ongoing problem building eggs of matplotlib that are statically linked to freetype. I thought I had it nailed, but evidently I do not. Here is my script: export CFLAGS="-arch i386 -I/Developer/src/libpng -I/Developer/src/freetype/include" export LDFLAGS="-arch i386 -L/Developer/src/libpng -L/Developer/src/freetype" rm -rf build python setupegg.py bdist_egg The build of freetype in /Developer/src/freetype does not even have dynamic libs built. The basedir dict in setupext.py contains the following entry for OSX: 'darwin' : [] However, when the resulting egg is installed by users, they still get the following error: ImportError: dlopen(/Library/Python/2.5/site-packages/matplotlib- 0.98pre-py2.5-macosx-10.5-i386.egg/matplotlib/ft2font.so, 2): Library not loaded: /usr/local/lib/libfreetype.6.dylib Referenced from: /Library/Python/2.5/site-packages/matplotlib-0.98pre-py2.5-macosx-10.5- i386.egg/matplotlib/ft2font.so Reason: image not found I thought I had my bases covered -- if anyone has some insight here, please let me know. maptlotlib is the only missing piece of the "superpack" of modules that I distribute for OSX.
On Apr 23, 2008, at Apr 23:6:56 PM, Brian Blais wrote: > On Apr 23, 2008, at Apr 23:4:33 PM, Brian Blais wrote: > >> I just upgraded a number of things on my Mac OS X (Tiger) machine, >> including to the latest version of wx and matplotlib. I found >> that there is a bug in the display of dynamic plots with >> subplots. If I change the subplot line in the examples/ >> dynamic_demo_wx.py to: >> >> a = self.fig.add_subplot(221) >> >> instead of >> >> a = self.fig.add_subplot(111) >> >> the plot never shows. In the quest to discover the problem, I found that the problem exists in svn (version .98pre) but not in .91.2. Both with version wx-2.8.7.1. bb -- Brian Blais bb...@br... http://web.bryant.edu/~bblais
On Apr 23, 2008, at Apr 23:4:33 PM, Brian Blais wrote: > I just upgraded a number of things on my Mac OS X (Tiger) machine, > including to the latest version of wx and matplotlib. I found that > there is a bug in the display of dynamic plots with subplots. If I > change the subplot line in the examples/dynamic_demo_wx.py to: > > a = self.fig.add_subplot(221) > > instead of > > a = self.fig.add_subplot(111) > > the plot never shows. It works for 111, and for 121, but not 221. > Not sure why! It works in interactive mode, in ipython, but not in > dynamic plot. > > I am posting here the minimal program that reproduces the problem, based on a modified embedded_in_wx.py. The axis shows up, and has the right limits, but no plot forms in the axis. Weird! bb -- Brian Blais bb...@br... http://web.bryant.edu/~bblais #!/usr/bin/env python from matplotlib.backends.backend_wx import FigureCanvasWx,FigureManager from matplotlib.figure import Figure import numpy from wx import * class PlotFigure(Frame): def __init__(self): Frame.__init__(self, None, -1, "Test embedded wxFigure") self.fig = Figure((9,8), 75) self.canvas = FigureCanvasWx(self, -1, self.fig) # Create a figure manager to manage things self.figmgr = FigureManager(self.canvas, 1, self) # Now put all into a sizer sizer = BoxSizer(VERTICAL) # This way of adding to sizer allows resizing sizer.Add(self.canvas, 1, LEFT|TOP|GROW) self.SetSizer(sizer) self.Fit() def plot_data(self): # a = self.fig.add_subplot(111) # this works a = self.fig.add_subplot(221) # this doesn't work t = numpy.arange(0.0,3.0,0.01) s = numpy.sin(2*numpy.pi*t) a.plot(t,s) if __name__ == '__main__': app = PySimpleApp(0) frame = PlotFigure() frame.plot_data() frame.Show() app.MainLoop()
On Wednesday 23 April 2008 11:35:36 am Yong-Duk Jin wrote: > I'm using matplotlib 0.9.12 from ubuntu hardy 8.04. > > To take advantage of the LaTeX handling capability in matplotlib, > I've added next two lines in /etc/matplotlib > > text.usetex : True > text.latex.preamble : \usepackage{amsmath} If I may quote from the matplotlibrc file: #text.latex.preamble : # IMPROPER USE OF THIS FEATURE WILL LEAD TO LATEX FAILURES # AND IS THEREFORE UNSUPPORTED. PLEASE DO NOT ASK FOR HELP # IF THIS FEATURE DOES NOT DO WHAT YOU EXPECT IT TO. > Then, I tried next test code. > > from pylab import * > x = []; y = [] > figure(figsize=(2,2)) > plot(x,y,label=r'$\theta=0ドル.0deg'); axis([0,1,0,1]); legend() > text(0.5, 0.5, r'\begin{align*}x&=\alpha\\y&=\beta\end{align*}') > savefig('test.eps') > > However, I've got the following error message without a resulting eps file. It looks like the text line is a problem. Latex doesnt like use of align or eqnarray environments inside figures. It looks like a latex limitation, not matplotlib. On the other hand, if you can figure out how to make it work in latex, and can prove that it is a limitation in matplotlib, please let me know so we can fix it. > ==================================================================== > > Traceback (most recent call last): > File "test.py", line 6, in <module> > savefig('test.eps') > File "/usr/lib/python2.5/site-packages/matplotlib/pyplot.py", line 269, > in savefig > return fig.savefig(*args, **kwargs) > File "/usr/lib/python2.5/site-packages/matplotlib/figure.py", line 782, > in savefig > self.canvas.print_figure(*args, **kwargs) > File "/usr/lib/python2.5/site-packages/matplotlib/backend_bases.py", line > 1195, in print_figure > **kwargs) > File "/usr/lib/python2.5/site-packages/matplotlib/backend_bases.py", line > 1099, in print_eps > return ps.print_eps(*args, **kwargs) > File > "/usr/lib/python2.5/site-packages/matplotlib/backends/backend_ps.py", line > 1018, in print_eps > return self._print_ps(outfile, 'eps', *args, **kwargs) > File > "/usr/lib/python2.5/site-packages/matplotlib/backends/backend_ps.py", line > 1041, in _print_ps > orientation, isLandscape, papertype) > File > "/usr/lib/python2.5/site-packages/matplotlib/backends/backend_ps.py", line > 1289, in _print_figure_tex > orientation) > File > "/usr/lib/python2.5/site-packages/matplotlib/backends/backend_ps.py", line > 1376, in convert_psfrags > \nHere is the full report generated by LaTeX: \n\n%s'% fh.read()) > RuntimeError: LaTeX was not able to process your file: > Here is the full report generated by LaTeX: > > This is pdfTeXk, Version 3.141592-1.40.3 (Web2C 7.5.6) > %&-line parsing enabled. > entering extended mode > (/tmp/8c18ecc500de49027f0ed1df1bec10b8.tex > LaTeX2e <2005年12月01日> > Babel <v3.8h> and hyphenation patterns for english, usenglishmax, dumylang, > noh > yphenation, loaded. > (/usr/share/texmf-texlive/tex/latex/base/article.cls > Document Class: article 2005年09月16日 v1.4f Standard LaTeX document class > (/usr/share/texmf-texlive/tex/latex/base/size10.clo)) > (/usr/share/texmf-texlive/tex/latex/type1cm/type1cm.sty) > (/usr/share/texmf-texlive/tex/latex/psnfss/helvet.sty > (/usr/share/texmf-texlive/tex/latex/graphics/keyval.sty)) > (/usr/share/texmf-texlive/tex/latex/psnfss/courier.sty) > (/usr/share/texmf-texlive/tex/latex/base/textcomp.sty > (/usr/share/texmf-texlive/tex/latex/base/ts1enc.def)) > (/usr/share/texmf-texlive/tex/latex/amsmath/amsmath.sty > For additional information on amsmath, use the `?' option. > (/usr/share/texmf-texlive/tex/latex/amsmath/amstext.sty > (/usr/share/texmf-texlive/tex/latex/amsmath/amsgen.sty)) > (/usr/share/texmf-texlive/tex/latex/amsmath/amsbsy.sty) > (/usr/share/texmf-texlive/tex/latex/amsmath/amsopn.sty)) > (/usr/share/texmf-texlive/tex/latex/geometry/geometry.sty > > Package geometry Warning: Over-specification in `h'-direction. > `width' (614.295pt) is ignored. > > > Package geometry Warning: Over-specification in `v'-direction. > `height' (794.96999pt) is ignored. > > ) (/usr/share/texmf-texlive/tex/latex/psfrag/psfrag.sty > (/usr/share/texmf-texlive/tex/latex/graphics/graphics.sty > (/usr/share/texmf-texlive/tex/latex/graphics/trig.sty) > (/etc/texmf/tex/latex/config/graphics.cfg) > (/usr/share/texmf-texlive/tex/latex/graphics/dvips.def))) > (/usr/share/texmf-texlive/tex/latex/graphics/graphicx.sty) > (/usr/share/texmf-texlive/tex/latex/graphics/color.sty > (/etc/texmf/tex/latex/config/color.cfg) > (/usr/share/texmf-texlive/tex/latex/graphics/dvipsnam.def)) > (./8c18ecc500de49027f0ed1df1bec10b8.aux) > (/usr/share/texmf-texlive/tex/latex/base/ts1cmr.fd) > (/usr/share/texmf-texlive/tex/latex/psnfss/ot1pnc.fd) > <8c18ecc500de49027f0ed1df1bec10b8.eps> > (/usr/share/texmf-texlive/tex/latex/psnfss/ot1phv.fd) > ! Missing \endgroup inserted. > <inserted text> > \endgroup > l.32 ...e=0]{8c18ecc500de49027f0ed1df1bec10b8.eps} > > ! Missing } inserted. > <inserted text> > } > l.32 ...e=0]{8c18ecc500de49027f0ed1df1bec10b8.eps} > > ! Missing \endgroup inserted. > <inserted text> > \endgroup > l.32 ...e=0]{8c18ecc500de49027f0ed1df1bec10b8.eps} > > ! Missing } inserted. > <inserted text> > } > l.32 ...e=0]{8c18ecc500de49027f0ed1df1bec10b8.eps} > > > ! LaTeX Error: There's no line here to end. > > See the LaTeX manual or LaTeX Companion for explanation. > Type H <return> for immediate help. > ... > > l.32 ...e=0]{8c18ecc500de49027f0ed1df1bec10b8.eps} > > ! Missing $ inserted. > <inserted text> > $ > l.32 ...e=0]{8c18ecc500de49027f0ed1df1bec10b8.eps} > > ! Missing } inserted. > <inserted text> > } > l.32 ...e=0]{8c18ecc500de49027f0ed1df1bec10b8.eps} > > ! Missing } inserted. > <inserted text> > } > l.32 ...e=0]{8c18ecc500de49027f0ed1df1bec10b8.eps} > > ! Missing } inserted. > <inserted text> > } > l.32 ...e=0]{8c18ecc500de49027f0ed1df1bec10b8.eps} > > ! Missing \cr inserted. > <inserted text> > \cr > l.32 ...e=0]{8c18ecc500de49027f0ed1df1bec10b8.eps} > > ! Missing { inserted. > <inserted text> > { > l.32 ...e=0]{8c18ecc500de49027f0ed1df1bec10b8.eps} > > ! Missing { inserted. > <inserted text> > { > l.32 ...e=0]{8c18ecc500de49027f0ed1df1bec10b8.eps} > > ! Extra }, or forgotten $. > <recently read> } > > l.32 ...e=0]{8c18ecc500de49027f0ed1df1bec10b8.eps} > > ! Missing $ inserted. > <inserted text> > $ > l.32 ...e=0]{8c18ecc500de49027f0ed1df1bec10b8.eps} > > ! Missing } inserted. > <inserted text> > } > l.32 ...e=0]{8c18ecc500de49027f0ed1df1bec10b8.eps} > > ! Misplaced alignment tab character &. > <argument> x&=\alpha \\y& > =\beta > l.32 ...e=0]{8c18ecc500de49027f0ed1df1bec10b8.eps} > > ! Missing $ inserted. > <inserted text> > $ > l.32 ...e=0]{8c18ecc500de49027f0ed1df1bec10b8.eps} > > ! Misplaced \cr. > \math@cr@@@ ->\cr > > l.32 ...e=0]{8c18ecc500de49027f0ed1df1bec10b8.eps} > > ! Misplaced \noalign. > \math@cr@@ ... \iffalse }\fi \math@cr@@@ \noalign > {\vskip #1\relax } > l.32 ...e=0]{8c18ecc500de49027f0ed1df1bec10b8.eps} > > ! Missing $ inserted. > <inserted text> > $ > l.32 ...e=0]{8c18ecc500de49027f0ed1df1bec10b8.eps} > > ! Missing } inserted. > <inserted text> > } > l.32 ...e=0]{8c18ecc500de49027f0ed1df1bec10b8.eps} > > ! Extra }, or forgotten \endgroup. > \math@cr@@ ...th@cr@@@ \noalign {\vskip #1\relax } > > l.32 ...e=0]{8c18ecc500de49027f0ed1df1bec10b8.eps} > > ! Misplaced \noalign. > \black@ #1->\noalign > {\ifdim #1>\displaywidth \dimen@ \prevdepth > \nointerlin... > l.32 ...e=0]{8c18ecc500de49027f0ed1df1bec10b8.eps} > > ! Extra }, or forgotten \endgroup. > \endalign ->\math@cr \black@ \totwidth@ \egroup > > \ifingather@\restorealignst... l.32 > ...e=0]{8c18ecc500de49027f0ed1df1bec10b8.eps} > > > ! LaTeX Error: \begin{figure} on input line 15 ended by \end{align*}. > > See the LaTeX manual or LaTeX Companion for explanation. > Type H <return> for immediate help. > ... > > l.32 ...e=0]{8c18ecc500de49027f0ed1df1bec10b8.eps} > > ! Missing $ inserted. > <inserted text> > $ > l.32 ...e=0]{8c18ecc500de49027f0ed1df1bec10b8.eps} > > ! Display math should end with $$. > <to be read again> > \endgroup > l.32 ...e=0]{8c18ecc500de49027f0ed1df1bec10b8.eps} > > ! Missing } inserted. > <inserted text> > } > l.32 ...e=0]{8c18ecc500de49027f0ed1df1bec10b8.eps} > > ! Missing } inserted. > <inserted text> > } > l.32 ...e=0]{8c18ecc500de49027f0ed1df1bec10b8.eps} > > ! Extra }, or forgotten \endgroup. > \Gin@erotate ...angle {#1}\setbox \z@ \hbox {{#2}} > \Grot@x \z@ \Grot@y > \z@\G... l.32 ...e=0]{8c18ecc500de49027f0ed1df1bec10b8.eps} > > ! Undefined control sequence. > <argument> \Grot@angle > > l.32 ...e=0]{8c18ecc500de49027f0ed1df1bec10b8.eps} > > ! Missing number, treated as zero. > <to be read again> > ) > l.32 ...e=0]{8c18ecc500de49027f0ed1df1bec10b8.eps} > > ! Undefined control sequence. > <argument> \Grot@angle > > l.32 ...e=0]{8c18ecc500de49027f0ed1df1bec10b8.eps} > > ! Missing number, treated as zero. > <to be read again> > ) > l.32 ...e=0]{8c18ecc500de49027f0ed1df1bec10b8.eps} > > ! Undefined control sequence. > <argument> \Grot@angle > > l.32 ...e=0]{8c18ecc500de49027f0ed1df1bec10b8.eps} > > ! Missing number, treated as zero. > <to be read again> > ) > l.32 ...e=0]{8c18ecc500de49027f0ed1df1bec10b8.eps} > > ! Undefined control sequence. > <argument> \Grot@angle > > l.32 ...e=0]{8c18ecc500de49027f0ed1df1bec10b8.eps} > > ! Missing number, treated as zero. > <to be read again> > ) > l.32 ...e=0]{8c18ecc500de49027f0ed1df1bec10b8.eps} > > ! Undefined control sequence. > \Grot@start ...currentpoint translate \Grot@angle > \space neg rotate neg > exch... > l.32 ...e=0]{8c18ecc500de49027f0ed1df1bec10b8.eps} > > ! Extra }, or forgotten \endgroup. > \mbox #1->\leavevmode \hbox {#1} > > l.32 ...e=0]{8c18ecc500de49027f0ed1df1bec10b8.eps} > > ! Too many }'s. > \@endfloatbox ...pagefalse \outer@nobreak \egroup > \color@endbox > l.33 \end{figure} > > ! Extra \endgroup. > \color@endgroup ->\endgraf \endgroup > > l.33 \end{figure} > > ! Too many }'s. > \color@endbox ->\color@endgroup \egroup > > l.33 \end{figure} > > > ! LaTeX Error: \begin{document} ended by \end{figure}. > > See the LaTeX manual or LaTeX Companion for explanation. > Type H <return> for immediate help. > ... > > l.33 \end{figure} > > ! Extra \endgroup. > <recently read> \endgroup > > l.33 \end{figure} > > [1] (./8c18ecc500de49027f0ed1df1bec10b8.aux) ) > (see the transcript file for additional information) > Output written on 8c18ecc500de49027f0ed1df1bec10b8.dvi (1 page, 424 bytes). > Transcript written on 8c18ecc500de49027f0ed1df1bec10b8.log. > > ==================================================================== > > How can I save a plot with a LaTeX environment in eps format? -- 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 dar...@co... office: (607) 255-3819 fax: (607) 255-9001 http://www.chess.cornell.edu
Hello, I just upgraded a number of things on my Mac OS X (Tiger) machine, including to the latest version of wx and matplotlib. I found that there is a bug in the display of dynamic plots with subplots. If I change the subplot line in the examples/dynamic_demo_wx.py to: a = self.fig.add_subplot(221) instead of a = self.fig.add_subplot(111) the plot never shows. It works for 111, and for 121, but not 221. Not sure why! It works in interactive mode, in ipython, but not in dynamic plot. Any ideas? thanks, Brian Blais -- Brian Blais bb...@br... http://web.bryant.edu/~bblais
I'm experimenting with installing a full python/numpy/scipy/matplotlib etc. suite on a RedHat Enterprise 5 system, and trying to document what would be the simplest procedure to accomplish each step. I managed to install numpy using easy_install, but when I tried to install matplotlib using the same tool, I get the following errors: error: Setup script exited with error: Command "gcc -pthread -fno- strict-aliasing -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes - fPIC -I/usr/local/include -I/usr/include -I. -I/usr/local/include/ freetype2 -I/usr/include/freetype2 -I./freetype2 -I/usr/local/include/ python2.5 -c src/ft2font.cpp -o build/temp.linux-x86_64-2.5/src/ ft2font.o" failed with exit status 1 Exception exceptions.OSError: (2, 'No such file or directory', 'src/ image.cpp') in <bound method CleanUpFile.__del__ of <setupext.CleanUpFile instance at 0x1150f710>> ignored Exception exceptions.OSError: (2, 'No such file or directory', 'src/ transforms.cpp') in <bound method CleanUpFile.__del__ of <setupext.CleanUpFile instance at 0x11510950>> ignored Exception exceptions.OSError: (2, 'No such file or directory', 'src/ backend_agg.cpp') in <bound method CleanUpFile.__del__ of <setupext.CleanUpFile instance at 0x1150f3f8>> ignored Any tips? Do I need to install some sort of back-end infrastructure first? I'll be happy to provide more detailed error messages, or do some basic tests. Thanks, Mike ------------------------------------------------------ Michael Hearne mh...@us... (303) 273-8620 USGS National Earthquake Information Center 1711 Illinois St. Golden CO 80401 Senior Software Engineer Synergetics, Inc. ------------------------------------------------------
Hello, I'm using today's svn source and I'm surprised that the following loop does not get redrawn 10 times. for it in range( 10 ): plot( arange( it ) ) draw() raw_input(); That is, within a 'ipython -pylab' session. Is this really a question for the ipython folks? Or am I missing something here? Thank you, Glen Mabey
John Hunter wrote: > On Wed, Apr 23, 2008 at 6:45 AM, Antonio Gonzalez <ja...@ca...> wrote: >> Hello, >> >> I've just updated to the latest svn (5063) and now I cannot create a >> simple plot. If I just try (in ipython -pylab): >> >> plot(rand(10)) >> >> I get: >> >> <type 'exceptions.AttributeError'>: 'module' object has no attribute >> 'masked_invalid' > > matplotlib svn requires numpy svn. Try upgrading your numpy and I > think this bug will go away. I put in a temporary workaround, but what we need is a numpy version check when mpl is imported. I can put something in based on parsing numpy.__version__; is there a better or more standard way to do this? Eric
This bug seems to be Cairo-backend specific. The Python PDF backend seems to work fine. Most likely a problem in the Cairo backend and not Cairo itself, but I haven't dug any further. Cheers, Mike Joshua Lippai wrote: > I just tested it on OS X using the wxAgg backend, and it appears to be > fine. I've atached the pdf image. What GUI are you having matplotlib > use? > > Josh > > On Wed, Apr 23, 2008 at 8:50 AM, Yong-Duk Jin <ne...@gm...> wrote: > >> I'm using matplotlib 0.91.2 from ubuntu hardy 8.04 >> >> When I saved a plot in a pdf format the legend is not properly drawn. >> I attached the figure to demonstrate the problem. The legend box(?) >> is smaller than the legend label. >> >> I used the following code to draw this test plot. >> >> from pylab import * >> x = []; y = [] >> figure(figsize=(2,2)) >> Angle = '0.0' >> plot(x,y,label='0.0deg'); axis([0,1,0,1]); legend() >> savefig('test.pdf') >> >> Any comment? >> >> -- >> Yong-Duk Jin >> ------------------------------------------------------------------------- >> This SF.net email is sponsored by the 2008 JavaOne(SM) Conference >> Don't miss this year's exciting event. There's still time to save 100ドル. >> Use priority code J8TL2D2. >> >> http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone >> _______________________________________________ >> Matplotlib-users mailing list >> Mat...@li... >> https://lists.sourceforge.net/lists/listinfo/matplotlib-users >> >> >> >> ------------------------------------------------------------------------ >> >> ------------------------------------------------------------------------- >> This SF.net email is sponsored by the 2008 JavaOne(SM) Conference >> Don't miss this year's exciting event. There's still time to save 100ドル. >> Use priority code J8TL2D2. >> http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone >> ------------------------------------------------------------------------ >> >> _______________________________________________ >> Matplotlib-users mailing list >> Mat...@li... >> https://lists.sourceforge.net/lists/listinfo/matplotlib-users >> -- Michael Droettboom Science Software Branch Operations and Engineering Division Space Telescope Science Institute Operated by AURA for NASA
On Fri, Apr 18, 2008 at 2:49 AM, Manuel Metz <mm...@as...> wrote: > as you already suggested, you have to do a little hand-work, but its not > too hard. I attached an example, which you can use as a starting point... Hey Manuel -- very cool example. I added this example to the svn trunk (rewritten slightly to conform to recommended import style) as examples/scatter_piecharts.py Cool stuff, JDH
I just tested it on OS X using the wxAgg backend, and it appears to be fine. I've atached the pdf image. What GUI are you having matplotlib use? Josh On Wed, Apr 23, 2008 at 8:50 AM, Yong-Duk Jin <ne...@gm...> wrote: > I'm using matplotlib 0.91.2 from ubuntu hardy 8.04 > > When I saved a plot in a pdf format the legend is not properly drawn. > I attached the figure to demonstrate the problem. The legend box(?) > is smaller than the legend label. > > I used the following code to draw this test plot. > > from pylab import * > x = []; y = [] > figure(figsize=(2,2)) > Angle = '0.0' > plot(x,y,label='0.0deg'); axis([0,1,0,1]); legend() > savefig('test.pdf') > > Any comment? > > -- > Yong-Duk Jin > ------------------------------------------------------------------------- > This SF.net email is sponsored by the 2008 JavaOne(SM) Conference > Don't miss this year's exciting event. There's still time to save 100ドル. > Use priority code J8TL2D2. > > http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > >
On Sat, Apr 19, 2008 at 11:23 PM, hjc520070 <jia...@16...> wrote: > > I work matplotlib on wxpython, python2.5. > It is wonderful that the following code work faster than canvas.draw(). > canvas.restore_region(background) > ##Updata three lines and draw it. > line.set_data(x,y) > ax.draw_artist(line) > canvas.blit(ax.bbox) > canvas.gui_repaint() > When I creat a frame and set frame.Show(True). Then ,refresh the line on > canvas with above method. It works. > However,When I creat a frame and set frame.Show(False). Then ,refresh the > line on canvas with above method. It fails. And get the following message. > ''' > File "C:\Python25\Lib\site-packages\matplotlib\axes.py", line 1299, in > draw_artist > assert self._cachedRenderer is not None > AssertionError > ''' > I creat a lot of frames and do not want to show it at frist. However, when > with frame.Show(False), I can refresh the canvas. Is there any solution? > Could anyone help me? Your help will be appreciated a lot. Thanks. You cannot call "draw_artist" until after the initial draw. So you will either need to explicitly call fig.canvas.draw() first or put your draw_artist command in a GUI handler that is not called until after the initial draw event. JDH
On Wed, Apr 23, 2008 at 6:45 AM, Antonio Gonzalez <ja...@ca...> wrote: > Hello, > > I've just updated to the latest svn (5063) and now I cannot create a > simple plot. If I just try (in ipython -pylab): > > plot(rand(10)) > > I get: > > <type 'exceptions.AttributeError'>: 'module' object has no attribute > 'masked_invalid' matplotlib svn requires numpy svn. Try upgrading your numpy and I think this bug will go away. JDH
My svn build of numpy does have numpy.ma.masked_invalid. Try building numpy from svn instead of using 1.0.4. It's quite stable and has lots of new features, plus it even passes all the numpy.tests. On Wed, Apr 23, 2008 at 4:45 AM, Antonio Gonzalez <ja...@ca...> wrote: > Hello, > > I've just updated to the latest svn (5063) and now I cannot create a > simple plot. If I just try (in ipython -pylab): > > plot(rand(10)) > > I get: > > <type 'exceptions.AttributeError'>: 'module' object has no attribute > 'masked_invalid' > > The complete traceback is pasted below. > (My numpy version is 1.0.4, which indeed has no 'numpy.ma.masked_invalid'.) > > Regards, > Antonio > --------------------------------------------------------------------------- > > > > In [1]: plot(rand(10)) > --------------------------------------------------------------------------- > <type 'exceptions.AttributeError'> Traceback (most recent call last) > > /home/antgon/heka/<ipython console> in <module>() > > /usr/local/lib/python2.5/site-packages/matplotlib/pyplot.py in > plot(*args, **kwargs) > 1826 hold(h) > 1827 try: > -> 1828 ret = gca().plot(*args, **kwargs) > 1829 draw_if_interactive() > 1830 except: > > /usr/local/lib/python2.5/site-packages/matplotlib/axes.py in plot(self, > *args, **kwargs) > 2803 > 2804 for line in self._get_lines(*args, **kwargs): > -> 2805 self.add_line(line) > 2806 lines.append(line) > 2807 > > /usr/local/lib/python2.5/site-packages/matplotlib/axes.py in > add_line(self, line) > 1163 line.set_clip_path(self.axesPatch) > 1164 > -> 1165 self._update_line_limits(line) > 1166 if not line.get_label(): > 1167 line.set_label('_line%d'%len(self.lines)) > > /usr/local/lib/python2.5/site-packages/matplotlib/axes.py in > _update_line_limits(self, line) > 1171 def _update_line_limits(self, line): > 1172 xydata = line.get_xydata() > -> 1173 self.update_datalim( xydata ) > 1174 > 1175 def add_patch(self, p): > > /usr/local/lib/python2.5/site-packages/matplotlib/axes.py in > update_datalim(self, xys) > 1219 if not ma.isMaskedArray(xys): > 1220 xys = npy.asarray(xys) > -> 1221 self.dataLim.update_from_data_xy(xys, > self.ignore_existing_data_limits) > 1222 self.ignore_existing_data_limits = False > 1223 > > /usr/local/lib/python2.5/site-packages/matplotlib/transforms.py in > update_from_data_xy(self, xy, ignore) > 694 if len(xy) == 0: > 695 return > --> 696 xym = ma.masked_invalid(xy) > 697 if (xym.count(axis=1)!=2).all(): > 698 return > > <type 'exceptions.AttributeError'>: 'module' object has no attribute > 'masked_invalid' > > ------------------------------------------------------------------------- > This SF.net email is sponsored by the 2008 JavaOne(SM) Conference > Don't miss this year's exciting event. There's still time to save 100ドル. > Use priority code J8TL2D2. > http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users >
Antonio, Thanks for the report. It should be fixed now. Numpy svn has masked_invalid, so my earlier change worked for me, and I forgot that ma.masked_invalid is a new addition (and a nice one). Eric Antonio Gonzalez wrote: > Hello, > > I've just updated to the latest svn (5063) and now I cannot create a > simple plot. If I just try (in ipython -pylab): > > plot(rand(10)) > > I get: > > <type 'exceptions.AttributeError'>: 'module' object has no attribute > 'masked_invalid' > > The complete traceback is pasted below. > (My numpy version is 1.0.4, which indeed has no 'numpy.ma.masked_invalid'.) > > Regards, > Antonio > --------------------------------------------------------------------------- > > > > In [1]: plot(rand(10)) > --------------------------------------------------------------------------- > <type 'exceptions.AttributeError'> Traceback (most recent call last) > > /home/antgon/heka/<ipython console> in <module>() > > /usr/local/lib/python2.5/site-packages/matplotlib/pyplot.py in > plot(*args, **kwargs) > 1826 hold(h) > 1827 try: > -> 1828 ret = gca().plot(*args, **kwargs) > 1829 draw_if_interactive() > 1830 except: > > /usr/local/lib/python2.5/site-packages/matplotlib/axes.py in plot(self, > *args, **kwargs) > 2803 > 2804 for line in self._get_lines(*args, **kwargs): > -> 2805 self.add_line(line) > 2806 lines.append(line) > 2807 > > /usr/local/lib/python2.5/site-packages/matplotlib/axes.py in > add_line(self, line) > 1163 line.set_clip_path(self.axesPatch) > 1164 > -> 1165 self._update_line_limits(line) > 1166 if not line.get_label(): > 1167 line.set_label('_line%d'%len(self.lines)) > > /usr/local/lib/python2.5/site-packages/matplotlib/axes.py in > _update_line_limits(self, line) > 1171 def _update_line_limits(self, line): > 1172 xydata = line.get_xydata() > -> 1173 self.update_datalim( xydata ) > 1174 > 1175 def add_patch(self, p): > > /usr/local/lib/python2.5/site-packages/matplotlib/axes.py in > update_datalim(self, xys) > 1219 if not ma.isMaskedArray(xys): > 1220 xys = npy.asarray(xys) > -> 1221 self.dataLim.update_from_data_xy(xys, > self.ignore_existing_data_limits) > 1222 self.ignore_existing_data_limits = False > 1223 > > /usr/local/lib/python2.5/site-packages/matplotlib/transforms.py in > update_from_data_xy(self, xy, ignore) > 694 if len(xy) == 0: > 695 return > --> 696 xym = ma.masked_invalid(xy) > 697 if (xym.count(axis=1)!=2).all(): > 698 return > > <type 'exceptions.AttributeError'>: 'module' object has no attribute > 'masked_invalid' > > ------------------------------------------------------------------------- > This SF.net email is sponsored by the 2008 JavaOne(SM) Conference > Don't miss this year's exciting event. There's still time to save 100ドル. > Use priority code J8TL2D2. > http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users
George Nurser wrote: > Apologies for perhaps raising an old chestnut here.... but these > issues would not arise if we had separate intel and ppc MacPython > binaries. But all sorts of other issues would arise. The tricky bit to all of this is getting/building Universal versions of the various dependencies. I still have no idea why Apple doesn't just provide a few more common libs, like libpng and libfreetype (which is now included with X11, but as I understand it, that's an optional install). Anyway as we don't have any control over what Apples does (and even less control over what they have already not done!), we need other solutions: My proposal: We try to build a consensus among the MacPython community about a "standard" way to deal with common dependencies. There is now more-or-less a consensus that we should provide binaries for MacPython (and now 10.5's Apple python) that are statically linked against universal versions of all the dependencies. That works great, but the truth is that it's a pain in the $$%#@ to get those dependencies built right, so we've substantially raised the barrier for folks to build binary packages. Also, it seems a bit silly to separately deal with something like libpng for multiple packages. I think I've got at least four python extensions with libpng. For example: Fredrik Lundh recently asked on the PIL list for recommendations as to what binaries he should provide for OS-X, and for someone to build them (he doesn't have a Mac). I set out to do it for him, and am still mired in dependency heck. Note that the key dependencies are the same as for Matplotlib (libpng, libfreetype) My proposal for the "standard" way to provide the libs: Kyng Chaos (William Kyngesburye)'s Frameworks: http://www.kyngchaos.com/wiki/software:frameworks He's got UnixImageIO, which provides libpng and others, and freetype, plus a bunch of others. They are all build as proper versioned OS-X frameworks, as well as a nice little hack where he puts soft links in to create a standard "unixy" hierarchy, so that they can be used by libs that don't understand frameworks. Yes, it's a bit extra to tell folks to first install these two frameworks, then whatever the python package lib is, but I think it really would make it easier all around, particularly for package builders, and making things easier for package builders means that more binaries would be built properly, which would make things easier for users. Note: William's Frameworks are all versioned properly, so there would be no harm in installing them multiple times, or having multiple versions installed. In fact, I think you could build a *.mpkg that had both your python package and the frameworks it needs, so that users would have a one download and one click install. It wouldn't hurt to have multiple packages with the same Frameworks installed this way. Thoughts? -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...
I'm using matplotlib 0.9.12 from ubuntu hardy 8.04. To take advantage of the LaTeX handling capability in matplotlib, I've added next two lines in /etc/matplotlib text.usetex : True text.latex.preamble : \usepackage{amsmath} Then, I tried next test code. from pylab import * x = []; y = [] figure(figsize=(2,2)) plot(x,y,label=r'$\theta=0ドル.0deg'); axis([0,1,0,1]); legend() text(0.5, 0.5, r'\begin{align*}x&=\alpha\\y&=\beta\end{align*}') savefig('test.eps') However, I've got the following error message without a resulting eps file. ==================================================================== Traceback (most recent call last): File "test.py", line 6, in <module> savefig('test.eps') File "/usr/lib/python2.5/site-packages/matplotlib/pyplot.py", line 269, in savefig return fig.savefig(*args, **kwargs) File "/usr/lib/python2.5/site-packages/matplotlib/figure.py", line 782, in savefig self.canvas.print_figure(*args, **kwargs) File "/usr/lib/python2.5/site-packages/matplotlib/backend_bases.py", line 1195, in print_figure **kwargs) File "/usr/lib/python2.5/site-packages/matplotlib/backend_bases.py", line 1099, in print_eps return ps.print_eps(*args, **kwargs) File "/usr/lib/python2.5/site-packages/matplotlib/backends/backend_ps.py", line 1018, in print_eps return self._print_ps(outfile, 'eps', *args, **kwargs) File "/usr/lib/python2.5/site-packages/matplotlib/backends/backend_ps.py", line 1041, in _print_ps orientation, isLandscape, papertype) File "/usr/lib/python2.5/site-packages/matplotlib/backends/backend_ps.py", line 1289, in _print_figure_tex orientation) File "/usr/lib/python2.5/site-packages/matplotlib/backends/backend_ps.py", line 1376, in convert_psfrags \nHere is the full report generated by LaTeX: \n\n%s'% fh.read()) RuntimeError: LaTeX was not able to process your file: Here is the full report generated by LaTeX: This is pdfTeXk, Version 3.141592-1.40.3 (Web2C 7.5.6) %&-line parsing enabled. entering extended mode (/tmp/8c18ecc500de49027f0ed1df1bec10b8.tex LaTeX2e <2005年12月01日> Babel <v3.8h> and hyphenation patterns for english, usenglishmax, dumylang, noh yphenation, loaded. (/usr/share/texmf-texlive/tex/latex/base/article.cls Document Class: article 2005年09月16日 v1.4f Standard LaTeX document class (/usr/share/texmf-texlive/tex/latex/base/size10.clo)) (/usr/share/texmf-texlive/tex/latex/type1cm/type1cm.sty) (/usr/share/texmf-texlive/tex/latex/psnfss/helvet.sty (/usr/share/texmf-texlive/tex/latex/graphics/keyval.sty)) (/usr/share/texmf-texlive/tex/latex/psnfss/courier.sty) (/usr/share/texmf-texlive/tex/latex/base/textcomp.sty (/usr/share/texmf-texlive/tex/latex/base/ts1enc.def)) (/usr/share/texmf-texlive/tex/latex/amsmath/amsmath.sty For additional information on amsmath, use the `?' option. (/usr/share/texmf-texlive/tex/latex/amsmath/amstext.sty (/usr/share/texmf-texlive/tex/latex/amsmath/amsgen.sty)) (/usr/share/texmf-texlive/tex/latex/amsmath/amsbsy.sty) (/usr/share/texmf-texlive/tex/latex/amsmath/amsopn.sty)) (/usr/share/texmf-texlive/tex/latex/geometry/geometry.sty Package geometry Warning: Over-specification in `h'-direction. `width' (614.295pt) is ignored. Package geometry Warning: Over-specification in `v'-direction. `height' (794.96999pt) is ignored. ) (/usr/share/texmf-texlive/tex/latex/psfrag/psfrag.sty (/usr/share/texmf-texlive/tex/latex/graphics/graphics.sty (/usr/share/texmf-texlive/tex/latex/graphics/trig.sty) (/etc/texmf/tex/latex/config/graphics.cfg) (/usr/share/texmf-texlive/tex/latex/graphics/dvips.def))) (/usr/share/texmf-texlive/tex/latex/graphics/graphicx.sty) (/usr/share/texmf-texlive/tex/latex/graphics/color.sty (/etc/texmf/tex/latex/config/color.cfg) (/usr/share/texmf-texlive/tex/latex/graphics/dvipsnam.def)) (./8c18ecc500de49027f0ed1df1bec10b8.aux) (/usr/share/texmf-texlive/tex/latex/base/ts1cmr.fd) (/usr/share/texmf-texlive/tex/latex/psnfss/ot1pnc.fd) <8c18ecc500de49027f0ed1df1bec10b8.eps> (/usr/share/texmf-texlive/tex/latex/psnfss/ot1phv.fd) ! Missing \endgroup inserted. <inserted text> \endgroup l.32 ...e=0]{8c18ecc500de49027f0ed1df1bec10b8.eps} ! Missing } inserted. <inserted text> } l.32 ...e=0]{8c18ecc500de49027f0ed1df1bec10b8.eps} ! Missing \endgroup inserted. <inserted text> \endgroup l.32 ...e=0]{8c18ecc500de49027f0ed1df1bec10b8.eps} ! Missing } inserted. <inserted text> } l.32 ...e=0]{8c18ecc500de49027f0ed1df1bec10b8.eps} ! LaTeX Error: There's no line here to end. See the LaTeX manual or LaTeX Companion for explanation. Type H <return> for immediate help. ... l.32 ...e=0]{8c18ecc500de49027f0ed1df1bec10b8.eps} ! Missing $ inserted. <inserted text> $ l.32 ...e=0]{8c18ecc500de49027f0ed1df1bec10b8.eps} ! Missing } inserted. <inserted text> } l.32 ...e=0]{8c18ecc500de49027f0ed1df1bec10b8.eps} ! Missing } inserted. <inserted text> } l.32 ...e=0]{8c18ecc500de49027f0ed1df1bec10b8.eps} ! Missing } inserted. <inserted text> } l.32 ...e=0]{8c18ecc500de49027f0ed1df1bec10b8.eps} ! Missing \cr inserted. <inserted text> \cr l.32 ...e=0]{8c18ecc500de49027f0ed1df1bec10b8.eps} ! Missing { inserted. <inserted text> { l.32 ...e=0]{8c18ecc500de49027f0ed1df1bec10b8.eps} ! Missing { inserted. <inserted text> { l.32 ...e=0]{8c18ecc500de49027f0ed1df1bec10b8.eps} ! Extra }, or forgotten $. <recently read> } l.32 ...e=0]{8c18ecc500de49027f0ed1df1bec10b8.eps} ! Missing $ inserted. <inserted text> $ l.32 ...e=0]{8c18ecc500de49027f0ed1df1bec10b8.eps} ! Missing } inserted. <inserted text> } l.32 ...e=0]{8c18ecc500de49027f0ed1df1bec10b8.eps} ! Misplaced alignment tab character &. <argument> x&=\alpha \\y& =\beta l.32 ...e=0]{8c18ecc500de49027f0ed1df1bec10b8.eps} ! Missing $ inserted. <inserted text> $ l.32 ...e=0]{8c18ecc500de49027f0ed1df1bec10b8.eps} ! Misplaced \cr. \math@cr@@@ ->\cr l.32 ...e=0]{8c18ecc500de49027f0ed1df1bec10b8.eps} ! Misplaced \noalign. \math@cr@@ ... \iffalse }\fi \math@cr@@@ \noalign {\vskip #1\relax } l.32 ...e=0]{8c18ecc500de49027f0ed1df1bec10b8.eps} ! Missing $ inserted. <inserted text> $ l.32 ...e=0]{8c18ecc500de49027f0ed1df1bec10b8.eps} ! Missing } inserted. <inserted text> } l.32 ...e=0]{8c18ecc500de49027f0ed1df1bec10b8.eps} ! Extra }, or forgotten \endgroup. \math@cr@@ ...th@cr@@@ \noalign {\vskip #1\relax } l.32 ...e=0]{8c18ecc500de49027f0ed1df1bec10b8.eps} ! Misplaced \noalign. \black@ #1->\noalign {\ifdim #1>\displaywidth \dimen@ \prevdepth \nointerlin... l.32 ...e=0]{8c18ecc500de49027f0ed1df1bec10b8.eps} ! Extra }, or forgotten \endgroup. \endalign ->\math@cr \black@ \totwidth@ \egroup \ifingather@\restorealignst... l.32 ...e=0]{8c18ecc500de49027f0ed1df1bec10b8.eps} ! LaTeX Error: \begin{figure} on input line 15 ended by \end{align*}. See the LaTeX manual or LaTeX Companion for explanation. Type H <return> for immediate help. ... l.32 ...e=0]{8c18ecc500de49027f0ed1df1bec10b8.eps} ! Missing $ inserted. <inserted text> $ l.32 ...e=0]{8c18ecc500de49027f0ed1df1bec10b8.eps} ! Display math should end with $$. <to be read again> \endgroup l.32 ...e=0]{8c18ecc500de49027f0ed1df1bec10b8.eps} ! Missing } inserted. <inserted text> } l.32 ...e=0]{8c18ecc500de49027f0ed1df1bec10b8.eps} ! Missing } inserted. <inserted text> } l.32 ...e=0]{8c18ecc500de49027f0ed1df1bec10b8.eps} ! Extra }, or forgotten \endgroup. \Gin@erotate ...angle {#1}\setbox \z@ \hbox {{#2}} \Grot@x \z@ \Grot@y \z@\G... l.32 ...e=0]{8c18ecc500de49027f0ed1df1bec10b8.eps} ! Undefined control sequence. <argument> \Grot@angle l.32 ...e=0]{8c18ecc500de49027f0ed1df1bec10b8.eps} ! Missing number, treated as zero. <to be read again> ) l.32 ...e=0]{8c18ecc500de49027f0ed1df1bec10b8.eps} ! Undefined control sequence. <argument> \Grot@angle l.32 ...e=0]{8c18ecc500de49027f0ed1df1bec10b8.eps} ! Missing number, treated as zero. <to be read again> ) l.32 ...e=0]{8c18ecc500de49027f0ed1df1bec10b8.eps} ! Undefined control sequence. <argument> \Grot@angle l.32 ...e=0]{8c18ecc500de49027f0ed1df1bec10b8.eps} ! Missing number, treated as zero. <to be read again> ) l.32 ...e=0]{8c18ecc500de49027f0ed1df1bec10b8.eps} ! Undefined control sequence. <argument> \Grot@angle l.32 ...e=0]{8c18ecc500de49027f0ed1df1bec10b8.eps} ! Missing number, treated as zero. <to be read again> ) l.32 ...e=0]{8c18ecc500de49027f0ed1df1bec10b8.eps} ! Undefined control sequence. \Grot@start ...currentpoint translate \Grot@angle \space neg rotate neg exch... l.32 ...e=0]{8c18ecc500de49027f0ed1df1bec10b8.eps} ! Extra }, or forgotten \endgroup. \mbox #1->\leavevmode \hbox {#1} l.32 ...e=0]{8c18ecc500de49027f0ed1df1bec10b8.eps} ! Too many }'s. \@endfloatbox ...pagefalse \outer@nobreak \egroup \color@endbox l.33 \end{figure} ! Extra \endgroup. \color@endgroup ->\endgraf \endgroup l.33 \end{figure} ! Too many }'s. \color@endbox ->\color@endgroup \egroup l.33 \end{figure} ! LaTeX Error: \begin{document} ended by \end{figure}. See the LaTeX manual or LaTeX Companion for explanation. Type H <return> for immediate help. ... l.33 \end{figure} ! Extra \endgroup. <recently read> \endgroup l.33 \end{figure} [1] (./8c18ecc500de49027f0ed1df1bec10b8.aux) ) (see the transcript file for additional information) Output written on 8c18ecc500de49027f0ed1df1bec10b8.dvi (1 page, 424 bytes). Transcript written on 8c18ecc500de49027f0ed1df1bec10b8.log. ==================================================================== How can I save a plot with a LaTeX environment in eps format? -- Yong-Duk Jin
[sorry for so many mails] On Wednesday 23 April 2008 15:54:42 Matthias Michler wrote: > Hello John, > > On Wednesday 23 April 2008 15:24:30 John Reid wrote: > > So I have: > > > > In [2]: import matplotlib; print matplotlib.__version__ > > 0.90.1 I just found a PC with Debian etch and matplotlib 0.90.1 and the following error arises for me (no program exit): TypeError: Could not convert object to file pointer
Hello John, On Wednesday 23 April 2008 15:24:30 John Reid wrote: > So I have: > > In [2]: import matplotlib; print matplotlib.__version__ > 0.90.1 > > Why does pylab not have __version__? I'm not an expert, but the pylab.__doc__ states This is a procedural interface to the matplotlib object-oriented plotting library. > So I guess it was fixed between 0.90.1 and 0.91.2 I don't know. On my debian etch with matplotlib 0.90.0 also an error is raised, but different to the one of mpl 0.91.2 (AttributeError: 'NoneType' object has no attribute 'rfind'). Maybe in between there was a time where this problem occured. Is it possible for you to update to 0.91.2? regards and good luck! Matthias
So I have: In [2]: import matplotlib; print matplotlib.__version__ 0.90.1 Why does pylab not have __version__? So I guess it was fixed between 0.90.1 and 0.91.2 Thanks, John.
> Matthias Michler wrote: > Hi John, > > On Wednesday 23 April 2008 12:28:11 John Reid wrote: >> I'm on Windows with python 2.5. How do I find the version of matplotlib? >> I think it is fairly recent (within last 6 months anyhow). > > import matplotlib > print matplotlib.__version__ > John, thanks for asking, Matthias for answering, this question, which I've always been afraid to ask... :) -Kaushik
It doesn't appear to exist in VS2008 -- at least I can't find it in the online docs. Maybe someone else can enlighten me. In the meantime, I just wrote my own round function and switched to use that. Please update from SVN and let me know how it goes. And again, thank you for your patience. Cheers, Mike Martin Spacek wrote: >> round() is defined in math.h so adding >> >> #include <math.h> >> >> to the top of the file might fix it. >> >> Thanks for your patience! >> >> Mike > > Just tried the latest rev where you've added <math.h> to the top, > still get the same error. Apparently round isn't defined in math.h: > > C:\home\mspacek\Desktop\mpl>python setup.py build_ext > ============================================================================ > > BUILDING MATPLOTLIB > matplotlib: 0.98pre > python: 2.5.2 (r252:60911, Feb 21 2008, 13:11:45) [MSC > v.1310 32 bit (Intel)] > platform: win32 > Windows version: (5, 1, 2600, 2, 'Service Pack 2') > > REQUIRED DEPENDENCIES > numpy: 1.1.0.dev5061 > freetype2: found, but unknown version (no pkg-config) > > OPTIONAL BACKEND DEPENDENCIES > libpng: found, but unknown version (no pkg-config) > Tkinter: Tkinter: 50704, Tk: 8.4, Tcl: 8.4 > wxPython: 2.8.6.0 > * WxAgg extension not required for wxPython >= 2.8 > Gtk+: no > * Building for Gtk+ requires pygtk; you must be > able > * to "import gtk" in your build/install > environment > Qt: no > Qt4: no > Cairo: no > > OPTIONAL DATE/TIMEZONE DEPENDENCIES > datetime: present, version unknown > dateutil: matplotlib will provide > pytz: matplotlib will provide > > OPTIONAL USETEX DEPENDENCIES > dvipng: 1.9 > ghostscript: 'gswin32c' is not recognized as an internal or > external command, operable program or batch file. > latex: no > > EXPERIMENTAL CONFIG PACKAGE DEPENDENCIES > configobj: matplotlib will provide > enthought.traits: matplotlib will provide > > [Edit setup.cfg to suppress the above messages] > ============================================================================ > > running build_ext > building 'matplotlib.ft2font' extension > C:\bin\Microsoft Visual Studio .NET 2003\Vc7\bin\cl.exe /c /nologo /Ox > /MD /W3 /GX /DNDEBUG -Iwin32_static\include -I. - > Iwin32_static\include\freetype2 -I.\freetype2 > -IC:\bin\Python25\include -IC:\bin\Python25\PC /Tpsrc/ft2font.cpp > /Fobuild > \temp.win32-2.5\Release\src/ft2font.obj > ft2font.cpp > src\ft2font.cpp(947) : warning C4244: 'initializing' : conversion from > 'FT_Long' to 'FT_Bool', possible loss of data > C:\bin\Microsoft Visual Studio .NET 2003\Vc7\bin\cl.exe /c /nologo /Ox > /MD /W3 /GX /DNDEBUG -Iwin32_static\include -I. - > Iwin32_static\include\freetype2 -I.\freetype2 > -IC:\bin\Python25\include -IC:\bin\Python25\PC /Tpsrc/mplutils.cpp > /Fobuil > d\temp.win32-2.5\Release\src/mplutils.obj > mplutils.cpp > C:\bin\Microsoft Visual Studio .NET 2003\Vc7\bin\cl.exe /c /nologo /Ox > /MD /W3 /GX /DNDEBUG -Iwin32_static\include -I. - > Iwin32_static\include\freetype2 -I.\freetype2 > -IC:\bin\Python25\include -IC:\bin\Python25\PC /TpCXX\cxxsupport.cxx > /Fobu > ild\temp.win32-2.5\Release\CXX\cxxsupport.obj > cxxsupport.cxx > C:\bin\Microsoft Visual Studio .NET 2003\Vc7\bin\cl.exe /c /nologo /Ox > /MD /W3 /GX /DNDEBUG -Iwin32_static\include -I. - > Iwin32_static\include\freetype2 -I.\freetype2 > -IC:\bin\Python25\include -IC:\bin\Python25\PC > /TpCXX\cxx_extensions.cxx / > Fobuild\temp.win32-2.5\Release\CXX\cxx_extensions.obj > cxx_extensions.cxx > C:\bin\Microsoft Visual Studio .NET 2003\Vc7\bin\cl.exe /c /nologo /Ox > /MD /W3 /GX /DNDEBUG -Iwin32_static\include -I. - > Iwin32_static\include\freetype2 -I.\freetype2 > -IC:\bin\Python25\include -IC:\bin\Python25\PC > /TpCXX\IndirectPythonInterf > ace.cxx /Fobuild\temp.win32-2.5\Release\CXX\IndirectPythonInterface.obj > IndirectPythonInterface.cxx > C:\bin\Microsoft Visual Studio .NET 2003\Vc7\bin\cl.exe /c /nologo /Ox > /MD /W3 /GX /DNDEBUG -Iwin32_static\include -I. - > Iwin32_static\include\freetype2 -I.\freetype2 > -IC:\bin\Python25\include -IC:\bin\Python25\PC /TcCXX\cxxextensions.c > /Fob > uild\temp.win32-2.5\Release\CXX\cxxextensions.obj > cxxextensions.c > creating build\lib.win32-2.5 > creating build\lib.win32-2.5\matplotlib > C:\bin\Microsoft Visual Studio .NET 2003\Vc7\bin\link.exe /DLL /nologo > /INCREMENTAL:NO /LIBPATH:win32_static\lib /LIBPAT > H:C:\bin\Python25\libs /LIBPATH:C:\bin\Python25\PCBuild freetype.lib > z.lib /EXPORT:initft2font build\temp.win32-2.5\Rele > ase\src/ft2font.obj build\temp.win32-2.5\Release\src/mplutils.obj > build\temp.win32-2.5\Release\CXX\cxxsupport.obj build\ > temp.win32-2.5\Release\CXX\cxx_extensions.obj > build\temp.win32-2.5\Release\CXX\IndirectPythonInterface.obj > build\temp.wi > n32-2.5\Release\CXX\cxxextensions.obj > /OUT:build\lib.win32-2.5\matplotlib\ft2font.pyd > /IMPLIB:build\temp.win32-2.5\Relea > se\src\ft2font.lib > Creating library build\temp.win32-2.5\Release\src\ft2font.lib and > object build\temp.win32-2.5\Release\src\ft2font.exp > > building 'matplotlib.ttconv' extension > creating build\temp.win32-2.5\Release\ttconv > C:\bin\Microsoft Visual Studio .NET 2003\Vc7\bin\cl.exe /c /nologo /Ox > /MD /W3 /GX /DNDEBUG -Iwin32_static\include -I. - > IC:\bin\Python25\include -IC:\bin\Python25\PC /Tpsrc/_ttconv.cpp > /Fobuild\temp.win32-2.5\Release\src/_ttconv.obj > _ttconv.cpp > src\_ttconv.cpp(112) : warning C4101: 'e' : unreferenced local variable > src\_ttconv.cpp(166) : warning C4101: 'e' : unreferenced local variable > C:\bin\Microsoft Visual Studio .NET 2003\Vc7\bin\cl.exe /c /nologo /Ox > /MD /W3 /GX /DNDEBUG -Iwin32_static\include -I. - > IC:\bin\Python25\include -IC:\bin\Python25\PC /Tpttconv/pprdrv_tt.cpp > /Fobuild\temp.win32-2.5\Release\ttconv/pprdrv_tt.o > bj > pprdrv_tt.cpp > ttconv\pprdrv_tt.cpp(143) : warning C4101: 'e' : unreferenced local > variable > ttconv\pprdrv_tt.cpp(312) : warning C4101: 'e' : unreferenced local > variable > ttconv\pprdrv_tt.cpp(1136) : warning C4101: 'e' : unreferenced local > variable > C:\bin\Microsoft Visual Studio .NET 2003\Vc7\bin\cl.exe /c /nologo /Ox > /MD /W3 /GX /DNDEBUG -Iwin32_static\include -I. - > IC:\bin\Python25\include -IC:\bin\Python25\PC /Tpttconv/pprdrv_tt2.cpp > /Fobuild\temp.win32-2.5\Release\ttconv/pprdrv_tt2 > .obj > pprdrv_tt2.cpp > C:\bin\Microsoft Visual Studio .NET 2003\Vc7\bin\cl.exe /c /nologo /Ox > /MD /W3 /GX /DNDEBUG -Iwin32_static\include -I. - > IC:\bin\Python25\include -IC:\bin\Python25\PC /Tpttconv/ttutil.cpp > /Fobuild\temp.win32-2.5\Release\ttconv/ttutil.obj > ttutil.cpp > C:\bin\Microsoft Visual Studio .NET 2003\Vc7\bin\link.exe /DLL /nologo > /INCREMENTAL:NO /LIBPATH:win32_static\lib /LIBPAT > H:C:\bin\Python25\libs /LIBPATH:C:\bin\Python25\PCBuild > /EXPORT:initttconv build\temp.win32-2.5\Release\src/_ttconv.obj > build\temp.win32-2.5\Release\ttconv/pprdrv_tt.obj > build\temp.win32-2.5\Release\ttconv/pprdrv_tt2.obj build\temp.win32-2. > 5\Release\ttconv/ttutil.obj > /OUT:build\lib.win32-2.5\matplotlib\ttconv.pyd > /IMPLIB:build\temp.win32-2.5\Release\src\ttco > nv.lib > Creating library build\temp.win32-2.5\Release\src\ttconv.lib and > object build\temp.win32-2.5\Release\src\ttconv.exp > building 'matplotlib._cntr' extension > C:\bin\Microsoft Visual Studio .NET 2003\Vc7\bin\cl.exe /c /nologo /Ox > /MD /W3 /GX /DNDEBUG -IC:\bin\Python25\lib\site-p > ackages\numpy\core\include -Iwin32_static\include -I. > -IC:\bin\Python25\include -IC:\bin\Python25\PC /Tcsrc/cntr.c /Fobu > ild\temp.win32-2.5\Release\src/cntr.obj > cntr.c > C:\bin\Microsoft Visual Studio .NET 2003\Vc7\bin\link.exe /DLL /nologo > /INCREMENTAL:NO /LIBPATH:win32_static\lib /LIBPAT > H:C:\bin\Python25\libs /LIBPATH:C:\bin\Python25\PCBuild > /EXPORT:init_cntr build\temp.win32-2.5\Release\src/cntr.obj /OUT > :build\lib.win32-2.5\matplotlib\_cntr.pyd > /IMPLIB:build\temp.win32-2.5\Release\src\_cntr.lib > Creating library build\temp.win32-2.5\Release\src\_cntr.lib and > object build\temp.win32-2.5\Release\src\_cntr.exp > building 'matplotlib.nxutils' extension > C:\bin\Microsoft Visual Studio .NET 2003\Vc7\bin\cl.exe /c /nologo /Ox > /MD /W3 /GX /DNDEBUG -IC:\bin\Python25\lib\site-p > ackages\numpy\core\include -Iwin32_static\include -I. > -IC:\bin\Python25\include -IC:\bin\Python25\PC /Tcsrc/nxutils.c /F > obuild\temp.win32-2.5\Release\src/nxutils.obj > nxutils.c > C:\bin\Microsoft Visual Studio .NET 2003\Vc7\bin\link.exe /DLL /nologo > /INCREMENTAL:NO /LIBPATH:win32_static\lib /LIBPAT > H:C:\bin\Python25\libs /LIBPATH:C:\bin\Python25\PCBuild > /EXPORT:initnxutils build\temp.win32-2.5\Release\src/nxutils.obj > /OUT:build\lib.win32-2.5\matplotlib\nxutils.pyd > /IMPLIB:build\temp.win32-2.5\Release\src\nxutils.lib > Creating library build\temp.win32-2.5\Release\src\nxutils.lib and > object build\temp.win32-2.5\Release\src\nxutils.exp > > building 'matplotlib._path' extension > creating build\temp.win32-2.5\Release\agg24 > creating build\temp.win32-2.5\Release\agg24\src > C:\bin\Microsoft Visual Studio .NET 2003\Vc7\bin\cl.exe /c /nologo /Ox > /MD /W3 /GX /DNDEBUG -IC:\bin\Python25\lib\site-p > ackages\numpy\core\include -Iwin32_static\include -I. > -IC:\bin\Python25\lib\site-packages\numpy\core\include -Isrc -Iagg > 24/include -I. -IC:\bin\Python25\include -IC:\bin\Python25\PC > /Tpagg24/src/agg_curves.cpp /Fobuild\temp.win32-2.5\Releas > e\agg24/src/agg_curves.obj > agg_curves.cpp > C:\bin\Microsoft Visual Studio .NET 2003\Vc7\bin\cl.exe /c /nologo /Ox > /MD /W3 /GX /DNDEBUG -IC:\bin\Python25\lib\site-p > ackages\numpy\core\include -Iwin32_static\include -I. > -IC:\bin\Python25\lib\site-packages\numpy\core\include -Isrc -Iagg > 24/include -I. -IC:\bin\Python25\include -IC:\bin\Python25\PC > /Tpagg24/src/agg_bezier_arc.cpp /Fobuild\temp.win32-2.5\Re > lease\agg24/src/agg_bezier_arc.obj > agg_bezier_arc.cpp > C:\bin\Microsoft Visual Studio .NET 2003\Vc7\bin\cl.exe /c /nologo /Ox > /MD /W3 /GX /DNDEBUG -IC:\bin\Python25\lib\site-p > ackages\numpy\core\include -Iwin32_static\include -I. > -IC:\bin\Python25\lib\site-packages\numpy\core\include -Isrc -Iagg > 24/include -I. -IC:\bin\Python25\include -IC:\bin\Python25\PC > /Tpagg24/src/agg_trans_affine.cpp /Fobuild\temp.win32-2.5\ > Release\agg24/src/agg_trans_affine.obj > agg_trans_affine.cpp > C:\bin\Microsoft Visual Studio .NET 2003\Vc7\bin\cl.exe /c /nologo /Ox > /MD /W3 /GX /DNDEBUG -IC:\bin\Python25\lib\site-p > ackages\numpy\core\include -Iwin32_static\include -I. > -IC:\bin\Python25\lib\site-packages\numpy\core\include -Isrc -Iagg > 24/include -I. -IC:\bin\Python25\include -IC:\bin\Python25\PC > /Tpagg24/src/agg_vcgen_stroke.cpp /Fobuild\temp.win32-2.5\ > Release\agg24/src/agg_vcgen_stroke.obj > agg_vcgen_stroke.cpp > C:\bin\Microsoft Visual Studio .NET 2003\Vc7\bin\cl.exe /c /nologo /Ox > /MD /W3 /GX /DNDEBUG -IC:\bin\Python25\lib\site-p > ackages\numpy\core\include -Iwin32_static\include -I. > -IC:\bin\Python25\lib\site-packages\numpy\core\include -Isrc -Iagg > 24/include -I. -IC:\bin\Python25\include -IC:\bin\Python25\PC > /Tpsrc/path.cpp /Fobuild\temp.win32-2.5\Release\src/path.o > bj > path.cpp > c:\home\mspacek\Desktop\mpl\src\agg_py_path_iterator.h(98) : warning > C4800: 'PyArrayObject *' : forcing value to bool 't > rue' or 'false' (performance warning) > src\path.cpp(343) : warning C4800: 'long' : forcing value to bool > 'true' or 'false' (performance warning) > src\path.cpp(538) : warning C4800: 'long' : forcing value to bool > 'true' or 'false' (performance warning) > src\path.cpp(838) : warning C4800: 'long' : forcing value to bool > 'true' or 'false' (performance warning) > c:\home\mspacek\Desktop\mpl\src\agg_py_path_iterator.h(160) : error > C3861: 'round': identifier not found, even with argu > ment-dependent lookup > c:\home\mspacek\Desktop\mpl\src\agg_py_path_iterator.h(150) : > while compiling class-template member function 'un > signed int SimplifyPath<VertexSource>::vertex(double *,double *)' > with > [ > VertexSource=transformed_path_t > ] > src\path.cpp(1118) : see reference to class template > instantiation 'SimplifyPath<VertexSource>' being compiled > with > [ > VertexSource=transformed_path_t > ] > c:\home\mspacek\Desktop\mpl\src\agg_py_path_iterator.h(161) : error > C3861: 'round': identifier not found, even with argu > ment-dependent lookup > c:\home\mspacek\Desktop\mpl\src\agg_py_path_iterator.h(217) : error > C3861: 'round': identifier not found, even with argu > ment-dependent lookup > c:\home\mspacek\Desktop\mpl\src\agg_py_path_iterator.h(218) : error > C3861: 'round': identifier not found, even with argu > ment-dependent lookup > error: command '"C:\bin\Microsoft Visual Studio .NET > 2003\Vc7\bin\cl.exe"' failed with exit status 2 -- Michael Droettboom Science Software Branch Operations and Engineering Division Space Telescope Science Institute Operated by AURA for NASA
Hello, I've just updated to the latest svn (5063) and now I cannot create a simple plot. If I just try (in ipython -pylab): plot(rand(10)) I get: <type 'exceptions.AttributeError'>: 'module' object has no attribute 'masked_invalid' The complete traceback is pasted below. (My numpy version is 1.0.4, which indeed has no 'numpy.ma.masked_invalid'.) Regards, Antonio --------------------------------------------------------------------------- In [1]: plot(rand(10)) --------------------------------------------------------------------------- <type 'exceptions.AttributeError'> Traceback (most recent call last) /home/antgon/heka/<ipython console> in <module>() /usr/local/lib/python2.5/site-packages/matplotlib/pyplot.py in plot(*args, **kwargs) 1826 hold(h) 1827 try: -> 1828 ret = gca().plot(*args, **kwargs) 1829 draw_if_interactive() 1830 except: /usr/local/lib/python2.5/site-packages/matplotlib/axes.py in plot(self, *args, **kwargs) 2803 2804 for line in self._get_lines(*args, **kwargs): -> 2805 self.add_line(line) 2806 lines.append(line) 2807 /usr/local/lib/python2.5/site-packages/matplotlib/axes.py in add_line(self, line) 1163 line.set_clip_path(self.axesPatch) 1164 -> 1165 self._update_line_limits(line) 1166 if not line.get_label(): 1167 line.set_label('_line%d'%len(self.lines)) /usr/local/lib/python2.5/site-packages/matplotlib/axes.py in _update_line_limits(self, line) 1171 def _update_line_limits(self, line): 1172 xydata = line.get_xydata() -> 1173 self.update_datalim( xydata ) 1174 1175 def add_patch(self, p): /usr/local/lib/python2.5/site-packages/matplotlib/axes.py in update_datalim(self, xys) 1219 if not ma.isMaskedArray(xys): 1220 xys = npy.asarray(xys) -> 1221 self.dataLim.update_from_data_xy(xys, self.ignore_existing_data_limits) 1222 self.ignore_existing_data_limits = False 1223 /usr/local/lib/python2.5/site-packages/matplotlib/transforms.py in update_from_data_xy(self, xy, ignore) 694 if len(xy) == 0: 695 return --> 696 xym = ma.masked_invalid(xy) 697 if (xym.count(axis=1)!=2).all(): 698 return <type 'exceptions.AttributeError'>: 'module' object has no attribute 'masked_invalid'
Hi John, On Wednesday 23 April 2008 12:28:11 John Reid wrote: > I'm on Windows with python 2.5. How do I find the version of matplotlib? > I think it is fairly recent (within last 6 months anyhow). import matplotlib print matplotlib.__version__ > Shouldn't an error be raised? On my Kubuntu 7.10 and WinXP with matplotlib 0.91.2 an error is raised in python and ipython. Something like: <type 'exceptions.TypeError'>: Object does not appear to be a path or a Python file-like object . regards Matthias > See: > > C:\Dev\MyProjects\Bio\hmm\python>python > Python 2.5.1 (r251:54863, Apr 18 2007, 08:51:08) [MSC v.1310 32 bit > (Intel)] on win32 > Type "help", "copyright", "credits" or "license" for more information. > > >>> from pylab import figure, savefig > >>> figure() > > <matplotlib.figure.Figure instance at 0x0191D210> > > >>> savefig(None) > > C:\Dev\MyProjects\Bio\hmm\python>python > > > ... and so back to DOS prompt > > > John.