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
(4) |
2
(20) |
3
(8) |
4
(10) |
5
(4) |
6
(8) |
7
(4) |
|
8
(9) |
9
(11) |
10
(12) |
11
(13) |
12
(3) |
13
(17) |
14
(4) |
|
15
|
16
(10) |
17
(9) |
18
(11) |
19
(4) |
20
(17) |
21
(6) |
|
22
(9) |
23
(35) |
24
(17) |
25
(9) |
26
(16) |
27
(17) |
28
(14) |
|
From: Sandro T. <mo...@de...> - 2009-02-11 18:56:33
|
Hello,
I got a script (attached, even if without the datafile has less
meaning) that parses a log file and plots 3 datasets. With 0.98.5.3 I
got this error
$ ./ddc_graph.py
Traceback (most recent call last):
File "./ddc_graph.py", line 39, in <module>
rc_plot = ax.plot_date(DATES, RC, '-')
File "/usr/lib/python2.5/site-packages/matplotlib/axes.py", line
3356, in plot_date
ret = self.plot(x, y, fmt, **kwargs)
File "/usr/lib/python2.5/site-packages/matplotlib/axes.py", line 3288, in plot
for line in self._get_lines(*args, **kwargs):
File "/usr/lib/python2.5/site-packages/matplotlib/axes.py", line
401, in _grab_next_args
for seg in self._plot_3_args(remaining, **kwargs):
File "/usr/lib/python2.5/site-packages/matplotlib/axes.py", line
340, in _plot_3_args
x, y, multicol = self._xy_from_xy(x, y)
File "/usr/lib/python2.5/site-packages/matplotlib/axes.py", line
215, in _xy_from_xy
by = self.axes.yaxis.update_units(y)
File "/usr/lib/python2.5/site-packages/matplotlib/axis.py", line
939, in update_units
converter = munits.registry.get_converter(data)
File "/usr/lib/python2.5/site-packages/matplotlib/units.py", line
137, in get_converter
converter = self.get_converter( thisx )
...
File "/usr/lib/python2.5/site-packages/matplotlib/units.py", line
137, in get_converter
converter = self.get_converter( thisx )
File "/usr/lib/python2.5/site-packages/matplotlib/units.py", line
130, in get_converter
if converter is None and iterable(x):
RuntimeError: maximum recursion depth exceeded
I see the same behavior in .2 but not in 0.98.5. I remembered I've
copied this from an example in mpl doc, but that's all.
Is that a regression or something wrong in the code?
Thanks,
--
Sandro Tosi (aka morph, morpheus, matrixhasu)
My website: http://matrixhasu.altervista.org/
Me at Debian: http://wiki.debian.org/SandroTosi
|
|
From: collern2 <noe...@gm...> - 2009-02-11 17:39:01
|
Hi, I've managed to take the contents of my CSV file and display it with matplotlib. I'm having some issues with the way my X-axis is being displayed. For the X-axis, I pass in a list that filled with datetime objects, an example of one element on the list: datetime.datetime(2007, 12, 17, 20, 28, 15), Issues (please see the attached cpu.png: - for some reason a TZ has been inserted - graphs have white space buffers on either side of the X-axix - points on X-axis are separated by the hour, instead of values in datetime object I have tried many variations of plotdate, etc. If someone could please point me in the right direction. Thanks ================= Code http://www.nabble.com/file/p21958283/cpu.png ================= #!/usr/bin/env python import csv import sys import matplotlib.pyplot as plt import datetime new_list = [] time = [] cpu = [] fileReader = csv.reader(open("sample.csv", "rb")) for row in fileReader: new_list.append(row) # Converts papatimes time format into dattime def time_split(current_line): # splits papastats datetime format in useable python list dt = datetime.datetime.strptime(current_line[0],"%Y/%m/%d %H:%M:%S") time.append(dt) def cpu_calc(current_line): cpu.append(current_line[11].rstrip("%")) #Iterate over list of CSV values for i in new_list[1:]: time_split(i) cpu_calc(i) plt.plot(time, cpu, 'b-') #plt.plot_date(time, cpu, fmt='b-', xdate=False, ydate=False, tz=None) plt.xlabel('Time') plt.ylabel('CPU %') plt.title('Daily CPU Usage') plt.grid(True) plt.grid(alpha=0.2, color='black', linestyle='-', linewidth=0.1) plt.show() -- View this message in context: http://www.nabble.com/Issues-with-time-display-tp21958283p21958283.html Sent from the matplotlib - users mailing list archive at Nabble.com. |
|
From: Gideon S. <si...@ma...> - 2009-02-11 17:01:36
|
command-w does not seem to close the window. -gideon |
|
From: A B <pyt...@gm...> - 2009-02-11 04:17:34
|
Hi,
I have the following code and am wondering whether there is a more
efficient way to plot multiple curves. Maybe somehow accumulating the
data into a single variable, then calling plot once ... Thanks for any
ideas.
for ofile in files:
d = mlab.csv2rec(ofile, names = ['date','field'])
ax.plot(d['date'], d['field'])
|
|
From: A B <pyt...@gm...> - 2009-02-11 04:12:17
|
On Mon, Feb 9, 2009 at 9:59 PM, Jouni K. Seppänen <jk...@ik...> wrote: > Ryan May <rm...@gm...> writes: > > > On Mon, Feb 9, 2009 at 2:37 PM, A B <pyt...@gm...> wrote: > > > > If you're using the full OO interface and creating a figure by making an > > instance of Figure(), then you shouldn't need to close the figure by > hand. > > It should be deleted whenever you delete or replace your instance of > > Figure. (If I understand correctly.) > > Yes, in the OO interface there is no close() because matplotlib does not > retain any references to the figure object. Garbage collection will take > care of reclaiming memory once the user code has no more references to > the object either. > > That said, there have been cases of memory leaks caused by circular > references among objects that have __del__ methods. I think all known > leaks have been fixed, but if I were deploying a long-lived application > that creates lots of figures, I would definitely want to watch its > memory usage in my exact use case. > > -- > Jouni K. Seppänen > http://www.iki.fi/jks > Thank you. The reason I asked the question was that with the OO interface, I still observed growth in memory consumption (more than I saw after I added pyplot.close() calls). However, at some point (90M which I still think is a lot) the growth tapered off and eventually seemed to have stopped. Essentially, what I do is create a figure, then call plot() on it in a loop to generate multiple curves, then print_png() on the canvas object. |
|
From: Robert K. <rob...@gm...> - 2009-02-10 22:58:02
|
On 2009-02-10 16:50, Gustavo Blando wrote: > Awesome Robert, thanks. > Here is the Python path. > > C:\Python25\Lib\site-packages\numpy;C:\Python25\Lib\site-packages\matplotlib;C:\Python25\Lib\site-packages\scipy;C:\Python25\Lib\site-packages\pyreadline;C:\Python25\Lib\site-packages;C:\StatEye\v5_2;C:\Python25\Lib\site-packages\numpy;C:\Python25\Lib\site-packages\matplotlib;C:\Python25\Lib\site-packages\scipy;C:\Python25\Lib\site-packages\pyreadline;C:\Python25\Lib\site-packages\numpy;C:\Python25\Lib\site-packages\matplotlib;C:\Python25\Lib\site-packages\scipy;C:\Python25\Lib\site-packages\pyreadline;C:\Python25\Lib\site-packages Okay, none of that is necessary except for C:\StatEye\v5_2 . site-packages will already be on your sys.path, so putting it on the PYTHONPATH is unnecessary. The package directories like numpy and matplotlib definitely should *not* be on your PYTHONPATH or sys.path. It is the directory that *contains* your packages that needs to be on the sys.path; but as I already noted, site-packages is built in, so you don't need to add it yourself. -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth." -- Umberto Eco |
|
From: Gustavo B. <Gus...@Su...> - 2009-02-10 22:51:23
|
Awesome Robert, thanks. Here is the Python path. C:\Python25\Lib\site-packages\numpy;C:\Python25\Lib\site-packages\matplotlib;C:\Python25\Lib\site-packages\scipy;C:\Python25\Lib\site-packages\pyreadline;C:\Python25\Lib\site-packages;C:\StatEye\v5_2;C:\Python25\Lib\site-packages\numpy;C:\Python25\Lib\site-packages\matplotlib;C:\Python25\Lib\site-packages\scipy;C:\Python25\Lib\site-packages\pyreadline;C:\Python25\Lib\site-packages\numpy;C:\Python25\Lib\site-packages\matplotlib;C:\Python25\Lib\site-packages\scipy;C:\Python25\Lib\site-packages\pyreadline;C:\Python25\Lib\site-packages Thanks Gus Robert Kern wrote: > On 2009-02-10 15:26, Gustavo Blando wrote: > >> Hi, I am new to Python, and I am trying to install the matplotlib but it is >> >>> not working. >>> I would appreciate your help. >>> >> I am using Python with the PythonWin environment. >> I have created a PYTHONPATH on my environment variables to make >> sure I point to all the libraries. >> I have installed the numpy, scipy and other libraries that seems >> to work just fine. >> >> BUT when I try to load the matplotlib, this is what I get: >> >> >>> ERROR: >>> ====== >>> from matplotlib import * >>> Traceback (most recent call last): >>> File "<interactive input>", line 1, in<module> >>> File "C:\Python25\Lib\site-packages\matplotlib\__init__.py", line 97, in >>> <module> >>> import distutils.sysconfig >>> File "C:\Python25\Lib\site-packages\numpy\distutils\__init__.py", line 6, >>> in<module> >>> import ccompiler >>> File "C:\Python25\Lib\site-packages\numpy\distutils\ccompiler.py", line 7, >>> in<module> >>> from distutils import ccompiler >>> ImportError: cannot import name ccompiler >>> >>> - It's having a problem with ccompiler, but ccompiler.py is on that >>> directory. >>> > > It looks like you have a problem with your PYTHONPATH. You shouldn't have > c:\Python25\Lib\site-packages\numpy\ on your PYTHONPATH. Show me your > PYTHONPATH, and I can point out what else is wrong. > > |
|
From: Robert K. <rob...@gm...> - 2009-02-10 22:45:22
|
On 2009-02-10 15:26, Gustavo Blando wrote: > Hi, I am new to Python, and I am trying to install the matplotlib but it is >> not working. >> I would appreciate your help. > I am using Python with the PythonWin environment. > I have created a PYTHONPATH on my environment variables to make > sure I point to all the libraries. > I have installed the numpy, scipy and other libraries that seems > to work just fine. > > BUT when I try to load the matplotlib, this is what I get: > >> ERROR: >> ====== >> from matplotlib import * >> Traceback (most recent call last): >> File "<interactive input>", line 1, in<module> >> File "C:\Python25\Lib\site-packages\matplotlib\__init__.py", line 97, in >> <module> >> import distutils.sysconfig >> File "C:\Python25\Lib\site-packages\numpy\distutils\__init__.py", line 6, >> in<module> >> import ccompiler >> File "C:\Python25\Lib\site-packages\numpy\distutils\ccompiler.py", line 7, >> in<module> >> from distutils import ccompiler >> ImportError: cannot import name ccompiler > >> - It's having a problem with ccompiler, but ccompiler.py is on that >> directory. It looks like you have a problem with your PYTHONPATH. You shouldn't have c:\Python25\Lib\site-packages\numpy\ on your PYTHONPATH. Show me your PYTHONPATH, and I can point out what else is wrong. -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth." -- Umberto Eco |
|
From: Gustavo B. <Gus...@Su...> - 2009-02-10 21:27:54
|
Hi, I am new to Python, and I am trying to install the matplotlib but it is > not working. > I would appreciate your help. I am using Python with the PythonWin environment. I have created a PYTHONPATH on my environment variables to make sure I point to all the libraries. I have installed the numpy, scipy and other libraries that seems to work just fine. BUT when I try to load the matplotlib, this is what I get: > > ERROR: > ====== > from matplotlib import * > Traceback (most recent call last): > File "<interactive input>", line 1, in <module> > File "C:\Python25\Lib\site-packages\matplotlib\__init__.py", line 97, in > <module> > import distutils.sysconfig > File "C:\Python25\Lib\site-packages\numpy\distutils\__init__.py", line 6, > in <module> > import ccompiler > File "C:\Python25\Lib\site-packages\numpy\distutils\ccompiler.py", line 7, > in <module> > from distutils import ccompiler > ImportError: cannot import name ccompiler > - It's having a problem with ccompiler, but ccompiler.py is on that > directory. > > Thanks in advance for your help. > Gus |
|
From: John H. <jd...@gm...> - 2009-02-10 14:05:45
|
On Tue, Feb 10, 2009 at 7:55 AM, Gerry Steele <ger...@gm...> wrote:
> Thanks Michael ,
>
> I had somehow put myself under the impression i was using he OO
> version of the api but it is much more clear now. Memory issues now
> look better.
There is room for confusion. A common usage pattern, one I often use
myself, is to use pyplot for figure creation, closing and showing
only, and to use the OO API for everything else. To whit:
import matplotlib.pyplot as plt
fig = plt.figure()
ax = fig.add_subplot(111)
ax.plot([1,2,3])
ax.set_xlabel('hi')
plt.show()
this contrasts with the pure pyplot approach, which uses the pyplot
state machine for everything (figure/axes creation, current axes, etc)
import matplotlib.pyplot as plt
plt.plot([1,2,3])
plt.xlabel('hi')
plt.show()
and both are different from the pure OO approach in which you manually
create the figure canvas etc
from matplotlib.backends.backend_agg import FigureCanvasAgg as FigureCanvas
from matplotlib.figure import Figure
fig = Figure()
canvas = FigureCanvas(fig)
ax = fig.add_subplot(111)
ax.plot([1,2,3])
ax.set_xlabel('hi')
Note that in the 3rd example, all the code is the same as the first
example, except the figure/canvas creation, which is why one might
call it "OO pyplot"
Eric has summarized some additional information about the different
usage modes here
http://matplotlib.sourceforge.net/faq/usage_faq.html#matplotlib-pylab-and-pyplot-how-are-they-related
JDH
|
|
From: Gerry S. <ger...@gm...> - 2009-02-10 13:55:17
|
Thanks Michael , I had somehow put myself under the impression i was using he OO version of the api but it is much more clear now. Memory issues now look better. Thanks. 2009/2/10 Michael Droettboom <md...@st...>: > This is an instance of the OP's problem again. Your example is using the > pyplot (i.e. Matlab-like) interface, in which case, you must explicitly > close each figure when you're done with it, like follows: > > plt.close(fig) > > "del fig" only deletes your local reference to the figure. There is still a > reference being held by the figure manager in case you wanted to go back to > an earlier figure (accessed by number) and edit it. This is essentially the > price paid for Matlab-work-a-likeness. > > I've tested your script on 0.98.3 (though on a RHEL4 system) and I don't see > any memory leaks after adding the call to "plt.close(fig)". > > If you instantiate the figure and canvas directly (as in the agg_oo.py > example), you won't have this issue. > > Mike > > Gerry Steele wrote: >>>> >>>> instance of Figure(), then you shouldn't need to close the figure by >>>> hand. >>>> It should be deleted whenever you delete or replace your instance of >>>> Figure. (If I understand correctly.) >>>> >> >> >>> >>> ... Garbage collection will take >>> care of reclaiming memory once the user code has no more references to >>> the object either. >>> >> >> >> I guess that is how it should work in theory. However at least for the >> version of mpl shipped with ubuntu 8.10 (Version: 0.98.3-4ubuntu1) >> there is surely quite a serious and easily demonstrated memory leak >> using the artist api. Even if you manually del the figure objects >> which are created inside a loop a significant growth of memory can be >> observed. In fact I think there may be two separate leaks. >> >> In the attatched standalone code example after 1000 iterations >> creating 1000 png graphs there is around 2GB of RAM consumed. If you >> takeout the call to savefig around 600MB is consumed. >> >> In my view the code in the loop should execute in constant space >> without growth at all. Note that when the function returns the memory >> seems to be deallocated so if you check the ram use during the sleep >> you should see this. >> >> Any ideas on this? >> >> >> >> ------------------------------------------------------------------------ >> >> >> ------------------------------------------------------------------------------ >> Create and Deploy Rich Internet Apps outside the browser with >> Adobe(R)AIR(TM) >> software. With Adobe AIR, Ajax developers can use existing skills and code >> to >> build responsive, highly engaging applications that combine the power of >> local >> resources and data with the reach of the web. Download the Adobe AIR SDK >> and >> Ajax docs to start building applications >> today-http://p.sf.net/sfu/adobe-com >> ------------------------------------------------------------------------ >> >> _______________________________________________ >> 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 > > -- Gerry Steele http://belfast.no-ip.info/ |
|
From: Michael D. <md...@st...> - 2009-02-10 13:25:03
|
This is an instance of the OP's problem again. Your example is using the pyplot (i.e. Matlab-like) interface, in which case, you must explicitly close each figure when you're done with it, like follows: plt.close(fig) "del fig" only deletes your local reference to the figure. There is still a reference being held by the figure manager in case you wanted to go back to an earlier figure (accessed by number) and edit it. This is essentially the price paid for Matlab-work-a-likeness. I've tested your script on 0.98.3 (though on a RHEL4 system) and I don't see any memory leaks after adding the call to "plt.close(fig)". If you instantiate the figure and canvas directly (as in the agg_oo.py example), you won't have this issue. Mike Gerry Steele wrote: >>> instance of Figure(), then you shouldn't need to close the figure by hand. >>> It should be deleted whenever you delete or replace your instance of >>> Figure. (If I understand correctly.) >>> > > >> ... Garbage collection will take >> care of reclaiming memory once the user code has no more references to >> the object either. >> > > > I guess that is how it should work in theory. However at least for the > version of mpl shipped with ubuntu 8.10 (Version: 0.98.3-4ubuntu1) > there is surely quite a serious and easily demonstrated memory leak > using the artist api. Even if you manually del the figure objects > which are created inside a loop a significant growth of memory can be > observed. In fact I think there may be two separate leaks. > > In the attatched standalone code example after 1000 iterations > creating 1000 png graphs there is around 2GB of RAM consumed. If you > takeout the call to savefig around 600MB is consumed. > > In my view the code in the loop should execute in constant space > without growth at all. Note that when the function returns the memory > seems to be deallocated so if you check the ram use during the sleep > you should see this. > > Any ideas on this? > > > > > ------------------------------------------------------------------------ > > ------------------------------------------------------------------------------ > Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM) > software. With Adobe AIR, Ajax developers can use existing skills and code to > build responsive, highly engaging applications that combine the power of local > resources and data with the reach of the web. Download the Adobe AIR SDK and > Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com > ------------------------------------------------------------------------ > > _______________________________________________ > 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: Stephane R. <ste...@gm...> - 2009-02-10 13:07:12
|
Hi Marjolaine, On Tue, Feb 10, 2009 at 12:31 PM, Marjolaine Rouault <mro...@cs...>wrote: > Hi, > > I am struggling to do a PCA analysis on a masked array. Anybody has > suggestions on how to deal with masked array when doing PCAs? You need to remove missing values at each time step. This means that your missing data are always at the same place. Maybe something like this can work : # Let's say we analyse myfullvar(nt,ny,nx) mask = myfullvar[0] ns = numpy.count(~mask) myvar = numpy.zeros(nt,ns) for it in xrange(nt): myvar[it] = myfullvar[it].compressed() # Then you make a PCA decomposition of myvar and you get back your EOFs myeofs(neof,ns) myfulleofs = numpy.ma.zeros(neof,ny,nx)+numpy.ma.masked for ieof in xrange(neof): myfulleofs[~mask.flat] = myeofs[ieof] > > Best regards, Marjolaine. > > > > -- > This message is subject to the CSIR's copyright terms and conditions, > e-mail legal notice, and implemented Open Document Format (ODF) standard. > The full disclaimer details can be found at > http://www.csir.co.za/disclaimer.html. > > This message has been scanned for viruses and dangerous content by > MailScanner, > and is believed to be clean. MailScanner thanks Transtec Computers for > their support. > > > > ------------------------------------------------------------------------------ > Create and Deploy Rich Internet Apps outside the browser with > Adobe(R)AIR(TM) > software. With Adobe AIR, Ajax developers can use existing skills and code > to > build responsive, highly engaging applications that combine the power of > local > resources and data with the reach of the web. Download the Adobe AIR SDK > and > Ajax docs to start building applications today- > http://p.sf.net/sfu/adobe-com > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > -- Stephane Raynaud |
|
From: Marjolaine R. <mro...@cs...> - 2009-02-10 12:40:37
|
Hi, I am struggling to do a PCA analysis on a masked array. Anybody has suggestions on how to deal with masked array when doing PCAs? Best regards, Marjolaine. -- This message is subject to the CSIR's copyright terms and conditions, e-mail legal notice, and implemented Open Document Format (ODF) standard. The full disclaimer details can be found at http://www.csir.co.za/disclaimer.html. This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. MailScanner thanks Transtec Computers for their support. |
|
From: Gerry S. <ger...@gm...> - 2009-02-10 12:40:36
|
>> instance of Figure(), then you shouldn't need to close the figure by hand. >> It should be deleted whenever you delete or replace your instance of >> Figure. (If I understand correctly.) >... Garbage collection will take > care of reclaiming memory once the user code has no more references to > the object either. I guess that is how it should work in theory. However at least for the version of mpl shipped with ubuntu 8.10 (Version: 0.98.3-4ubuntu1) there is surely quite a serious and easily demonstrated memory leak using the artist api. Even if you manually del the figure objects which are created inside a loop a significant growth of memory can be observed. In fact I think there may be two separate leaks. In the attatched standalone code example after 1000 iterations creating 1000 png graphs there is around 2GB of RAM consumed. If you takeout the call to savefig around 600MB is consumed. In my view the code in the loop should execute in constant space without growth at all. Note that when the function returns the memory seems to be deallocated so if you check the ram use during the sleep you should see this. Any ideas on this? -- Gerry Steele http://belfast.no-ip.info/ |
|
From: C M <cmp...@gm...> - 2009-02-10 07:46:12
|
Is it possible to set (and unset) the color of a single point on a line, or an individual bar in a bar chart? Thanks, Che |
|
From: Jouni K. S. <jk...@ik...> - 2009-02-10 05:59:29
|
Ryan May <rm...@gm...> writes: > On Mon, Feb 9, 2009 at 2:37 PM, A B <pyt...@gm...> wrote: > > If you're using the full OO interface and creating a figure by making an > instance of Figure(), then you shouldn't need to close the figure by hand. > It should be deleted whenever you delete or replace your instance of > Figure. (If I understand correctly.) Yes, in the OO interface there is no close() because matplotlib does not retain any references to the figure object. Garbage collection will take care of reclaiming memory once the user code has no more references to the object either. That said, there have been cases of memory leaks caused by circular references among objects that have __del__ methods. I think all known leaks have been fixed, but if I were deploying a long-lived application that creates lots of figures, I would definitely want to watch its memory usage in my exact use case. -- Jouni K. Seppänen http://www.iki.fi/jks |
|
From: Ryan M. <rm...@gm...> - 2009-02-09 22:54:28
|
On Mon, Feb 9, 2009 at 2:37 PM, A B <pyt...@gm...> wrote: > Thank you very much, Jouni. Pyplot.close() seems to have done the > trick. I followed your advice and converted my code to use the OO > interface. But I'm not sure how I close the figure in OO ... Any > pointers? Thanks. If you're using the full OO interface and creating a figure by making an instance of Figure(), then you shouldn't need to close the figure by hand. It should be deleted whenever you delete or replace your instance of Figure. (If I understand correctly.) Ryan -- Ryan May Graduate Research Assistant School of Meteorology University of Oklahoma |
|
From: Jeff W. <js...@fa...> - 2009-02-09 20:40:55
|
Mike wrote: > I needed to update my python interpreter to 64-bit recently on my > mac. I all my needed modules updated fine, including matplotlib, but > basemap gives me trouble: > > Python 2.6.1 (r261:67515, Jan 29 2009, 15:27:04) > [GCC 4.0.1 (Apple Inc. build 5465)] on darwin > Type "help", "copyright", "credits" or "license" for more information. > >>> import numpy > >>> import matplotlib > >>> from mpl_toolkits.basemap import Basemap > Traceback (most recent call last): > File "<stdin>", line 1, in <module> > File "/Library/Frameworks/Python64.framework/Versions/2.6/lib/ > python2.6/site-packages/mpl_toolkits/basemap/__init__.py", line 43, in > <module> > import _geoslib, netcdftime > ImportError: dlopen(/Library/Frameworks/Python64.framework/Versions/ > 2.6/lib/python2.6/site-packages/_geoslib.so, 2): Symbol not found: > _GEOSArea > Referenced from: /Library/Frameworks/Python64.framework/Versions/ > 2.6/lib/python2.6/site-packages/_geoslib.so > Expected in: dynamic lookup > >>> > > Looking at the install of basemap closely I noticed some errors that > make me wonder whether the geos libraries need to be compiled as 64- > bit to work? > Mike: Yes, I suspect that is the problem. Unfortunately, I've no idea how to fix that. Even if you get beyond that though - I think you are going to run into problems with basemap/geos using python 2.6 and numpy 1.2.1. I've been waiting for a numpy 1.3 release that fully supports python 2.6 before digging into this. -Jeff > ld: warning in /usr/local/lib/libgeos_c.dylib, file is not of > required architecture > ld: warning in /usr/local/lib/libgeos.dylib, file is notld: warning > in /usr/local/lib/libgeos_c.dylib, file is not of require > d architecture > ld: warning in /usr/local/lib/libgeos.dylib, file is not of required > architecture > of required architecture > ld: warning in /usr/local/lib/libgeos_c.dylib, file is not of > required architecture > ld: warning in /usr/local/lib/libgeos.dylib, file is not of required > architecture > > As always, any help is much appreciated. > > Mike > > P.S. Both matplotlib and basemap are from today's svn. > > > > ------------------------------------------------------------------------------ > Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM) > software. With Adobe AIR, Ajax developers can use existing skills and code to > build responsive, highly engaging applications that combine the power of local > resources and data with the reach of the web. Download the Adobe AIR SDK and > Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > -- 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-113 Boulder, CO, USA 80303-3328 Web : http://tinyurl.com/5telg |
|
From: A B <pyt...@gm...> - 2009-02-09 20:37:12
|
Thank you very much, Jouni. Pyplot.close() seems to have done the trick. I followed your advice and converted my code to use the OO interface. But I'm not sure how I close the figure in OO ... Any pointers? Thanks. |
|
From: Mike <oht...@ma...> - 2009-02-09 20:32:23
|
I needed to update my python interpreter to 64-bit recently on my
mac. I all my needed modules updated fine, including matplotlib, but
basemap gives me trouble:
Python 2.6.1 (r261:67515, Jan 29 2009, 15:27:04)
[GCC 4.0.1 (Apple Inc. build 5465)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import numpy
>>> import matplotlib
>>> from mpl_toolkits.basemap import Basemap
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Library/Frameworks/Python64.framework/Versions/2.6/lib/
python2.6/site-packages/mpl_toolkits/basemap/__init__.py", line 43, in
<module>
import _geoslib, netcdftime
ImportError: dlopen(/Library/Frameworks/Python64.framework/Versions/
2.6/lib/python2.6/site-packages/_geoslib.so, 2): Symbol not found:
_GEOSArea
Referenced from: /Library/Frameworks/Python64.framework/Versions/
2.6/lib/python2.6/site-packages/_geoslib.so
Expected in: dynamic lookup
>>>
Looking at the install of basemap closely I noticed some errors that
make me wonder whether the geos libraries need to be compiled as 64-
bit to work?
ld: warning in /usr/local/lib/libgeos_c.dylib, file is not of
required architecture
ld: warning in /usr/local/lib/libgeos.dylib, file is notld: warning
in /usr/local/lib/libgeos_c.dylib, file is not of require
d architecture
ld: warning in /usr/local/lib/libgeos.dylib, file is not of required
architecture
of required architecture
ld: warning in /usr/local/lib/libgeos_c.dylib, file is not of
required architecture
ld: warning in /usr/local/lib/libgeos.dylib, file is not of required
architecture
As always, any help is much appreciated.
Mike
P.S. Both matplotlib and basemap are from today's svn.
|
|
From: Michael D. <md...@st...> - 2009-02-09 13:07:23
|
matplotlib is inconsistent in its treatment of rcParams. Some have
immediate side effects, others are cached during initialization and
changing them later has no effect. This is a long standing problem, but
not one with an easy solution, since the caching, particularly in the
case of font lookup, is an important optimization.
Personally, I feel that rcParams should be primarily for environmental
settings, and thus should not be updatable after initialization -- but
that's only my opinion -- I have heard the opposite argued rather
convincingly. In my opinion, it is the inconsistency between rcParams
(or lack of documentation about when they are effective) that is worth
addressing.
In your particular case, there is an easy non-rcParam alternative --
just send text parameters to the title command.
Mike
Leo Trottier wrote:
> Hi,
>
> Did anyone have any insight on this? Alternatively, anyone know why
> there has been little uptake on this question ...(apologies that it
> was accidentally sent twice)?
>
> Leo
>
> On Tue, Feb 3, 2009 at 11:42 PM, Leo Trottier <le...@co...
> <mailto:le...@co...>> wrote:
>
> Matplotlib 0.98.5.2
> Location: C:\leo\.matplotlib
> Running Windows XP SP2
> Obtained from pythonxy v. 2.1.10
> No rc customizations ...
>
> I've been having a devil of a time getting my rcParams to update
> mid-script. Perhaps this isn't possible, but if that's so, it's
> not entirely clear. Even if it is so, this is seemingly a defect,
> because in an interactive session one expects quite different
> behavior (and no amount of iPython %reset-ing seems to be able to
> help).
>
> Note that manually setting the font (or what have you) in *title*
> works fine.
>
> Here is some example code:
>
> ############## BEGIN #########
> import matplotlib
> from matplotlib import rc, rcParams, rcdefaults
> from matplotlib.pyplot import plot, show, figure, title
>
> print matplotlib.__version__
> print matplotlib.get_configdir()
> print
> print "rcParams['font.sans-serif']:", rcParams['font.sans-serif']
> print 'family is:', rcParams['font.family']
> print
> figure(4)
> title('This should be in a sans-serif font')
> show()
>
> rcParams['font.sans-serif'] = rcParams['font.monospace']
> print "rcParams['font.sans-serif']:", rcParams['font.sans-serif']
> print 'family is:', rcParams['font.family']
> print
> figure(1)
> title('This should be in a monospace font')
> show()
>
> rcParams['font.sans-serif'] = rcParams['font.serif']
> print "rcParams['font.sans-serif']:", rcParams['font.sans-serif']
> print 'family is:', rcParams['font.family']
> print
> figure(2)
> title('This should be in a serif font')
> show()
>
> rcdefaults()
> print "rcParams['font.sans-serif']:", rcParams['font.sans-serif']
> print 'family is:', rcParams['font.family']
> print
> figure(3)
> title('This should be back to a sans-serif font')
> show()
> ######### END ####################
>
>
> ------------------------------------------------------------------------
>
> ------------------------------------------------------------------------------
> Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM)
> software. With Adobe AIR, Ajax developers can use existing skills and code to
> build responsive, highly engaging applications that combine the power of local
> resources and data with the reach of the web. Download the Adobe AIR SDK and
> Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com
> ------------------------------------------------------------------------
>
> _______________________________________________
> 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: Sandro T. <mo...@de...> - 2009-02-09 10:30:17
|
Hi John, thanks for the heads up:) On Sun, Feb 8, 2009 at 21:46, John Hunter <jd...@gm...> wrote: > We have accumulated a number of bug fixes in our stable release > branch, so I would like to release the 3rd bugfix release. Please > test and report any problems > > http://matplotlib.sourceforge.net/release-candidates/matplotlib-0.98.5.3.tar.gz I just built mpl on Debian, and the easy test works fine: $ python -c "import matplotlib ; print matplotlib.__version__" 0.98.5.3 There are some warnings/errors during docs creation, I'll try to debug them (but I can assure I'll due in few hours/days); if needed I can provided the (long) build log :) Cheers, -- Sandro Tosi (aka morph, morpheus, matrixhasu) My website: http://matrixhasu.altervista.org/ Me at Debian: http://wiki.debian.org/SandroTosi |
|
From: Zunbeltz I. <zun...@gm...> - 2009-02-09 10:09:02
|
Dear Tony, Thank you very much. This is what I was looking for. It would be nice if it is integrated in the main matpotlib; especially if it would be possible to set the projection type in the matplotlibrc file. Zunbeltz On Fri, 2009-02-06 at 13:05 -0500, Tony S Yu wrote: > On Feb 6, 2009, at 8:45 AM, Zunbeltz Izaola wrote: > > > Dear all, > > > > I would like to have a plot where the frame only have left and > > bottom border. I can not find in the documentation any function to > > draw > > the Rectangle contained in figure() only with this 2 lines. It is > > possilbe? > > Hi Zunbeltz, > > Attached is an example of a custom Axes class that does what you want. > There are examples at the bottom of the file that show its use. I > worked on generalizing this idea for inclusion in MPL, but the code > got really nasty, really quickly. > > On a side note, if any of the MPL devs think this would make a useful > API example (since this topic has come up a few times on the list), > feel free to do whatever you want with it. > > Cheers, > -Tony > > > > > > > > Regards, > > > > Zunbeltz > -- Dr. Zunbeltz Izaola Helmholtz-Zentrum Berlin für Materialien und Energie GmbH Methods and Instruments (SF1) Glienicker Str. 100 D-14109 Berlin Tel (030) 8062-3179 Fax (030) 8062-2523 Room A 349 |
|
From: Lionel R. <lro...@li...> - 2009-02-09 09:19:08
|
Thanks John, it's what I need. Le vendredi 06 février 2009 à 13:10 -0600, John Hunter a écrit : > On Fri, Feb 6, 2009 at 10:56 AM, Ryan May <rm...@gm...> wrote: > > Lionel Roubeyrie wrote: > >> You're right, it's the chaco's zooming plot, I confused. > >> Is there a way to have this render with matplotlib? > > > > The event_handling/zoom_window.py example is kind of similar and might give some > > clues of where to go. But no, I don't know of a straight-forward version of > > chaco's example using matplotlib. Patches are accepted. :) > > The following example is pretty close to what you want I think -- > select a span in the upper axes to see the zoom in the lower: > > http://matplotlib.sourceforge.net/examples/widgets/span_selector.html > > JDH > > ------------------------------------------------------------------------------ > Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM) > software. With Adobe AIR, Ajax developers can use existing skills and code to > build responsive, highly engaging applications that combine the power of local > resources and data with the reach of the web. Download the Adobe AIR SDK and > Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > -- Lionel Roubeyrie chargé d'études LIMAIR - La Surveillance de l'Air en Limousin http://www.limair.asso.fr |