SourceForge logo
SourceForge logo
Menu

matplotlib-devel — matplotlib developers

You can subscribe to this list here.

2003 Jan
Feb
Mar
Apr
May
Jun
Jul
Aug
Sep
Oct
(1)
Nov
(33)
Dec
(20)
2004 Jan
(7)
Feb
(44)
Mar
(51)
Apr
(43)
May
(43)
Jun
(36)
Jul
(61)
Aug
(44)
Sep
(25)
Oct
(82)
Nov
(97)
Dec
(47)
2005 Jan
(77)
Feb
(143)
Mar
(42)
Apr
(31)
May
(93)
Jun
(93)
Jul
(35)
Aug
(78)
Sep
(56)
Oct
(44)
Nov
(72)
Dec
(75)
2006 Jan
(116)
Feb
(99)
Mar
(181)
Apr
(171)
May
(112)
Jun
(86)
Jul
(91)
Aug
(111)
Sep
(77)
Oct
(72)
Nov
(57)
Dec
(51)
2007 Jan
(64)
Feb
(116)
Mar
(70)
Apr
(74)
May
(53)
Jun
(40)
Jul
(519)
Aug
(151)
Sep
(132)
Oct
(74)
Nov
(282)
Dec
(190)
2008 Jan
(141)
Feb
(67)
Mar
(69)
Apr
(96)
May
(227)
Jun
(404)
Jul
(399)
Aug
(96)
Sep
(120)
Oct
(205)
Nov
(126)
Dec
(261)
2009 Jan
(136)
Feb
(136)
Mar
(119)
Apr
(124)
May
(155)
Jun
(98)
Jul
(136)
Aug
(292)
Sep
(174)
Oct
(126)
Nov
(126)
Dec
(79)
2010 Jan
(109)
Feb
(83)
Mar
(139)
Apr
(91)
May
(79)
Jun
(164)
Jul
(184)
Aug
(146)
Sep
(163)
Oct
(128)
Nov
(70)
Dec
(73)
2011 Jan
(235)
Feb
(165)
Mar
(147)
Apr
(86)
May
(74)
Jun
(118)
Jul
(65)
Aug
(75)
Sep
(162)
Oct
(94)
Nov
(48)
Dec
(44)
2012 Jan
(49)
Feb
(40)
Mar
(88)
Apr
(35)
May
(52)
Jun
(69)
Jul
(90)
Aug
(123)
Sep
(112)
Oct
(120)
Nov
(105)
Dec
(116)
2013 Jan
(76)
Feb
(26)
Mar
(78)
Apr
(43)
May
(61)
Jun
(53)
Jul
(147)
Aug
(85)
Sep
(83)
Oct
(122)
Nov
(18)
Dec
(27)
2014 Jan
(58)
Feb
(25)
Mar
(49)
Apr
(17)
May
(29)
Jun
(39)
Jul
(53)
Aug
(52)
Sep
(35)
Oct
(47)
Nov
(110)
Dec
(27)
2015 Jan
(50)
Feb
(93)
Mar
(96)
Apr
(30)
May
(55)
Jun
(83)
Jul
(44)
Aug
(8)
Sep
(5)
Oct
Nov
(1)
Dec
(1)
2016 Jan
Feb
Mar
(1)
Apr
May
Jun
(2)
Jul
Aug
(3)
Sep
(1)
Oct
(3)
Nov
Dec
2017 Jan
Feb
(5)
Mar
Apr
May
Jun
Jul
(3)
Aug
Sep
(7)
Oct
Nov
Dec
2018 Jan
Feb
Mar
Apr
May
Jun
Jul
(2)
Aug
Sep
Oct
Nov
Dec
S M T W T F S






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






Showing 10 results of 10

