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
(5) |
2
(23) |
3
(17) |
4
(14) |
5
(12) |
6
(2) |
7
(3) |
8
(7) |
9
(13) |
10
(19) |
11
(24) |
12
(28) |
13
(9) |
14
(5) |
15
(7) |
16
(17) |
17
(17) |
18
(15) |
19
(6) |
20
|
21
(7) |
22
(20) |
23
(6) |
24
(4) |
25
(5) |
26
(11) |
27
(1) |
28
(2) |
29
(14) |
30
(7) |
|
|
|
|
From: D <da...@gm...> - 2010-11-19 23:29:41
|
Hi Stan, Seems numpy was the culprit. I upgraded to numpy-1.5.1 and now it works. Python and runtime updates were not sufficient. Thanks Daniel |
From: Caleb C. <cad...@gm...> - 2010-11-19 21:14:19
|
On Thu, Nov 18, 2010 at 4:50 PM, Benjamin Root <ben...@ou...> wrote: > > Caleb, > > Interesting analysis. One possible source of a leak would be some sort of dangling reference that still hangs around even though the plot objects have been cleared. By the time of the matplotlib 1.0.0 release, we did seem to clear out pretty much all of these, but it is possible there are still some lurking about. We should probably run your script against the latest svn to see how the results compare. > > Another possibility might be related to numpy. However this is the draw statement, so I don't know how much numpy is used in there. The latest refactor work in numpy has revealed some memory leaks that have existed, so who knows? > > Might be interesting to try making equivalent versions of this script using different backends, and different package versions to possibly isolate the source of the memory leak. > > Thanks for your observations, > Ben Root > Sorry for the double post; it seems the first is not displaying correctly on SourceForge. I conducted a couple more experiments taking into consideration suggestions made in responses to my original post (thanks for the response). First, I ran my original test (as close to it as possible anyway) using the Agg back end for 3 hours, plotting 16591 times (about 1.5Hz). Memory usage increased by 86MB. That's about 5.3K per redraw. Very similar to my original experiment. As suggested, I called gc.collect() after each iteration. It returned 67 for every iteration (no increase), although len(gc.garbage) reported 0 each iteration. Second, I ran a test targeting TkAgg for 3 hours, plotting 21374 times. Memory usage fluctuated over time, but essentially did not increase: starting at 32.54MB and ending at 32.79MB. gc.collect() reported 0 after each iteration as did len(gc.garbage). Attached are images of plots showing change in memory usage over time for each experiment. Any comments would be appreciated. Following is the code for each experiment. Agg ----- from random import random from datetime import datetime import os import gc import time import win32api import win32con import win32process import numpy import matplotlib matplotlib.use("Agg") from matplotlib.figure import Figure from matplotlib.backends.backend_agg import FigureCanvasAgg as FigureCanvas def get_process_memory_info(process_id): memory = {} process = None try: process = win32api.OpenProcess( win32con.PROCESS_QUERY_INFORMATION|win32con.PROCESS_VM_READ, False, process_id); if process is not None: return win32process.GetProcessMemoryInfo(process) finally: if process: win32api.CloseHandle(process) return memory meg = 1024.0 * 1024.0 figure = Figure(dpi=None) canvas = FigureCanvas(figure) axes = figure.add_subplot(1,1,1) def draw(channel, seconds): axes.clear() axes.plot(channel, seconds) canvas.print_figure('test.png') channel = numpy.sin(numpy.arange(1000) * random()) seconds = numpy.arange(len(channel)) testDuration = 60 * 60 * 3 startTime = time.time() print "starting memory: ", \ get_process_memory_info(os.getpid())["WorkingSetSize"]/meg while (time.time() - startTime) < testDuration: draw(channel, seconds) t = datetime.now() memory = get_process_memory_info(os.getpid()) print "time: {0}, working: {1:f}, collect: {2}, garbage: {3}".format( t, memory["WorkingSetSize"]/meg, gc.collect(), len(gc.garbage) ) time.sleep(0.5) TkAgg --------- from random import random from datetime import datetime import sys import os import gc import time import win32api import win32con import win32process import numpy import matplotlib matplotlib.use("TkAgg") from matplotlib.figure import Figure from matplotlib.backends.backend_tkagg import FigureCanvasTkAgg \ as FigureCanvas import Tkinter as tk def get_process_memory_info(process_id): memory = {} process = None try: process = win32api.OpenProcess( win32con.PROCESS_QUERY_INFORMATION|win32con.PROCESS_VM_READ, False, process_id); if process is not None: return win32process.GetProcessMemoryInfo(process) finally: if process: win32api.CloseHandle(process) return memory meg = 1024.0 * 1024.0 rootTk = tk.Tk() rootTk.wm_title("TKAgg Memory Leak") figure = Figure() canvas = FigureCanvas(figure, master=rootTk) axes = figure.add_subplot(1,1,1) def draw(channel, seconds): axes.clear() axes.plot(channel, seconds) channel = numpy.sin(numpy.arange(1000) * random()) seconds = numpy.arange(len(channel)) testDuration = 60 * 60 * 3 startTime = time.time() print "starting memory: ", \ get_process_memory_info(os.getpid())["WorkingSetSize"]/meg draw(channel, seconds) canvas.show() canvas.get_tk_widget().pack(side=tk.TOP, fill=tk.BOTH, expand=1) rate = 500 def on_tick(): canvas.get_tk_widget().after(rate, on_tick) if (time.time() - startTime) >= testDuration: return draw(channel, seconds) t = datetime.now() memory = get_process_memory_info(os.getpid()) print "time: {0}, working: {1:f}, collect: {2}, garbage: {3}".format( t, memory["WorkingSetSize"]/meg, gc.collect(), len(gc.garbage) ) canvas.get_tk_widget().after(rate, on_tick) tk.mainloop() |
From: Stan W. <sta...@nr...> - 2010-11-19 19:24:47
|
> From: D [mailto:da...@gm...] > Sent: Friday, November 12, 2010 16:52 > > I am running Python 2.5.2 on win xp sp3 on an Intel Core2 Duo. After > installation of matplotlib-1.0.0.win32-py2.5.exe I get a Windows crash > on importing pylab. > import pylab -> An unhandled win32 exception occured in > python.exe [5048] > import matplotlib works > > I did not add anything to the matplotlibrc. I uninstalled matplotlib > and re-installed with the same problem. > matplotlib-0.99.3.win32-py2.5.exe gives me the same problem. > The older version I had installed before (forgot which one) > worked fine. Can you 'import numpy' and 'import matplotlib.pyplot'? What is your numpy.__version__? |
From: Collin D. <dcd...@gm...> - 2010-11-19 00:58:34
|
So I tried updating and rebuilding Matplotlib - no luck - something (at least on my system) is goofy with the GTK(Agg),WX(Agg), and Fltk(Agg) backends. But the TkAgg backend works great. So I will stick with that, but if anyone else sees this problem and it becomes an issue, I'd be happy to help debug it in any way I can. -C On Wed, 17 Nov 2010 19:46:34 -0600 Benjamin Root <ben...@ou...> wrote: > On Wed, Nov 17, 2010 at 7:38 PM, Collin Day <dcd...@gm...> > wrote: > > > On Wed, 17 Nov 2010 19:00:54 -0600 > > Benjamin Root <ben...@ou...> wrote: > > > > Another data point - > > > > I tried Qt4Agg - it also works interactively - ie it goes back to > > the ipython cmd line. I also noticed when I start ipython --pylab, > > the following error messages occur: > > > > ** Message: pygobject_register_sinkfunc is deprecated (GtkWindow) > > ** Message: pygobject_register_sinkfunc is deprecated (GtkInvisible) > > ** Message: pygobject_register_sinkfunc is deprecated (GtkObject) > > > > > Interesting. It is possible that the gtk backend might have been > compiled against gtk development libraries that do not match your > current gtk library. What have you updated recently, and how did you > do it? > > Ben Root |
From: John <was...@gm...> - 2010-11-19 00:30:34
|
Hello, I see that for a legend you can do the following: ax = plt.scatter(x,y,label='test data') p_leg = mpl.font_manager.FontProperties(size='8') ax.legend(prop=p_leg) But, how do you do set font properties for the colorbar tick labels? Thanks! |