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
(12) |
2
(13) |
3
(14) |
4
(9) |
|
5
(9) |
6
(22) |
7
(17) |
8
(16) |
9
(19) |
10
(17) |
11
(6) |
|
12
|
13
(20) |
14
(21) |
15
(20) |
16
(10) |
17
(14) |
18
(3) |
|
19
(3) |
20
(12) |
21
(22) |
22
(26) |
23
(31) |
24
(26) |
25
(9) |
|
26
(4) |
27
(33) |
28
(15) |
29
(37) |
30
(26) |
|
|
|
From: Sandro T. <mo...@de...> - 2009-04-17 23:07:20
|
On Sat, Apr 18, 2009 at 00:22, Andrew Romero <rom...@ya...> wrote: > The script plottest.py.txt reads the data file (out.txt) and creates the plot (myfig.png); however, > I am unable to format the dates ... they always print as floats .. help are those unix timestamps (from 1970-01-01)? In any case, you have to convert those in datetime objects, then dates = list of datetime objects mpl_dates = [matplotlib.dates.date2num(date) for date in dates] and at the and use plot_date() instead of plot(), using mpl_dates for X axis. Regards, -- Sandro Tosi (aka morph, morpheus, matrixhasu) My website: http://matrixhasu.altervista.org/ Me at Debian: http://wiki.debian.org/SandroTosi |
|
From: Andrew R. <rom...@ya...> - 2009-04-17 22:22:23
|
The script plottest.py.txt reads the data file (out.txt) and creates the plot (myfig.png); however,
I am unable to format the dates ... they always print as floats .. help
the files plottest.py.txt, out.txt and myfig.png are attached
Thanks
Andy
|
|
From: Andres L. <and...@ut...> - 2009-04-17 20:45:50
|
Well, I have never used it before but here is the output from valgrind masstif, can you figure out something from this? The mem usage from python was still increasing. Andres Michael Droettboom wrote: > Are you able to run it inside of valgrind's massif tool? Calling out > to ps can be a bit spurious (particularly with a memory-pooling Python > build) especially for a leak this small. > > Mike > > Andres Luhamaa wrote: >> Michael Droettboom wrote: >> >>> I am not able to reproduce this leak here with 0.98.6svn from today >>> on RHEL4. What platform are you on? >>> >>> (See attached massif profile -- the memory usage is flat...) >>> >>> Mike >>> >> Well, in my setup I see similar behaviour as in the initial question. >> Ubuntu 8.10 32bit, 2-days old svn verion of matplotlib. >> >> Andres >> >>> Jesper Larsen wrote: >>> >>>> Hi matplotlib developers and users, >>>> >>>> I have had some problems with a memory leak in a long running >>>> matplotlib based web application that I have developed >>>> (www.worldwildweather.com). I believe the problem is due to a memory >>>> leak in the Agg backend but I am not sure. Below is a script which for >>>> me results in a consistently increasing amount of memory usage. I am >>>> using mpl version 0.98.6svn. The problem does not occur when the >>>> savefig command is commented out. And it does not occur when "cs = >>>> ax.contourf(z)" and "ax.cla()" are moved outside the loop (before and >>>> after respectively). >>>> >>>> Best regards, >>>> Jesper >>>> >>>> import os, gc >>>> import numpy as npy >>>> import matplotlib as mpl >>>> from matplotlib.figure import Figure >>>> from matplotlib.backends.backend_agg import FigureCanvasAgg as >>>> FigureCanvas >>>> >>>> def report_memory(): >>>> """Report memory.""" >>>> gc.collect() >>>> pid = os.getpid() >>>> a2 = os.popen('ps -p %d -o rss,vsz,%%mem' % pid).readlines() >>>> return int(a2[1].split()[1]) >>>> >>>> fig = Figure(dpi=100) >>>> ax = fig.add_axes([0.1, 0.1, 0.8, 0.8]) >>>> FigureCanvas(fig) >>>> >>>> n = 1000 >>>> z = npy.zeros((n,n)) >>>> for i in range(2000): >>>> cs = ax.contourf(z) >>>> fig.savefig('test.png') >>>> ax.cla() >>>> print report_memory(), i >>>> >>>> I have not pasted in all of the output but just the first and last >>>> 25 lines: >>>> 53356 0 >>>> 53360 1 >>>> 53360 2 >>>> 53360 3 >>>> 53360 4 >>>> 53360 5 >>>> 53360 6 >>>> 53360 7 >>>> 53360 8 >>>> 53360 9 >>>> 53360 10 >>>> 53360 11 >>>> 53360 12 >>>> 53360 13 >>>> 53360 14 >>>> 53360 15 >>>> 53360 16 >>>> 53360 17 >>>> 53356 18 >>>> 53360 19 >>>> 53360 20 >>>> 53360 21 >>>> 53360 22 >>>> 53360 23 >>>> 53356 24 >>>> ... >>>> 57552 1975 >>>> 57552 1976 >>>> 57552 1977 >>>> 57552 1978 >>>> 57552 1979 >>>> 57552 1980 >>>> 57552 1981 >>>> 57552 1982 >>>> 57552 1983 >>>> 57552 1984 >>>> 57552 1985 >>>> 57552 1986 >>>> 57552 1987 >>>> 57552 1988 >>>> 57552 1989 >>>> 57552 1990 >>>> 57552 1991 >>>> 57552 1992 >>>> 57552 1993 >>>> 57552 1994 >>>> 57552 1995 >>>> 57552 1996 >>>> 57552 1997 >>>> 57552 1998 >>>> 57552 1999 >>>> >>>> ------------------------------------------------------------------------------ >>>> >>>> This SF.net email is sponsored by: >>>> High Quality Requirements in a Collaborative Environment. >>>> Download a free trial of Rational Requirements Composer Now! >>>> http://p.sf.net/sfu/www-ibm-com >>>> _______________________________________________ >>>> Matplotlib-users mailing list >>>> Mat...@li... >>>> https://lists.sourceforge.net/lists/listinfo/matplotlib-users >>>> >>> ------------------------------------------------------------------------ >>> >>> >>> ------------------------------------------------------------------------------ >>> >>> This SF.net email is sponsored by: >>> High Quality Requirements in a Collaborative Environment. >>> Download a free trial of Rational Requirements Composer Now! >>> http://p.sf.net/sfu/www-ibm-com >>> ------------------------------------------------------------------------ >>> >>> >>> _______________________________________________ >>> Matplotlib-users mailing list >>> Mat...@li... >>> https://lists.sourceforge.net/lists/listinfo/matplotlib-users >>> >> >> >> ------------------------------------------------------------------------------ >> >> Stay on top of everything new and different, both inside and around >> Java (TM) technology - register by April 22, and save >> $200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco. >> 300 plus technical and hands-on sessions. Register today. Use >> priority code J9JMT32. http://p.sf.net/sfu/p >> _______________________________________________ >> Matplotlib-users mailing list >> Mat...@li... >> https://lists.sourceforge.net/lists/listinfo/matplotlib-users >> > |
|
From: Gökhan S. <gok...@gm...> - 2009-04-17 18:21:09
|
Thanks for the pointer Matthias,
That is exactly what I have been looking for.
I use the code from the RectangleSelector class help with your suggested
code. I know that I have to update y-axis accordingly to x values such that
their positions and sizes must much so that I can plot them in a new plot.
And I know that the answer lies in a mask; I have to create a mask from
x_new and apply it to y. Do you have any hint on this?
Another point is do you have any idea how to save values from inside
onselect action?
For some reason my ipython session doesn't remember values after I run the
given script:
from matplotlib.widgets import RectangleSelector
from pylab import *
def onselect(eclick, erelease):
# eclick and erelease are matplotlib events at press and release
print ' startposition : (%f, %f)' % (eclick.xdata, eclick.ydata)
print ' endposition : (%f, %f)' % (erelease.xdata, erelease.ydata)
print ' used button : ', eclick.button
xmin = min(eclick.xdata, erelease.xdata)
xmax = max(eclick.xdata, erelease.xdata)
ymin = min(eclick.ydata, erelease.ydata)
ymax = max(eclick.ydata, erelease.ydata)
x_new = x[(x>= xmin) & (x <= xmax)]
#mask = [x == x_new[i] for i in range(len(x_new))]
#print mask
#print len(x_new)
#print len(y_new)
#fig_new = figure()
#plot(x_new, y_new)
#fig_new.show()
def toggle_selector(event):
print ' Key pressed.'
if event.key in ['Q', 'q'] and toggle_selector.RS.active:
print ' RectangleSelector deactivated.'
toggle_selector.RS.set_active(False)
if event.key in ['A', 'a'] and not toggle_selector.RS.active:
print ' RectangleSelector activated.'
toggle_selector.RS.set_active(True)
x = arange(100)/(99.0)
y = sin(x)
fig = figure
ax = subplot(111)
ax.plot(x,y)
toggle_selector.RS = RectangleSelector(ax, onselect, drawtype='box')
connect('key_press_event', toggle_selector)
show()
Gökhan
On Fri, Apr 17, 2009 at 2:31 AM, Matthias Michler
<Mat...@gm...>wrote:
> Hi Gökhan,
>
> I recommend you to use matplotlib.widgets.RectangleSelector instead of the
> zoom functionality to select the data (An example can be found at
> http://matplotlib.sourceforge.net/examples/widgets/rectangle_selector.html).
> This will return you the x and y-coordinate of button press and button
> release
> event and with that you can take a portion of your data.
> Something like the following could be a starting point:
> x_min = min(eclick.xdata, erelease.xdata)
> x_max = max(eclick.xdata, erelease.xdata)
> x_new = x[(x>= x_min) & (x <= x_max)]
>
> where eclick and erelease correspond to the click and release event of the
> rectangle selection (see the example below).
>
> Opening a new figure after show can be achieved by:
>
> fig_new = plt.figure()
> # some plotting
> fig_new.show() # show up the new figure
>
>
> best regards Matthias
>
>
> yet another example for the usage of the RectangleSelector copied from its
> class documentation:
>
> """
> Select a min/max range of the x axes for a matplotlib Axes
>
> Example usage::
>
> from matplotlib.widgets import RectangleSelector
> from pylab import *
>
> def onselect(eclick, erelease):
> 'eclick and erelease are matplotlib events at press and release'
> print ' startposition : (%f, %f)' % (eclick.xdata, eclick.ydata)
> print ' endposition : (%f, %f)' % (erelease.xdata,
> erelease.ydata)
> print ' used button : ', eclick.button
>
> def toggle_selector(event):
> print ' Key pressed.'
> if event.key in ['Q', 'q'] and toggle_selector.RS.active:
> print ' RectangleSelector deactivated.'
> toggle_selector.RS.set_active(False)
> if event.key in ['A', 'a'] and not toggle_selector.RS.active:
> print ' RectangleSelector activated.'
> toggle_selector.RS.set_active(True)
>
> x = arange(100)/(99.0)
> y = sin(x)
> fig = figure
> ax = subplot(111)
> ax.plot(x,y)
>
> toggle_selector.RS = RectangleSelector(ax, onselect,
> drawtype='line')
> connect('key_press_event', toggle_selector)
> show()
> """
>
> On Friday 17 April 2009 02:26:51 Gökhan SEVER wrote:
> > Hello,
> >
> > A quick question:
> >
> > I am using two numpy arrays to plot the figure shown in attachment. Is it
> > possible to get array indices of selected X-axes while using the zoom
> > function? Later I can create a new figure from this selected portion
> > instead of the same figure and/or apply an analysis.
> >
> > Thank you.
>
>
> ------------------------------------------------------------------------------
> Stay on top of everything new and different, both inside and
> around Java (TM) technology - register by April 22, and save
> $200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco.
> 300 plus technical and hands-on sessions. Register today.
> Use priority code J9JMT32. http://p.sf.net/sfu/p
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
|
|
From: Jeff W. <js...@fa...> - 2009-04-17 14:34:53
|
John [H2O] wrote: > Does anyone know what this error may result from: > GEOS_ERROR: TopologyException: no outgoing dirEdge found (74.5584,-90,-90) > Segmentation fault > > > I am getting it for various projections and datasets... > > working with mpl_toolkits.basemap > > Thanks! > What versions of python, numpy, matplotlib, basemap and the GEOS library do you have? -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-113 Boulder, CO, USA 80303-3328 Web : http://tinyurl.com/5telg |
|
From: Thomas R. <tho...@gm...> - 2009-04-17 13:57:15
|
Hi,
A while ago, I sent an email around asking about the EPS output from
matplotlib. The following example summarizes the problem well:
import matplotlib
matplotlib.use('Agg')
from matplotlib.pyplot import *
import numpy as np
nx,ny = 10,10
image = np.random.random((nx,ny))
fig = figure(figsize=(4,4))
ax = fig.add_subplot(111)
ax.pcolorfast(image)
fig.savefig('plot.eps')
fig.savefig('plot.pdf')
fig.savefig('plot.svg')
This produces files with the following sizes:
600K plot.eps
8.0K plot.pdf
20K plot.svg
The EPS file is much larger because the bitmap is being rasterized to
a much higher resolution than a 10x10 grid. However, I eventually
figured out that the best way to solve this, assuming that the pixels
are square, and that the pixels line up with the axes is:
fig = figure(figsize=(4,4))
ax = fig.add_subplot(111,aspect='equal')
ax.imshow(image)
width = ax.get_position().width * 4
dpi = nx / width
fig.savefig('plot2.eps',dpi=dpi)
which produces
12K plot2.eps
As a temporary solution this works well - essentially matching the DPI
to the resolution of the input array.
However, I have one remaining problem. In plot2.eps, the frame border
has disappeared. Is this a bug? Does anyone know why this might be
happening?
Thanks for any advice,
Thomas
|
|
From: Michael D. <md...@st...> - 2009-04-17 12:41:49
|
Are you able to run it inside of valgrind's massif tool? Calling out to ps can be a bit spurious (particularly with a memory-pooling Python build) especially for a leak this small. Mike Andres Luhamaa wrote: > Michael Droettboom wrote: > >> I am not able to reproduce this leak here with 0.98.6svn from today on >> RHEL4. What platform are you on? >> >> (See attached massif profile -- the memory usage is flat...) >> >> Mike >> > Well, in my setup I see similar behaviour as in the initial question. > Ubuntu 8.10 32bit, 2-days old svn verion of matplotlib. > > Andres > >> Jesper Larsen wrote: >> >>> Hi matplotlib developers and users, >>> >>> I have had some problems with a memory leak in a long running >>> matplotlib based web application that I have developed >>> (www.worldwildweather.com). I believe the problem is due to a memory >>> leak in the Agg backend but I am not sure. Below is a script which for >>> me results in a consistently increasing amount of memory usage. I am >>> using mpl version 0.98.6svn. The problem does not occur when the >>> savefig command is commented out. And it does not occur when "cs = >>> ax.contourf(z)" and "ax.cla()" are moved outside the loop (before and >>> after respectively). >>> >>> Best regards, >>> Jesper >>> >>> import os, gc >>> import numpy as npy >>> import matplotlib as mpl >>> from matplotlib.figure import Figure >>> from matplotlib.backends.backend_agg import FigureCanvasAgg as >>> FigureCanvas >>> >>> def report_memory(): >>> """Report memory.""" >>> gc.collect() >>> pid = os.getpid() >>> a2 = os.popen('ps -p %d -o rss,vsz,%%mem' % pid).readlines() >>> return int(a2[1].split()[1]) >>> >>> fig = Figure(dpi=100) >>> ax = fig.add_axes([0.1, 0.1, 0.8, 0.8]) >>> FigureCanvas(fig) >>> >>> n = 1000 >>> z = npy.zeros((n,n)) >>> for i in range(2000): >>> cs = ax.contourf(z) >>> fig.savefig('test.png') >>> ax.cla() >>> print report_memory(), i >>> >>> I have not pasted in all of the output but just the first and last 25 >>> lines: >>> 53356 0 >>> 53360 1 >>> 53360 2 >>> 53360 3 >>> 53360 4 >>> 53360 5 >>> 53360 6 >>> 53360 7 >>> 53360 8 >>> 53360 9 >>> 53360 10 >>> 53360 11 >>> 53360 12 >>> 53360 13 >>> 53360 14 >>> 53360 15 >>> 53360 16 >>> 53360 17 >>> 53356 18 >>> 53360 19 >>> 53360 20 >>> 53360 21 >>> 53360 22 >>> 53360 23 >>> 53356 24 >>> ... >>> 57552 1975 >>> 57552 1976 >>> 57552 1977 >>> 57552 1978 >>> 57552 1979 >>> 57552 1980 >>> 57552 1981 >>> 57552 1982 >>> 57552 1983 >>> 57552 1984 >>> 57552 1985 >>> 57552 1986 >>> 57552 1987 >>> 57552 1988 >>> 57552 1989 >>> 57552 1990 >>> 57552 1991 >>> 57552 1992 >>> 57552 1993 >>> 57552 1994 >>> 57552 1995 >>> 57552 1996 >>> 57552 1997 >>> 57552 1998 >>> 57552 1999 >>> >>> ------------------------------------------------------------------------------ >>> >>> This SF.net email is sponsored by: >>> High Quality Requirements in a Collaborative Environment. >>> Download a free trial of Rational Requirements Composer Now! >>> http://p.sf.net/sfu/www-ibm-com >>> _______________________________________________ >>> Matplotlib-users mailing list >>> Mat...@li... >>> https://lists.sourceforge.net/lists/listinfo/matplotlib-users >>> >>> >> ------------------------------------------------------------------------ >> >> ------------------------------------------------------------------------------ >> This SF.net email is sponsored by: >> High Quality Requirements in a Collaborative Environment. >> Download a free trial of Rational Requirements Composer Now! >> http://p.sf.net/sfu/www-ibm-com >> ------------------------------------------------------------------------ >> >> _______________________________________________ >> Matplotlib-users mailing list >> Mat...@li... >> https://lists.sourceforge.net/lists/listinfo/matplotlib-users >> >> > > > ------------------------------------------------------------------------------ > Stay on top of everything new and different, both inside and > around Java (TM) technology - register by April 22, and save > $200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco. > 300 plus technical and hands-on sessions. Register today. > Use priority code J9JMT32. http://p.sf.net/sfu/p > _______________________________________________ > 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: Andres L. <and...@ut...> - 2009-04-17 12:26:12
|
Michael Droettboom wrote: > I am not able to reproduce this leak here with 0.98.6svn from today on > RHEL4. What platform are you on? > > (See attached massif profile -- the memory usage is flat...) > > Mike Well, in my setup I see similar behaviour as in the initial question. Ubuntu 8.10 32bit, 2-days old svn verion of matplotlib. Andres > > Jesper Larsen wrote: >> Hi matplotlib developers and users, >> >> I have had some problems with a memory leak in a long running >> matplotlib based web application that I have developed >> (www.worldwildweather.com). I believe the problem is due to a memory >> leak in the Agg backend but I am not sure. Below is a script which for >> me results in a consistently increasing amount of memory usage. I am >> using mpl version 0.98.6svn. The problem does not occur when the >> savefig command is commented out. And it does not occur when "cs = >> ax.contourf(z)" and "ax.cla()" are moved outside the loop (before and >> after respectively). >> >> Best regards, >> Jesper >> >> import os, gc >> import numpy as npy >> import matplotlib as mpl >> from matplotlib.figure import Figure >> from matplotlib.backends.backend_agg import FigureCanvasAgg as >> FigureCanvas >> >> def report_memory(): >> """Report memory.""" >> gc.collect() >> pid = os.getpid() >> a2 = os.popen('ps -p %d -o rss,vsz,%%mem' % pid).readlines() >> return int(a2[1].split()[1]) >> >> fig = Figure(dpi=100) >> ax = fig.add_axes([0.1, 0.1, 0.8, 0.8]) >> FigureCanvas(fig) >> >> n = 1000 >> z = npy.zeros((n,n)) >> for i in range(2000): >> cs = ax.contourf(z) >> fig.savefig('test.png') >> ax.cla() >> print report_memory(), i >> >> I have not pasted in all of the output but just the first and last 25 >> lines: >> 53356 0 >> 53360 1 >> 53360 2 >> 53360 3 >> 53360 4 >> 53360 5 >> 53360 6 >> 53360 7 >> 53360 8 >> 53360 9 >> 53360 10 >> 53360 11 >> 53360 12 >> 53360 13 >> 53360 14 >> 53360 15 >> 53360 16 >> 53360 17 >> 53356 18 >> 53360 19 >> 53360 20 >> 53360 21 >> 53360 22 >> 53360 23 >> 53356 24 >> ... >> 57552 1975 >> 57552 1976 >> 57552 1977 >> 57552 1978 >> 57552 1979 >> 57552 1980 >> 57552 1981 >> 57552 1982 >> 57552 1983 >> 57552 1984 >> 57552 1985 >> 57552 1986 >> 57552 1987 >> 57552 1988 >> 57552 1989 >> 57552 1990 >> 57552 1991 >> 57552 1992 >> 57552 1993 >> 57552 1994 >> 57552 1995 >> 57552 1996 >> 57552 1997 >> 57552 1998 >> 57552 1999 >> >> ------------------------------------------------------------------------------ >> >> This SF.net email is sponsored by: >> High Quality Requirements in a Collaborative Environment. >> Download a free trial of Rational Requirements Composer Now! >> http://p.sf.net/sfu/www-ibm-com >> _______________________________________________ >> Matplotlib-users mailing list >> Mat...@li... >> https://lists.sourceforge.net/lists/listinfo/matplotlib-users >> > > ------------------------------------------------------------------------ > > ------------------------------------------------------------------------------ > This SF.net email is sponsored by: > High Quality Requirements in a Collaborative Environment. > Download a free trial of Rational Requirements Composer Now! > http://p.sf.net/sfu/www-ibm-com > ------------------------------------------------------------------------ > > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > |
|
From: John [H2O] <was...@gm...> - 2009-04-17 12:08:05
|
Does anyone know what this error may result from: GEOS_ERROR: TopologyException: no outgoing dirEdge found (74.5584,-90,-90) Segmentation fault I am getting it for various projections and datasets... working with mpl_toolkits.basemap Thanks! -- View this message in context: http://www.nabble.com/GEOS-Error-tp23096254p23096254.html Sent from the matplotlib - users mailing list archive at Nabble.com. |
|
From: Peter P. <pe...@sb...> - 2009-04-17 07:37:09
|
Hi,
I was wondering about the eps output produced by imshow().
This program
----------------------------------------------
from pylab import *
Z = rand(10,10)
imshow(Z,interpolation='nearest',cmap=cm.bone)
savefig('bone.eps')
imshow(Z,interpolation='nearest',cmap=cm.gray)
savefig('gray.eps')
----------------------------------------------
produces files with sizes of
11M and 172K for bone.eps and gray.eps
respectively.
Does anybody know why the difference is that large?
I would expect a factor of 3 for RGB or 4 if an alpha channel is
included, but not a factor of about 60.
Best regards,
Peter
|
|
From: Gökhan S. <gok...@gm...> - 2009-04-17 02:29:48
|
Thanks for the suggestion Alan. This is just a preliminary data --needs to be gone over and edited unreasonable peaks. By the way the data is from a cloud condensation nuclei counter. On Thu, Apr 16, 2009 at 8:51 PM, Alan G Isaac <ala...@gm...> wrote: > On 4/16/2009 8:26 PM Gökhan SEVER apparently wrote: > > I am using two numpy arrays to plot the figure shown in attachment. Is > > it possible to get array indices of selected X-axes while using the zoom > > function? Later I can create a new figure from this selected portion > > instead of the same figure and/or apply an analysis. > > > Not an answer to your question but ... > I think a log scale would be more informative. > > Alan Isaac > > > ------------------------------------------------------------------------------ > Stay on top of everything new and different, both inside and > around Java (TM) technology - register by April 22, and save > $200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco. > 300 plus technical and hands-on sessions. Register today. > Use priority code J9JMT32. http://p.sf.net/sfu/p > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > -- Gökhan |
|
From: Alan G I. <ala...@gm...> - 2009-04-17 02:08:14
|
On 4/16/2009 8:26 PM Gökhan SEVER apparently wrote: > I am using two numpy arrays to plot the figure shown in attachment. Is > it possible to get array indices of selected X-axes while using the zoom > function? Later I can create a new figure from this selected portion > instead of the same figure and/or apply an analysis. Not an answer to your question but ... I think a log scale would be more informative. Alan Isaac |