From: John H. <jd...@gm...> - 2008年11月21日 14:24:15
On Fri, Nov 21, 2008 at 8:17 AM, Benoit Zuber <bz...@mr...> wrote:
> Sorry, I did not realise it (I suppose, I did not quite know what backend
> means, now I checked it on wikipedia ;-) . Running the script with
> --verbose-helpful told me that the backend was GTKAgg version 2.10.1
Here is some additional documentation of backends from the mpl perspective:
 http://matplotlib.sourceforge.net/faq/installing_faq.html#id1
JDH
From: John H. <jd...@gm...> - 2008年11月21日 14:23:07
On Fri, Nov 21, 2008 at 8:08 AM, Stan West <sta...@nr...> wrote:
> While I check out the mplsizer toolkit, I'm still interested in any feedback
> on my ideas for subplot layout features. Does anyone have any critiques,
> concerns, preferences, suggestions, etc., to voice? Thanks.
My main comment is to not try and reuse subplot for this. Subplot is
a very thin wrapper of Axes, which handles layout on a regular grid.
You want your grids to be irregular, so make a new subclass of Axes
that acts the way you want. This will be easier than trying to tack
extras complexity on top of subplot.
We can then expose it to the toplevel with
 ax = fig.add_your_new_axes(whatever)
and to pyplot.
From: Benoit Z. <bz...@mr...> - 2008年11月21日 14:17:54
>
> Well, you are still using some backend, probably a GUI one, even if no
> figure pops up. You can run your script with --verbose-helpful to see
> what is happening.
> 
Sorry, I did not realise it (I suppose, I did not quite know what 
backend means, now I checked it on wikipedia ;-) . Running the script 
with --verbose-helpful told me that the backend was GTKAgg version 2.10.1
Best regards,
Ben
From: Stan W. <sta...@nr...> - 2008年11月21日 14:08:54
While I check out the mplsizer toolkit, I'm still interested in any feedback
on my ideas for subplot layout features. Does anyone have any critiques,
concerns, preferences, suggestions, etc., to voice? Thanks.
Stan
From: John H. <jd...@gm...> - 2008年11月21日 13:55:34
On Fri, Nov 21, 2008 at 7:53 AM, Benoit Zuber <bz...@mr...> wrote:
>
>> If you comment out agg you are using a gui backend presumably (which
>> one) and most of these are known to have some leaks, some of which are
>> beyond our control.
>
> This leak happened without any gui backend when I ran the script from the
> csh prompt like that:
>> python script.py
Well, you are still using some backend, probably a GUI one, even if no
figure pops up. You can run your script with --verbose-helpful to see
what is happening.
>> After
>> reading your post, I am not clear if you still have a problem or not.>From
>> the data you posted, it appears that agg is not leaking in your
>> example.
>>
>
> It is not a problem anymore, using the 'Agg' solved the problem.
Great
JDH
From: Benoit Z. <bz...@mr...> - 2008年11月21日 13:53:58
> If you comment out agg you are using a gui backend presumably (which
> one) and most of these are known to have some leaks, some of which are
> beyond our control. 
This leak happened without any gui backend when I ran the script from 
the csh prompt like that:
 > python script.py
>
> When you say you are working interactively, do you mean from the
> python or ipython shell? 
Yes, from ipython shell.
> After
> reading your post, I am not clear if you still have a problem or not.>From the data you posted, it appears that agg is not leaking in your
> example.
> 
 It is not a problem anymore, using the 'Agg' solved the problem.
