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
(1) |
|
2
(10) |
3
(29) |
4
(56) |
5
(44) |
6
(26) |
7
(12) |
8
(1) |
|
9
(2) |
10
(11) |
11
(28) |
12
(17) |
13
(6) |
14
(17) |
15
(7) |
|
16
(1) |
17
(8) |
18
(8) |
19
(7) |
20
(2) |
21
(8) |
22
(4) |
|
23
(6) |
24
(1) |
25
(2) |
26
(8) |
27
(3) |
28
(5) |
29
(1) |
|
30
|
31
(1) |
|
|
|
|
|
|
From: Jeff W. <js...@fa...> - 2007-12-11 21:57:44
|
mbauer wrote: > Matplotlib users, I looking to tap your wealth of ideas and experience > to help solve a problem I'm working on. > > The problem: I have a series of 2d scalar arrays representing a fixed > width/height lon/lat box centered on an arbitrary lon/lat. I need to > average these composites on a common basis that accommodates the scale > changes due to latitude, preferably by shifting everything to a common > central lon/lat (a polar/radial distance basis would work too). I want > a plot of the end result too and I'm like to do everything with > matplotlib and python so that it folds into the rest of my program. > > Something similar can be seen at http://www.atmos.washington.edu/~robwood/topic_cyclones.htm > > I've been looking at transform_scalar from basemap but I'm not quite > sure this is what I should use. > Mike: transform_scalar does simple bilinear interpolation from a lat/lon grid to a regular grid in map projection coordinates. If your map projection is just a lat/lon projection, then this amounts to interpolating from one lat/lon grid to another. > If anyone can offer a solution, a point in the right direction, or > just wave me off this path I'd be most appreciative. > I'm sure numpy/matplotlib can do what you need to do. Matplotlib can certainly make a plot similar to the one given in your link. I think you question relates more to the processing of your arrays though, and not specifically the plotting. Are all your 2d arrays the same shape (the same number of lats and lons)? Are they just centered on different regions? If so, I think you can just multiply each grid point by the cosine of latitude to get the proper area weighting before summing them together. But perhaps I'm missing the essence of your question .... -Jeff -- Jeffrey S. Whitaker Phone : (303)497-6313 Meteorologist FAX : (303)497-6449 NOAA/OAR/PSD R/PSD1 Email : Jef...@no... 325 Broadway Office : Skaggs Research Cntr 1D-124 Boulder, CO, USA 80303-3328 Web : http://tinyurl.com/5telg |
|
From: mbauer <mb...@gi...> - 2007-12-11 21:18:22
|
Matplotlib users, I looking to tap your wealth of ideas and experience to help solve a problem I'm working on. The problem: I have a series of 2d scalar arrays representing a fixed width/height lon/lat box centered on an arbitrary lon/lat. I need to average these composites on a common basis that accommodates the scale changes due to latitude, preferably by shifting everything to a common central lon/lat (a polar/radial distance basis would work too). I want a plot of the end result too and I'm like to do everything with matplotlib and python so that it folds into the rest of my program. Something similar can be seen at http://www.atmos.washington.edu/~robwood/topic_cyclones.htm I've been looking at transform_scalar from basemap but I'm not quite sure this is what I should use. If anyone can offer a solution, a point in the right direction, or just wave me off this path I'd be most appreciative. Mike |
|
From: Ryan K. <rya...@gm...> - 2007-12-11 20:41:40
|
Pretty sure it's a newer chip, but I will find out. On Dec 11, 2007 2:06 PM, Fernando Perez <fpe...@gm...> wrote: > > On Dec 11, 2007 12:01 PM, Ryan Krauss <rya...@gm...> wrote: > > I am trying to help a student get started with > > Python/Scipy/Numpy/Matplotlib in windows. On one of his machines, > > everything seems to install correctly, we can call figure(1) without a > > problem, and plotting is fine until we try the show() command. Then > > python crashes without much in the way of useful information. His > > laptop is completely fine. > > > > We have downloaded a current rc file and set the backend to TkAgg. > > > > Any thoughts? > > > > How do we get more info to track down the problem? > > Go to the windows information screens and fetch out some CPU details. > If it's a Pentium III, chances are the SSE2 instructions in the latest > numpy binary are the culprit. If it's a newer chip, we'll need to dig > deeper. > > Cheers, > > f > |
|
From: Fernando P. <fpe...@gm...> - 2007-12-11 20:06:52
|
On Dec 11, 2007 12:01 PM, Ryan Krauss <rya...@gm...> wrote: > I am trying to help a student get started with > Python/Scipy/Numpy/Matplotlib in windows. On one of his machines, > everything seems to install correctly, we can call figure(1) without a > problem, and plotting is fine until we try the show() command. Then > python crashes without much in the way of useful information. His > laptop is completely fine. > > We have downloaded a current rc file and set the backend to TkAgg. > > Any thoughts? > > How do we get more info to track down the problem? Go to the windows information screens and fetch out some CPU details. If it's a Pentium III, chances are the SSE2 instructions in the latest numpy binary are the culprit. If it's a newer chip, we'll need to dig deeper. Cheers, f |
|
From: Michael D. <md...@st...> - 2007-12-11 19:49:48
|
I should add that in 0.91.1, you'll be hit by this bug: http://sourceforge.net/mailarchive/message.php?msg_name=475ED00A.400%40stsci.edu You can wait for 0.91.2, or patch your cbook.py as suggested by Brandon in the above thread. Cheers, Mike Michael Droettboom wrote: > [I only seem to be getting this message from the list today, despite the > timestamp of 2007-12-05. Sorry for the delay.] > > As of matplotlib 0.91.1, savefig() supports saving to a file-like object > for most backends (excluding Gtk and Wx). You can pass in a StringIO > object to savefig for instance, and then pass its content to the XML > parser of your choice. (There is no way to get DOM objects directly, > since the SVG backend actually writes the XML content directly as a > stream of bytes). > > You can specify SVG as your output by either setting the backend > appropriately or passing a "format" kwarg to savfig, e.g. > > savefig(fileobj, format="svg") > > Cheers, > Mike > > bplewe wrote: >> [Fairly new at matplotlib, but very happy with it so far] >> >> Is it possible to retrieve images rendered by one of the backends as an >> object, rather than just saving to a file? >> >> Specifically, I need to render graphs to SVG code, that I can turn into a >> DOM object for further manipulation. I can save to a temp file and >> immediately reload it into a DOM, but that is cumbersome in a single >> program. >> >> The only place I can see to generate rendered output is savefig(). There is >> a reference in the documentation to using a file-like object with the Cairo >> backend. Is that the only possibility? >> >> If so, any ideas on a workaround other than temp files? > -- Michael Droettboom Science Software Branch Operations and Engineering Division Space Telescope Science Institute Operated by AURA for NASA |
|
From: John H. <jd...@gm...> - 2007-12-11 19:42:29
|
On Dec 11, 2007 1:01 PM, Ryan Krauss <rya...@gm...> wrote: > I am trying to help a student get started with > Python/Scipy/Numpy/Matplotlib in windows. On one of his machines, > everything seems to install correctly, we can call figure(1) without a > problem, and plotting is fine until we try the show() command. Then > python crashes without much in the way of useful information. His > laptop is completely fine. > > We have downloaded a current rc file and set the backend to TkAgg. > > Any thoughts? First try >>> import numpy >>> numpy.test() there is a numpy problem on windows that affects older machines. If that works, create a simple test file that generates a plot and calls savefig and run it with > python myscript.py --verbose-debug-annoying try different backends by adding -dPS or -dAgg to the verbose flag from the command line and see which backends crash and report back with the verbose output JDH |
|
From: Ryan K. <rya...@gm...> - 2007-12-11 19:01:49
|
I am trying to help a student get started with Python/Scipy/Numpy/Matplotlib in windows. On one of his machines, everything seems to install correctly, we can call figure(1) without a problem, and plotting is fine until we try the show() command. Then python crashes without much in the way of useful information. His laptop is completely fine. We have downloaded a current rc file and set the backend to TkAgg. Any thoughts? How do we get more info to track down the problem? Thanks, Ryan |
|
From: Christopher B. <Chr...@no...> - 2007-12-11 18:57:19
|
David.Goldsmith wrote: > You say you tried wx but don't mention wxmpl explicitly - did you try > wxmpl (http://agni.phys.iit.edu/~kmcivor/wxmpl/)? good choice -- the other is to follow the "embedded_in_***" examples -- where are they? A quick googling didn't find them! >> all attempts to control or modify input to >> Matplotlib from a GUI (Tkinter, Wx, Jython, PyGTK etc.) have proved >> fruitless due to seeming incompatibility between these modules, I'm guessing that you're using the pylab interface -- pylab manages the GUI for you -- which is great if you're doing simple interactive plotting, but will not work if you are embedding MPL in a gui -- you need to use the OO interface instead -- see the embedded_in_*** examples. >> particularly >> when one distributes any finished product to another platform. This is no harder than with JAVA -- easier I think -- you can completely control the environment if you want -- see py2exe, pyInstaller, py2app, etc. >> I return to my Java roots where I can easily solve all GUI >> problems Once you get the hang of Python, I think you'll find that you can solve your GUI problems even more easily! I'm partial to wxPython, but pyQT and pyGTK have their strengths also. As a JAVA coder, I recommend you read: http://dirtsimple.org/2004/12/python-is-not-java.html -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: David.Goldsmith <Dav...@no...> - 2007-12-11 18:07:02
|
You say you tried wx but don't mention wxmpl explicitly - did you try wxmpl (http://agni.phys.iit.edu/~kmcivor/wxmpl/)? DG adamski246 wrote: > I am part of a team trying to create interactive GUI scientific > visualisations and would like some advice regarding the best way to proceed. > > We are trying to output mathematical functions (Fourier transforms, ray > tracing etc.) in graphical form and have been very impressed with the ease > Matplotlib can do this. However, all attempts to control or modify input to > Matplotlib from a GUI (Tkinter, Wx, Jython, PyGTK etc.) have proved > fruitless due to seeming incompatibility between these modules, particularly > when one distributes any finished product to another platform. > > I am an experienced Java programmer who needs the portability and free > technologies provided by Java (or Python) to distribute our applications and > would like to know of the best way to mesh Matplotlib to a GUI creating > system. We have experimented with the GUI creation possibilities of > Matplotlib itself but these are inadequate for our needs. > > Does anyone know of (or has examples of) Matplotlib applications controlled > by a GUI or must I return to my Java roots where I can easily solve all GUI > problems but do not have access to a powerful maths library such as > Matplotlib. > > Thanks > adam > |
|
From: Michael D. <md...@st...> - 2007-12-11 17:58:25
|
[I only seem to be getting this message from the list today, despite the timestamp of 2007-12-05. Sorry for the delay.] As of matplotlib 0.91.1, savefig() supports saving to a file-like object for most backends (excluding Gtk and Wx). You can pass in a StringIO object to savefig for instance, and then pass its content to the XML parser of your choice. (There is no way to get DOM objects directly, since the SVG backend actually writes the XML content directly as a stream of bytes). You can specify SVG as your output by either setting the backend appropriately or passing a "format" kwarg to savfig, e.g. savefig(fileobj, format="svg") Cheers, Mike bplewe wrote: > [Fairly new at matplotlib, but very happy with it so far] > > Is it possible to retrieve images rendered by one of the backends as an > object, rather than just saving to a file? > > Specifically, I need to render graphs to SVG code, that I can turn into a > DOM object for further manipulation. I can save to a temp file and > immediately reload it into a DOM, but that is cumbersome in a single > program. > > The only place I can see to generate rendered output is savefig(). There is > a reference in the documentation to using a file-like object with the Cairo > backend. Is that the only possibility? > > If so, any ideas on a workaround other than temp files? -- Michael Droettboom Science Software Branch Operations and Engineering Division Space Telescope Science Institute Operated by AURA for NASA |
|
From: Michael D. <md...@st...> - 2007-12-11 17:54:14
|
I think the problem might be related to using numarray and not numpy.
matplotlib is not heavily tested (if at all) on anything but numpy anymore.
See this from your output log:
D:\Program
Files\Python-2.5.1\Lib\site-packages\matplotlib\numerix\__init__.py:65:
DeprecationWarning: numarray use as a numerix backed for matplotlib is
deprecated
DeprecationWarning, stacklevel=1)
Indeed, using "float" as a type specifier works with numpy but not with
numarray.
Try setting your "numerix" setting to "numpy" in your matplotlibrc file.
If there are good reasons that you need to keep using numarray (for
compatibility with your own code for instance), please mention that on
this list -- there may be workarounds.
Cheers,
Mike
Thorsten.G wrote:
> Hello i' am an newbie in matplotlib and python!
> I've installed python 2.5.1 + numpy 1.0.4 + numarray 1.5.2 but have many
> problems !
> I've written an easy plot script
> import matplotlib
> import pylab
> from pylab import arange,sin,pi,plot,xlabel,ylabel,title,grid,show,axis
>
> ymax = max([1,4,9,16,12,5,7,13,7,1,33])
> ymin = min([1,-4,9,16,12,5,7,13,7,1,33])
> print 'ymax = %s' % ymax
> print 'ymin = %s' % ymin
> plot([1,2,3,4,5,6,7,8,9,10,11], [1,4,9,16,12,5,7,13,7,1,33], 'ro')
> axis([0, 15, ymin-5, ymax+5])
> xlabel('time (s)')
> ylabel('voltage (mV)')
> title('About as simple as it gets, folks')
> grid(True)
> show()
>
> --> AND i get some problems
>
> D:\Program
> Files\Python-2.5.1\Lib\site-packages\matplotlib\numerix\__init__.py:65:
> DeprecationWarning: numarray use as a numerix backed for matplotlib is
> deprecated
> DeprecationWarning, stacklevel=1)
> Traceback (most recent call last):
> File "D:\workspace-py\GDOParser\PlotTest.py", line 12, in <module>
> plot([1,2,3,4], [1,4,9,16], 'ro')
> File "d:\Program
> Files\Python-2.5.1\Lib\site-packages\matplotlib\pyplot.py", line 1775, in
> plot
> b = ishold()
> File "d:\Program
> Files\Python-2.5.1\Lib\site-packages\matplotlib\pyplot.py", line 340, in
> ishold
> return gca().ishold()
> File "d:\Program
> Files\Python-2.5.1\Lib\site-packages\matplotlib\pyplot.py", line 433, in gca
> ax = gcf().gca(**kwargs)
> File "d:\Program
> Files\Python-2.5.1\Lib\site-packages\matplotlib\figure.py", line 722, in gca
> return self.add_subplot(111, **kwargs)
> File "d:\Program
> Files\Python-2.5.1\Lib\site-packages\matplotlib\figure.py", line 542, in
> add_subplot
> a = Subplot(self, *args, **kwargs)
> File "d:\Program Files\Python-2.5.1\Lib\site-packages\matplotlib\axes.py",
> line 5561, in __init__
> self.figW, self.figH], **kwargs)
> File "d:\Program Files\Python-2.5.1\Lib\site-packages\matplotlib\axes.py",
> line 507, in __init__
> self._init_axis()
> File "d:\Program Files\Python-2.5.1\Lib\site-packages\matplotlib\axes.py",
> line 545, in _init_axis
> self.xaxis = maxis.XAxis(self)
> File "d:\Program Files\Python-2.5.1\Lib\site-packages\matplotlib\axis.py",
> line 518, in __init__
> self.cla()
> File "d:\Program Files\Python-2.5.1\Lib\site-packages\matplotlib\axis.py",
> line 553, in cla
> self.majorTicks.extend([self._get_tick(major=True) for i in range(1)])
> File "d:\Program Files\Python-2.5.1\Lib\site-packages\matplotlib\axis.py",
> line 1033, in _get_tick
> return XTick(self.axes, 0, '', major=major)
> File "d:\Program Files\Python-2.5.1\Lib\site-packages\matplotlib\axis.py",
> line 96, in __init__
> self.tick1line = self._get_tick1line(loc)
> File "d:\Program Files\Python-2.5.1\Lib\site-packages\matplotlib\axis.py",
> line 285, in _get_tick1line
> markersize=self._size,
> File "d:\Program
> Files\Python-2.5.1\Lib\site-packages\matplotlib\lines.py", line 284, in
> __init__
> self.set_data(xdata, ydata)
> File "d:\Program
> Files\Python-2.5.1\Lib\site-packages\matplotlib\lines.py", line 405, in
> set_data
> self.recache()
> File "d:\Program
> Files\Python-2.5.1\Lib\site-packages\matplotlib\lines.py", line 410, in
> recache
> x = ma.asarray(self.convert_xunits(self._xorig), float)
> File "D:\Program Files\Python-2.5.1\Lib\site-packages\numarray\ma\MA.py",
> line 2164, in asarray
> return array(data, typecode=typecode, copy=0)
> File "D:\Program Files\Python-2.5.1\Lib\site-packages\numarray\ma\MA.py",
> line 628, in __init__
> c = Numeric.array(data, tc, savespace=ss)
> File "D:\Program
> Files\Python-2.5.1\Lib\site-packages\numarray\numarraycore.py", line 334, in
> array
> type=_nt._typeFromKeywords(type,typecode,dtype)
> File "d:\Program
> Files\Python-2.5.1\Lib\site-packages\numarray\numerictypes.py", line 474, in
> _typeFromKeywords
> return getType(typecode)
> File "d:\Program
> Files\Python-2.5.1\Lib\site-packages\numarray\numerictypes.py", line 450, in
> getType
> raise TypeError("Not a numeric type")
> TypeError: Not a numeric type
>
> Has anyone an idea?
> Thanks Thorsten
>
>
>
--
Michael Droettboom
Science Software Branch
Operations and Engineering Division
Space Telescope Science Institute
Operated by AURA for NASA
|
|
From: Ken M. <mc...@ii...> - 2007-12-11 17:52:29
|
On Dec 5, 2007, at 11:58 AM, Christopher Barker wrote: > > or use wxmpl: > > http://agni.phys.iit.edu/~kmcivor/wxmpl/ > > By the way, couldn't that be distributed with Matplotlib? Maybe in > toolkits, if not the main distro. I'd be all for having wxmpl distributed as part of the matplotlib toolkits. I had originally hoped to merge it into the main distribution after unifying the event handling so that matplotlib events worked robustly, but I don't see myself finding the time to work on it any time soon. Ken |
|
From: John H. <jd...@gm...> - 2007-12-11 17:42:07
|
On Dec 7, 2007 10:38 AM, adamski246 <a...@go...> wrote: > Does anyone know of (or has examples of) Matplotlib applications controlled > by a GUI or must I return to my Java roots where I can easily solve all GUI > problems but do not have access to a powerful maths library such as > Matplotlib. matplotlib can be easily embedded in tk, gtk, wx, qt or fltk. See the API FAQ at http://matplotlib.sf.net/faq.html#OO and the embedding_in_*.py examples at http://matplotlib.sf.net/examples |
|
From: Michael D. <md...@st...> - 2007-12-11 16:23:29
|
Great. The forthcoming 0.91.2 release sounds like it will be very important to Windows users. Apologies for introducing this bug in the first place! Cheers, Mike Bri...@ub... wrote: > Michael et al. > > The r4633 patch fixes the problem indeed. Thanks for your help!! > > > Brian > > > -----Original Message----- > From: Michael Droettboom [mailto:md...@st...] > Sent: Tuesday, December 11, 2007 10:03 AM > To: Boonstra, Brian > Cc: mat...@li... > Subject: Re: [Matplotlib-users] Repeated calls to set_text using TeX > formatting results in RuntimeError > > The patch for r4633 is pretty simple, so you could test it without > needing to check out from SVN or build your own matplotlib etc. > > Open the file "font_manager.py", which should live in > "%PYTHONPATH%/Lib/site-packages/matplotlib". Around line 681, you'll > find the function: > > def __hash__(self): > return hash(repr(self.__props)) > > Change it to: > > def __hash__(self): > return hash(repr(self.__props.__dict__)) > > (Obviously, back up the file first...) > > Then try your script again. If that doesn't work, I'll have to fire up > Windows some time to have a look -- I'm not able to reproduce this bug > on Linux. > > Cheers, > Mike > > Bri...@ub... wrote: >>> I believe this is a known bug with 0.90.1. Are you able to run >> 0.91.1? >> >> >> I just upgraded and checked -- the bug still exists in 0.91.1. I'm >> afraid I don't know whether it has been fixed by r4633 or not. >> >> Best, >> Brian >> >> >> Bri...@ub... wrote: >>> I'm doing a parameter fitting exercise, and plotting the progress as >>> I >>> do so. I have found that repeated calls to set_text() on a text >>> object will result in an error opening a font file iff the text uses >>> TeX formatting. (I am not using the experimental usetex feature). >>> >>> I speculate that matplotlib is opening the font file anew with each >>> call to set_text and never closing it, resulting ultimately in having > >>> too many files open. Here is a brief program to reproduce this >>> behavior (WinXP, Py2.5, matplotlib 0.90.1): >>> >>> >>> from pylab import figure, axes, draw, ion from numpy import array, >>> cos, abs >>> ion() >>> fig=figure() >>> axs=axes() >>> x=array(range(100))/10.0 >>> cosPlot=axs.plot( x, cos(x)**2, 'r' ) powText = >>> axs.text(0.9,0.02,r'$\alpha=$', >>> >> horizontalalignment='left',verticalalignment='bottom', >>> transform = axs.transAxes) >>> draw() >>> for alpha in array(range(10,400))/100.0: >>> axs.lines[-1].set_ydata( abs(cos(x))**alpha) >>> powText.set_text(r'$\alpha=%.4g$'%alpha) >>> print alpha >>> draw() >>> >>> >>> >>> >>> >>> Traceback (most recent call last): >>> File "delme.py", line 16, in <module> >>> File >>> "C:\Python25\Lib\site-packages\matplotlib-0.90.1-py2.5-win32.egg\matp >>> l >>> otlib\pylab.py", >>> line 754, in draw >>> File >>> "C:\Python25\Lib\site-packages\matplotlib-0.90.1-py2.5-win32.egg\matp >>> l >>> otlib\backends\backend_tkagg.py", >>> line 154, in draw >>> >>> File >>> "C:\Python25\Lib\site-packages\matplotlib-0.90.1-py2.5-win32.egg\matp >>> l >>> otlib\backends\backend_agg.py", >>> line 392, in draw >>> >>> File >>> "C:\Python25\Lib\site-packages\matplotlib-0.90.1-py2.5-win32.egg\matp >>> l >>> otlib\figure.py", >>> line 601, in draw >>> File >>> "C:\Python25\Lib\site-packages\matplotlib-0.90.1-py2.5-win32.egg\matp >>> l >>> otlib\axes.py", >>> line 1286, in draw >>> File >>> "C:\Python25\Lib\site-packages\matplotlib-0.90.1-py2.5-win32.egg\matp >>> l >>> otlib\text.py", >>> line 410, in draw >>> File >>> "C:\Python25\Lib\site-packages\matplotlib-0.90.1-py2.5-win32.egg\matp >>> l >>> otlib\text.py", >>> line 255, in _get_layout >>> File >>> "C:\Python25\Lib\site-packages\matplotlib-0.90.1-py2.5-win32.egg\matp >>> l >>> otlib\backends\backend_agg.py", >>> line 246, in get_text_width_height >>> >>> File >>> "C:\Python25\Lib\site-packages\matplotlib-0.90.1-py2.5-win32.egg\matp >>> l >>> otlib\mathtext.py", >>> line 1569, in __call__ >>> File >>> "C:\Python25\Lib\site-packages\matplotlib-0.90.1-py2.5-win32.egg\matp >>> l >>> otlib\mathtext.py", >>> line 578, in __init__ >>> RuntimeError: Could not open facefile >>> c:\Python25\lib\site-packages\matplotlib-0.90.1-py2.5-win32.egg\matpl >>> o >>> tlib\mpl-data\fonts\ttf\cmtt10.ttf; >>> Cannot_Open_Resource >>> >>> >>> --------------------------------------------------------------------- >>> - >>> -- >>> >>> --------------------------------------------------------------------- >>> - >>> --- >>> SF.Net email is sponsored by: >>> Check out the new SourceForge.net Marketplace. >>> It's the best place to buy or sell services for just about anything >>> Open Source. >>> http://sourceforge.net/services/buy/index.php >>> >>> >>> --------------------------------------------------------------------- >>> - >>> -- >>> >>> _______________________________________________ >>> 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 >> >> This message contains confidential information and is intended only >> for the individual named. If you are not the named addressee you >> should not disseminate, distribute or copy this e-mail. Please notify > >> the sender immediately by e-mail if you have received this e-mail by >> mistake and delete this e-mail from your system and destroy any copies > >> thereof. >> >> E-mail transmission cannot be guaranteed to be secure or error-free as > >> information could be intercepted, corrupted, lost, destroyed, arrive >> late or incomplete, or contain viruses. The sender therefore does not > >> accept liability for any errors or omissions in the contents of this >> message which arise as a result of e-mail transmission. If >> verification is required please request a hard-copy version. This >> message is provided for informational purposes and should not be >> construed as a solicitation or offer to buy or sell any securities or >> related financial instruments. >> >> >> >> ---------------------------------------------------------------------- >> --- >> SF.Net email is sponsored by: >> Check out the new SourceForge.net Marketplace. >> It's the best place to buy or sell services for just about anything >> Open Source. >> http://sourceforge.net/services/buy/index.php >> _______________________________________________ >> 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 > > This message contains confidential information and is intended only > for the individual named. If you are not the named addressee you > should not disseminate, distribute or copy this e-mail. Please > notify the sender immediately by e-mail if you have received this > e-mail by mistake and delete this e-mail from your system and destroy > any copies thereof. > > E-mail transmission cannot be guaranteed to be secure or error-free > as information could be intercepted, corrupted, lost, destroyed, > arrive late or incomplete, or contain viruses. The sender therefore > does not accept liability for any errors or omissions in the contents > of this message which arise as a result of e-mail transmission. If > verification is required please request a hard-copy version. This > message is provided for informational purposes and should not be > construed as a solicitation or offer to buy or sell any securities or > related financial instruments. > > -- Michael Droettboom Science Software Branch Operations and Engineering Division Space Telescope Science Institute Operated by AURA for NASA |
|
From: <Bri...@ub...> - 2007-12-11 16:20:18
|
Michael et al.
The r4633 patch fixes the problem indeed. Thanks for your help!!
Brian
=20
-----Original Message-----
From: Michael Droettboom [mailto:md...@st...]=20
Sent: Tuesday, December 11, 2007 10:03 AM
To: Boonstra, Brian
Cc: mat...@li...
Subject: Re: [Matplotlib-users] Repeated calls to set_text using TeX
formatting results in RuntimeError
The patch for r4633 is pretty simple, so you could test it without
needing to check out from SVN or build your own matplotlib etc.
Open the file "font_manager.py", which should live in
"%PYTHONPATH%/Lib/site-packages/matplotlib". Around line 681, you'll
find the function:
def __hash__(self):
return hash(repr(self.__props))
Change it to:
def __hash__(self):
return hash(repr(self.__props.__dict__))
(Obviously, back up the file first...)
Then try your script again. If that doesn't work, I'll have to fire up
Windows some time to have a look -- I'm not able to reproduce this bug
on Linux.
Cheers,
Mike
Bri...@ub... wrote:
>> I believe this is a known bug with 0.90.1. Are you able to run
> 0.91.1?
>=20
>=20
> I just upgraded and checked -- the bug still exists in 0.91.1. I'm=20
> afraid I don't know whether it has been fixed by r4633 or not.
>=20
> Best,
> Brian
>=20
>=20
> Bri...@ub... wrote:
>> I'm doing a parameter fitting exercise, and plotting the progress as=20
>> I
>=20
>> do so. I have found that repeated calls to set_text() on a text=20
>> object will result in an error opening a font file iff the text uses=20
>> TeX formatting. (I am not using the experimental usetex feature).
>>
>> I speculate that matplotlib is opening the font file anew with each=20
>> call to set_text and never closing it, resulting ultimately in having
>> too many files open. Here is a brief program to reproduce this=20
>> behavior (WinXP, Py2.5, matplotlib 0.90.1):
>>
>>
>> from pylab import figure, axes, draw, ion from numpy import array,=20
>> cos, abs
>> ion()
>> fig=3Dfigure()
>> axs=3Daxes()
>> x=3Darray(range(100))/10.0
>> cosPlot=3Daxs.plot( x, cos(x)**2, 'r' ) powText =3D=20
>> axs.text(0.9,0.02,r'$\alpha=3D$',
>>
> horizontalalignment=3D'left',verticalalignment=3D'bottom',
>> transform =3D axs.transAxes)
>> draw()
>> for alpha in array(range(10,400))/100.0:
>> axs.lines[-1].set_ydata( abs(cos(x))**alpha)
>> powText.set_text(r'$\alpha=3D%.4g$'%alpha)
>> print alpha
>> draw()
>> =20
>>
>>
>>
>>
>> Traceback (most recent call last):
>> File "delme.py", line 16, in <module>
>> File
>> "C:\Python25\Lib\site-packages\matplotlib-0.90.1-py2.5-win32.egg\matp
>> l
>> otlib\pylab.py",
>> line 754, in draw
>> File
>> "C:\Python25\Lib\site-packages\matplotlib-0.90.1-py2.5-win32.egg\matp
>> l
>> otlib\backends\backend_tkagg.py",
>> line 154, in draw
>>
>> File
>> "C:\Python25\Lib\site-packages\matplotlib-0.90.1-py2.5-win32.egg\matp
>> l
>> otlib\backends\backend_agg.py",
>> line 392, in draw
>>
>> File
>> "C:\Python25\Lib\site-packages\matplotlib-0.90.1-py2.5-win32.egg\matp
>> l
>> otlib\figure.py",
>> line 601, in draw
>> File
>> "C:\Python25\Lib\site-packages\matplotlib-0.90.1-py2.5-win32.egg\matp
>> l
>> otlib\axes.py",
>> line 1286, in draw
>> File
>> "C:\Python25\Lib\site-packages\matplotlib-0.90.1-py2.5-win32.egg\matp
>> l
>> otlib\text.py",
>> line 410, in draw
>> File
>> "C:\Python25\Lib\site-packages\matplotlib-0.90.1-py2.5-win32.egg\matp
>> l
>> otlib\text.py",
>> line 255, in _get_layout
>> File
>> "C:\Python25\Lib\site-packages\matplotlib-0.90.1-py2.5-win32.egg\matp
>> l
>> otlib\backends\backend_agg.py",
>> line 246, in get_text_width_height
>>
>> File
>> "C:\Python25\Lib\site-packages\matplotlib-0.90.1-py2.5-win32.egg\matp
>> l
>> otlib\mathtext.py",
>> line 1569, in __call__
>> File
>> "C:\Python25\Lib\site-packages\matplotlib-0.90.1-py2.5-win32.egg\matp
>> l
>> otlib\mathtext.py",
>> line 578, in __init__
>> RuntimeError: Could not open facefile=20
>> c:\Python25\lib\site-packages\matplotlib-0.90.1-py2.5-win32.egg\matpl
>> o
>> tlib\mpl-data\fonts\ttf\cmtt10.ttf;
>> Cannot_Open_Resource
>>
>>
>> ---------------------------------------------------------------------
>> -
>> --
>>
>> ---------------------------------------------------------------------
>> -
>> ---
>> SF.Net email is sponsored by:=20
>> Check out the new SourceForge.net Marketplace.
>> It's the best place to buy or sell services for just about anything=20
>> Open Source.
>> http://sourceforge.net/services/buy/index.php
>>
>>
>> ---------------------------------------------------------------------
>> -
>> --
>>
>> _______________________________________________
>> Matplotlib-users mailing list
>> Mat...@li...
>> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>=20
> --
> Michael Droettboom
> Science Software Branch
> Operations and Engineering Division
> Space Telescope Science Institute
> Operated by AURA for NASA
>=20
> This message contains confidential information and is intended only=20
> for the individual named. If you are not the named addressee you=20
> should not disseminate, distribute or copy this e-mail. Please notify
> the sender immediately by e-mail if you have received this e-mail by=20
> mistake and delete this e-mail from your system and destroy any copies
> thereof.
>=20
> E-mail transmission cannot be guaranteed to be secure or error-free as
> information could be intercepted, corrupted, lost, destroyed, arrive=20
> late or incomplete, or contain viruses. The sender therefore does not
> accept liability for any errors or omissions in the contents of this=20
> message which arise as a result of e-mail transmission. If=20
> verification is required please request a hard-copy version. This=20
> message is provided for informational purposes and should not be=20
> construed as a solicitation or offer to buy or sell any securities or=20
> related financial instruments.
>=20
>=20
>=20
> ----------------------------------------------------------------------
> ---
> SF.Net email is sponsored by:=20
> Check out the new SourceForge.net Marketplace.
> It's the best place to buy or sell services for just about anything=20
> Open Source.
> http://sourceforge.net/services/buy/index.php
> _______________________________________________
> 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
This message contains confidential information and is intended only
for the individual named. If you are not the named addressee you
should not disseminate, distribute or copy this e-mail. Please
notify the sender immediately by e-mail if you have received this
e-mail by mistake and delete this e-mail from your system and destroy
any copies thereof.
E-mail transmission cannot be guaranteed to be secure or error-free
as information could be intercepted, corrupted, lost, destroyed,
arrive late or incomplete, or contain viruses. The sender therefore
does not accept liability for any errors or omissions in the contents
of this message which arise as a result of e-mail transmission. If
verification is required please request a hard-copy version. This
message is provided for informational purposes and should not be
construed as a solicitation or offer to buy or sell any securities or
related financial instruments.
|
|
From: Michael D. <md...@st...> - 2007-12-11 16:03:17
|
The patch for r4633 is pretty simple, so you could test it without
needing to check out from SVN or build your own matplotlib etc.
Open the file "font_manager.py", which should live in
"%PYTHONPATH%/Lib/site-packages/matplotlib". Around line 681, you'll
find the function:
def __hash__(self):
return hash(repr(self.__props))
Change it to:
def __hash__(self):
return hash(repr(self.__props.__dict__))
(Obviously, back up the file first...)
Then try your script again. If that doesn't work, I'll have to fire up
Windows some time to have a look -- I'm not able to reproduce this bug
on Linux.
Cheers,
Mike
Bri...@ub... wrote:
>> I believe this is a known bug with 0.90.1. Are you able to run
> 0.91.1?
>
>
> I just upgraded and checked -- the bug still exists in 0.91.1. I'm
> afraid I don't know whether it has been fixed by r4633 or not.
>
> Best,
> Brian
>
>
> Bri...@ub... wrote:
>> I'm doing a parameter fitting exercise, and plotting the progress as I
>
>> do so. I have found that repeated calls to set_text() on a text
>> object will result in an error opening a font file iff the text uses
>> TeX formatting. (I am not using the experimental usetex feature).
>>
>> I speculate that matplotlib is opening the font file anew with each
>> call to set_text and never closing it, resulting ultimately in having
>> too many files open. Here is a brief program to reproduce this
>> behavior (WinXP, Py2.5, matplotlib 0.90.1):
>>
>>
>> from pylab import figure, axes, draw, ion from numpy import array,
>> cos, abs
>> ion()
>> fig=figure()
>> axs=axes()
>> x=array(range(100))/10.0
>> cosPlot=axs.plot( x, cos(x)**2, 'r' )
>> powText = axs.text(0.9,0.02,r'$\alpha=$',
>>
> horizontalalignment='left',verticalalignment='bottom',
>> transform = axs.transAxes)
>> draw()
>> for alpha in array(range(10,400))/100.0:
>> axs.lines[-1].set_ydata( abs(cos(x))**alpha)
>> powText.set_text(r'$\alpha=%.4g$'%alpha)
>> print alpha
>> draw()
>>
>>
>>
>>
>>
>> Traceback (most recent call last):
>> File "delme.py", line 16, in <module>
>> File
>> "C:\Python25\Lib\site-packages\matplotlib-0.90.1-py2.5-win32.egg\matpl
>> otlib\pylab.py",
>> line 754, in draw
>> File
>> "C:\Python25\Lib\site-packages\matplotlib-0.90.1-py2.5-win32.egg\matpl
>> otlib\backends\backend_tkagg.py",
>> line 154, in draw
>>
>> File
>> "C:\Python25\Lib\site-packages\matplotlib-0.90.1-py2.5-win32.egg\matpl
>> otlib\backends\backend_agg.py",
>> line 392, in draw
>>
>> File
>> "C:\Python25\Lib\site-packages\matplotlib-0.90.1-py2.5-win32.egg\matpl
>> otlib\figure.py",
>> line 601, in draw
>> File
>> "C:\Python25\Lib\site-packages\matplotlib-0.90.1-py2.5-win32.egg\matpl
>> otlib\axes.py",
>> line 1286, in draw
>> File
>> "C:\Python25\Lib\site-packages\matplotlib-0.90.1-py2.5-win32.egg\matpl
>> otlib\text.py",
>> line 410, in draw
>> File
>> "C:\Python25\Lib\site-packages\matplotlib-0.90.1-py2.5-win32.egg\matpl
>> otlib\text.py",
>> line 255, in _get_layout
>> File
>> "C:\Python25\Lib\site-packages\matplotlib-0.90.1-py2.5-win32.egg\matpl
>> otlib\backends\backend_agg.py",
>> line 246, in get_text_width_height
>>
>> File
>> "C:\Python25\Lib\site-packages\matplotlib-0.90.1-py2.5-win32.egg\matpl
>> otlib\mathtext.py",
>> line 1569, in __call__
>> File
>> "C:\Python25\Lib\site-packages\matplotlib-0.90.1-py2.5-win32.egg\matpl
>> otlib\mathtext.py",
>> line 578, in __init__
>> RuntimeError: Could not open facefile
>> c:\Python25\lib\site-packages\matplotlib-0.90.1-py2.5-win32.egg\matplo
>> tlib\mpl-data\fonts\ttf\cmtt10.ttf;
>> Cannot_Open_Resource
>>
>>
>> ----------------------------------------------------------------------
>> --
>>
>> ----------------------------------------------------------------------
>> ---
>> SF.Net email is sponsored by:
>> Check out the new SourceForge.net Marketplace.
>> It's the best place to buy or sell services for just about anything
>> Open Source.
>> http://sourceforge.net/services/buy/index.php
>>
>>
>> ----------------------------------------------------------------------
>> --
>>
>> _______________________________________________
>> 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
>
> This message contains confidential information and is intended only
> for the individual named. If you are not the named addressee you
> should not disseminate, distribute or copy this e-mail. Please
> notify the sender immediately by e-mail if you have received this
> e-mail by mistake and delete this e-mail from your system and destroy
> any copies thereof.
>
> E-mail transmission cannot be guaranteed to be secure or error-free
> as information could be intercepted, corrupted, lost, destroyed,
> arrive late or incomplete, or contain viruses. The sender therefore
> does not accept liability for any errors or omissions in the contents
> of this message which arise as a result of e-mail transmission. If
> verification is required please request a hard-copy version. This
> message is provided for informational purposes and should not be
> construed as a solicitation or offer to buy or sell any securities or
> related financial instruments.
>
>
>
> -------------------------------------------------------------------------
> SF.Net email is sponsored by:
> Check out the new SourceForge.net Marketplace.
> It's the best place to buy or sell services for
> just about anything Open Source.
> http://sourceforge.net/services/buy/index.php
> _______________________________________________
> 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
|
|
From: <Bri...@ub...> - 2007-12-11 15:40:58
|
> I believe this is a known bug with 0.90.1. Are you able to run 0.91.1? I just upgraded and checked -- the bug still exists in 0.91.1. I'm afraid I don't know whether it has been fixed by r4633 or not. Best, Brian=20 Bri...@ub... wrote: > I'm doing a parameter fitting exercise, and plotting the progress as I > do so. I have found that repeated calls to set_text() on a text=20 > object will result in an error opening a font file iff the text uses=20 > TeX formatting. (I am not using the experimental usetex feature). >=20 > I speculate that matplotlib is opening the font file anew with each=20 > call to set_text and never closing it, resulting ultimately in having=20 > too many files open. Here is a brief program to reproduce this=20 > behavior (WinXP, Py2.5, matplotlib 0.90.1): >=20 >=20 > from pylab import figure, axes, draw, ion from numpy import array,=20 > cos, abs > ion() > fig=3Dfigure() > axs=3Daxes() > x=3Darray(range(100))/10.0 > cosPlot=3Daxs.plot( x, cos(x)**2, 'r' ) > powText =3D axs.text(0.9,0.02,r'$\alpha=3D$', > horizontalalignment=3D'left',verticalalignment=3D'bottom', > transform =3D axs.transAxes) > draw() > for alpha in array(range(10,400))/100.0: > axs.lines[-1].set_ydata( abs(cos(x))**alpha) > powText.set_text(r'$\alpha=3D%.4g$'%alpha) > print alpha > draw() > =20 >=20 >=20 >=20 >=20 > Traceback (most recent call last): > File "delme.py", line 16, in <module> > File > "C:\Python25\Lib\site-packages\matplotlib-0.90.1-py2.5-win32.egg\matpl > otlib\pylab.py", > line 754, in draw > File > "C:\Python25\Lib\site-packages\matplotlib-0.90.1-py2.5-win32.egg\matpl > otlib\backends\backend_tkagg.py", > line 154, in draw >=20 > File > "C:\Python25\Lib\site-packages\matplotlib-0.90.1-py2.5-win32.egg\matpl > otlib\backends\backend_agg.py", > line 392, in draw >=20 > File > "C:\Python25\Lib\site-packages\matplotlib-0.90.1-py2.5-win32.egg\matpl > otlib\figure.py", > line 601, in draw > File > "C:\Python25\Lib\site-packages\matplotlib-0.90.1-py2.5-win32.egg\matpl > otlib\axes.py", > line 1286, in draw > File > "C:\Python25\Lib\site-packages\matplotlib-0.90.1-py2.5-win32.egg\matpl > otlib\text.py", > line 410, in draw > File > "C:\Python25\Lib\site-packages\matplotlib-0.90.1-py2.5-win32.egg\matpl > otlib\text.py", > line 255, in _get_layout > File > "C:\Python25\Lib\site-packages\matplotlib-0.90.1-py2.5-win32.egg\matpl > otlib\backends\backend_agg.py", > line 246, in get_text_width_height >=20 > File > "C:\Python25\Lib\site-packages\matplotlib-0.90.1-py2.5-win32.egg\matpl > otlib\mathtext.py", > line 1569, in __call__ > File > "C:\Python25\Lib\site-packages\matplotlib-0.90.1-py2.5-win32.egg\matpl > otlib\mathtext.py", > line 578, in __init__ > RuntimeError: Could not open facefile=20 > c:\Python25\lib\site-packages\matplotlib-0.90.1-py2.5-win32.egg\matplo > tlib\mpl-data\fonts\ttf\cmtt10.ttf; > Cannot_Open_Resource >=20 >=20 > ---------------------------------------------------------------------- > -- >=20 > ---------------------------------------------------------------------- > --- > SF.Net email is sponsored by:=20 > Check out the new SourceForge.net Marketplace. > It's the best place to buy or sell services for just about anything=20 > Open Source. > http://sourceforge.net/services/buy/index.php >=20 >=20 > ---------------------------------------------------------------------- > -- >=20 > _______________________________________________ > 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 This message contains confidential information and is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system and destroy any copies thereof. E-mail transmission cannot be guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. The sender therefore does not accept liability for any errors or omissions in the contents of this message which arise as a result of e-mail transmission. If verification is required please request a hard-copy version. This message is provided for informational purposes and should not be construed as a solicitation or offer to buy or sell any securities or related financial instruments. |
|
From: Michael D. <md...@st...> - 2007-12-11 14:34:34
|
This bug is that many font files were being opened than needed, but they were still all getting closed. Much earlier, someone else fixed a bug where they weren't getting closed at all. http://sourceforge.net/tracker/index.php?func=detail&aid=1695171&group_id=80706&atid=560720 http://sourceforge.net/tracker/index.php?func=detail&aid=1715662&group_id=80706&atid=560720 Cheers, Mike John Hunter wrote: > On Dec 11, 2007 8:17 AM, Michael Droettboom <md...@st...> wrote: >> I believe this is a known bug with 0.90.1. Are you able to run 0.91.1? > > If I am reading this right, according to the svn log, you fixed this in > > r4633 | mdboom | 2007-12-05 14:28:28 -0600 (Wed, 05 Dec 2007) | 2 lines > > Fix bug where font files were opened many more times than they need to be. > > and 0.91.1 was released at r4517. So this fix may not be out until > the 0.91.2 point release. Or were you referring to a different fix? > > JDH -- Michael Droettboom Science Software Branch Operations and Engineering Division Space Telescope Science Institute Operated by AURA for NASA |
|
From: John H. <jd...@gm...> - 2007-12-11 14:25:13
|
On Dec 11, 2007 8:17 AM, Michael Droettboom <md...@st...> wrote: > I believe this is a known bug with 0.90.1. Are you able to run 0.91.1? If I am reading this right, according to the svn log, you fixed this in r4633 | mdboom | 2007-12-05 14:28:28 -0600 (Wed, 05 Dec 2007) | 2 lines Fix bug where font files were opened many more times than they need to be. and 0.91.1 was released at r4517. So this fix may not be out until the 0.91.2 point release. Or were you referring to a different fix? JDH |
|
From: Michael D. <md...@st...> - 2007-12-11 14:17:56
|
I believe this is a known bug with 0.90.1. Are you able to run 0.91.1? Cheers, Mike Bri...@ub... wrote: > I'm doing a parameter fitting exercise, and plotting the progress as I > do so. I have found that repeated calls to set_text() on a text object > will result in an error opening a font file iff the text uses TeX > formatting. (I am not using the experimental usetex feature). > > I speculate that matplotlib is opening the font file anew with each call > to set_text and never closing it, resulting ultimately in having too > many files open. Here is a brief program to reproduce this behavior > (WinXP, Py2.5, matplotlib 0.90.1): > > > from pylab import figure, axes, draw, ion > from numpy import array, cos, abs > ion() > fig=figure() > axs=axes() > x=array(range(100))/10.0 > cosPlot=axs.plot( x, cos(x)**2, 'r' ) > powText = axs.text(0.9,0.02,r'$\alpha=$', > horizontalalignment='left',verticalalignment='bottom', > transform = axs.transAxes) > draw() > for alpha in array(range(10,400))/100.0: > axs.lines[-1].set_ydata( abs(cos(x))**alpha) > powText.set_text(r'$\alpha=%.4g$'%alpha) > print alpha > draw() > > > > > > Traceback (most recent call last): > File "delme.py", line 16, in <module> > File > "C:\Python25\Lib\site-packages\matplotlib-0.90.1-py2.5-win32.egg\matplotlib\pylab.py", > line 754, in draw > File > "C:\Python25\Lib\site-packages\matplotlib-0.90.1-py2.5-win32.egg\matplotlib\backends\backend_tkagg.py", > line 154, in draw > > File > "C:\Python25\Lib\site-packages\matplotlib-0.90.1-py2.5-win32.egg\matplotlib\backends\backend_agg.py", > line 392, in draw > > File > "C:\Python25\Lib\site-packages\matplotlib-0.90.1-py2.5-win32.egg\matplotlib\figure.py", > line 601, in draw > File > "C:\Python25\Lib\site-packages\matplotlib-0.90.1-py2.5-win32.egg\matplotlib\axes.py", > line 1286, in draw > File > "C:\Python25\Lib\site-packages\matplotlib-0.90.1-py2.5-win32.egg\matplotlib\text.py", > line 410, in draw > File > "C:\Python25\Lib\site-packages\matplotlib-0.90.1-py2.5-win32.egg\matplotlib\text.py", > line 255, in _get_layout > File > "C:\Python25\Lib\site-packages\matplotlib-0.90.1-py2.5-win32.egg\matplotlib\backends\backend_agg.py", > line 246, in get_text_width_height > > File > "C:\Python25\Lib\site-packages\matplotlib-0.90.1-py2.5-win32.egg\matplotlib\mathtext.py", > line 1569, in __call__ > File > "C:\Python25\Lib\site-packages\matplotlib-0.90.1-py2.5-win32.egg\matplotlib\mathtext.py", > line 578, in __init__ > RuntimeError: Could not open facefile > c:\Python25\lib\site-packages\matplotlib-0.90.1-py2.5-win32.egg\matplotlib\mpl-data\fonts\ttf\cmtt10.ttf; > Cannot_Open_Resource > > > ------------------------------------------------------------------------ > > ------------------------------------------------------------------------- > SF.Net email is sponsored by: > Check out the new SourceForge.net Marketplace. > It's the best place to buy or sell services for > just about anything Open Source. > http://sourceforge.net/services/buy/index.php > > > ------------------------------------------------------------------------ > > _______________________________________________ > 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 |
|
From: <Bri...@ub...> - 2007-12-11 14:05:24
|
This message contains confidential information and is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system and destroy any copies thereof. E-mail transmission cannot be guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. The sender therefore does not accept liability for any errors or omissions in the contents of this message which arise as a result of e-mail transmission. If verification is required please request a hard-copy version. This message is provided for informational purposes and should not be construed as a solicitation or offer to buy or sell any securities or related financial instruments. |
|
From: John H. <jd...@gm...> - 2007-12-11 13:16:12
|
On Dec 11, 2007 6:00 AM, Emmanuel <emm...@fa...> wrote: > Hi, > > I've a little problem with date conversion. I have a csv file which looks > like : > "Data","Valor" > "15/01/2007"," 6,700012000" > "12/01/2007"," 6,659903000" > > "11/01/2007"," 6,701586000" > > I try to get date using function strpdate2num in load doing this : Try stripping the double quote characters from you file. JDH |
|
From: Michael D. <md...@st...> - 2007-12-11 13:14:37
|
You can just pass a path to savefig, e.g.:
savefig("/home/me/test.png")
(The format is automatically determined from the extension). If you
want to know which formats are supported by which backends, you can have
a look at FILETYPES in the source tree here:
http://matplotlib.svn.sourceforge.net/viewvc/matplotlib/trunk/matplotlib/FILETYPES?view=markup
Many of the examples for matplotlib have savefig, but the line is
usually commented out. Just remove the '#' and you have lots of examples.
Cheers,
Mike
Takashi Yamamoto wrote:
> Hi,
>
> I have recently come across Matplotlib and I am very impressed with its
> capabilities. I am new to both Matplotlib and Python, although I have
> several years experience with C++ and a few other languages *(including
> modelling with MatLab).
>
> I have successfully embedded Python in a C++ application, and can run
> python scripts from my C++ application. However, I have found displaying
> graphs in a GUI fraught with (insurmountable?) problems and I have
> decided to NOT use a GUI at all, but rather, to save plots as image, to
> file (e.g. png, gif or jpeg).
>
> Can anyone give me a simple example script that shows how I may use
> *savefig*(), to save a plot as an image (any of the above formats), to file?
>
> Thanks
>
> ------------------------------------------------------------------------
> Connect to the next generation of MSN Messenger Get it now!
> <http://imagine-msn.com/messenger/launch80/default.aspx?locale=en-us&source=wlmailtagline>
>
>
> ------------------------------------------------------------------------
>
> -------------------------------------------------------------------------
> SF.Net email is sponsored by:
> Check out the new SourceForge.net Marketplace.
> It's the best place to buy or sell services for
> just about anything Open Source.
> http://sourceforge.net/services/buy/index.php
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> 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
|
|
From: Emmanuel <emm...@fa...> - 2007-12-11 12:00:41
|
Hi,
I've a little problem with date conversion. I have a csv file which looks
like :
"Data","Valor"
"15/01/2007"," 6,700012000"
"12/01/2007"," 6,659903000"
"11/01/2007"," 6,701586000"
I try to get date using function strpdate2num in load doing this :
from pylab import datestr2num, load
def comma_nb2float(A):
return eval(A.replace(',','.'))
dates, valor =
load("file.csv",delimiter=',',converters={0:strpdate2num('%d/%m/%Y'),1:comma_nb2float},skiprows=1,
usecols=(0,1),unpack=True)
I got the following error message :
---------------------------------------------------------------------------
exceptions.ValueError Traceback (most recent
call last)
/home/manu/Documents/Perso/....../<ipython console>
/usr/lib/python2.4/site-packages/matplotlib/mlab.py in load(fname, comments,
delimiter, converters, skiprows, usecols, unpack)
1353 if usecols is not None:
1354 vals = line.split(delimiter)
-> 1355 row = [converterseq[j](vals[j]) for j in usecols]
1356 else:
1357 row = [converterseq[j](val) for j,val in
enumerate(line.split(delimiter))]
/usr/lib/python2.4/site-packages/matplotlib/dates.py in __call__(self, s)
182 return value: a date2num float
183 """
--> 184 return date2num(datetime.datetime(*time.strptime(s, self.fmt)
[:6]))
185
186 def datestr2num(d):
/usr/lib/python2.4/_strptime.py in strptime(data_string, format)
291 found = format_regex.match(data_string)
292 if not found:
--> 293 raise ValueError("time data did not match format: data=%s
fmt=%s" %
294 (data_string, format))
295 if len(data_string) != found.end():
ValueError: time data did not match format: data="15/01/2007" fmt=%d/%m/%Y
I didn't understood the problem, anyone can help me ?
|
|
From: Matthew A. <ma...@ph...> - 2007-12-11 11:28:19
|
I'm trying to plot a circle AND flip an axis of the plot, but this leads
to an inverted circle (diamond) being drawn. Is there any way to do this
'neatly' (besides, for example, manually editing the axis labels or using
a many-sided polygon to fake a circle)? Note that the circle renders
correctly with the PS backend.... Example code to reproduce the problem:
import pylab as p
x = p.rand(17)
y = p.rand(17)
p.scatter(x,y)
p.gca().add_patch(p.Circle((0.5,0.5),0.2,fill=False))
p.axis([0.,1.,1.,0.])
p.gca().set_aspect('equal')
p.show()
Thanks for any help!
Matt
|