Thanks.
Ben
From: John H. <jd...@gm...> - 2008年11月21日 13:24:50
On Fri, Nov 21, 2008 at 7:04 AM, Benoit Zuber <bz...@mr...> wrote:
>
>> > I posted this on maplotlib-users list, but got no reply. I guess that
>> > bugs should rather be reported here...
>>
>> Could you post a *complete* script that demonstrates the leak, eg one
>> that calls the function and does any other cleanup? Does it help to
>> use gc.collect between function calls?
>
> Thanks for your reply. Here is the complete script (I was running the
> previous one interactively).
> In fact, I realised that the memory leak is not total... I mean that the
> RAM gets loaded during the first two iterations, which correspond to a
> load of 1.9Gb (I have 4Gb RAM in total). Then the RAM usage remains
> absolutely stable.
>
> I then tried to run this script interactively in ipython. Once the
> script ends, the RAM is not released (1.9Gb are still used).
> Nevertheless, when I call fa() once again, the memory load remains the
> same. So this leak does not lead to a crash, which is fine.
>
> Finally if I comment "matplotlib.use('Agg')", then the load is
> increasing during each iteration, saturating the RAM, and starting
> filling up the swap. In this case the output of the script is :
If you comment out agg you are using a gui backend presumably (which
one) and most of these are known to have some leaks, some of which are
beyond our control. Michael has recently made some change to
significantly reduce a gtk leak.
When you say you are working interactively, do you mean from the
python or ipython shell? ipython holds a reference to the names the
main module namespace, which could be preventing a gc cleanup. After
reading your post, I am not clear if you still have a problem or not.
>From the data you posted, it appears that agg is not leaking in your
example.
JDH
From: Benoit Z. <bz...@mr...> - 2008年11月21日 13:05:00
> > I posted this on maplotlib-users list, but got no reply. I guess that
> > bugs should rather be reported here...
> 
> Could you post a *complete* script that demonstrates the leak, eg one
> that calls the function and does any other cleanup? Does it help to
> use gc.collect between function calls?
Thanks for your reply. Here is the complete script (I was running the
previous one interactively).
In fact, I realised that the memory leak is not total... I mean that the
RAM gets loaded during the first two iterations, which correspond to a
load of 1.9Gb (I have 4Gb RAM in total). Then the RAM usage remains
absolutely stable. 
I then tried to run this script interactively in ipython. Once the
script ends, the RAM is not released (1.9Gb are still used).
Nevertheless, when I call fa() once again, the memory load remains the
same. So this leak does not lead to a crash, which is fine.
Finally if I comment "matplotlib.use('Agg')", then the load is
increasing during each iteration, saturating the RAM, and starting
filling up the swap. In this case the output of the script is :
9
9
9
9
9
Cheers,
Ben
import numpy as np
import matplotlib
matplotlib.use('Agg')
from matplotlib import pylab
import gc
def fa():
 a = np.arange(1024**2)
 a = a.reshape(1024,1024)
 for i in range(5):
 filename = "memleak%d" %(i)
 pylab.pcolor(a)
 pylab.savefig(filename)
 pylab.close()
 print gc.collect()
fa()
This outputs:
0
0
0
0
0
From: John H. <jd...@gm...> - 2008年11月21日 11:44:17
On Fri, Nov 21, 2008 at 4:24 AM, Benoit Zuber <bz...@mr...> wrote:
> Hi,
> I posted this on maplotlib-users list, but got no reply. I guess that
> bugs should rather be reported here...
Could you post a *complete* script that demonstrates the leak, eg one
that calls the function and does any other cleanup? Does it help to
use gc.collect between function calls?
JDH
From: Benoit Z. <bz...@mr...> - 2008年11月21日 10:24:11
Hi,
I posted this on maplotlib-users list, but got no reply. I guess that 
bugs should rather be reported here...
I have noticed a memory leak when using pylab.pcolor. Here is the code,
fa() and fb() do the same thing. The difference is the size of the array
which is passed to pcolor. With a large array pcolor leaks but not with a
small one.
Cheers,
Ben
import numpy as np
import matplotlib
matplotlib.use('Agg')
from matplotlib import pylab
def fa():
 """ This function leaks.
 """
 a = np.arange(1024**2)
 a = a.reshape(1024,1024)
 for i in range(1):
 pylab.pcolor(a)
 pylab.close()
def fb():
 """This function does not leak.
 """
 b = np.arange(1024)
 b = b.reshape(32,32)
 for i in range(1024):
 pylab.pcolor(b)
 pylab.close()

Showing 10 results of 10

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





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

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

More information about our ad policies

Ad destination/click URL:

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