Re: [Matplotlib-users] Memory usage when plotting sequental figures

2013-05-28 Thread Albert Kottke
Correct. On Tue, May 28, 2013 at 9:42 AM, zetah wrote: > Albert Kottke wrote: > > > >I had this problem as well. I think my solution was to tell the > >garbage collector to collect. > > > >import gc > >import numpy as np > >import matplotlib.pyplot as plt > > > >def draw_fig(arr, fn): > >fi

Re: [Matplotlib-users] Memory usage when plotting sequental figures

2013-05-28 Thread zetah
Albert Kottke wrote: > >I had this problem as well. I think my solution was to tell the >garbage collector to collect. > >import gc >import numpy as np >import matplotlib.pyplot as plt > >def draw_fig(arr, fn): >fig = plt.figure() >ax = fig.add_subplot(111) >ax.contourf(arr) >plt.s

Re: [Matplotlib-users] Memory usage when plotting sequental figures

2013-05-28 Thread Albert Kottke
I had this problem as well. I think my solution was to tell the garbage collector to collect. import gc import numpy as np import matplotlib.pyplot as plt def draw_fig(arr, fn): fig = plt.figure() ax = fig.add_subplot(111) ax.contourf(arr) plt.savefig(fn) plt.close(fig) gc

Re: [Matplotlib-users] Font issue while trying to save PS/EPS/SVG but not PDF

2013-05-28 Thread klo uo
On Tue, May 28, 2013 at 4:40 PM, Michael Droettboom wrote: > Which version of Windows are you on? Apparently, the Segoe UI font is > different on Windows 7 and 8 and I'd like to download and test with the > correct one. I'm on Windows XP, but problem was with the name of the font. This font's name

Re: [Matplotlib-users] legends in 3D plots

2013-05-28 Thread Benjamin Root
On Tue, May 28, 2013 at 3:50 AM, Nils Wagner wrote: > Hi all, > > I would like to add a legend to a 3D plot. > However, the legend ist not visible in the example given below. > Am I missing something ? > > Nils > > import numpy as np > from mpl_toolkits.mplot3d import Axes3D > import matplotlib.p

Re: [Matplotlib-users] Memory usage when plotting sequental figures

2013-05-28 Thread zetah
"zetah" wrote: > >Eric Firing wrote: >> >>plt.close(fig) # that should take care of it > >Thanks for your quick reply. > >I tried before posting `plt.close()` and it didn't work, but also >`plt.close(fig)` doesn't change memory pumping with every loop. >BTW, I'm on Windows with Matplotlib

Re: [Matplotlib-users] Font issue while trying to save PS/EPS/SVG but not PDF

2013-05-28 Thread Michael Droettboom
Which version of Windows are you on? Apparently, the Segoe UI font is different on Windows 7 and 8 and I'd like to download and test with the correct one. Mike On 05/28/2013 06:12 AM, klo uo wrote: > As suggested by Phil, I'm reposting github issue #2067 on this list. > > I use MPL 1.2.1 on Win

Re: [Matplotlib-users] constrained rectangular zoom does not always work with Qt4 backend

2013-05-28 Thread ratomatrix
Hi, Gregorio Bastardo wrote > When I use the "Zoom-to-rectangle" button of > the navigation toolbar while holding the x or y key, sometimes nothing > happens when the mouse is released. I have also experienced the same behavior, and I still don't know what it exactly depends on. It works most o

[Matplotlib-users] Font issue while trying to save PS/EPS/SVG but not PDF

2013-05-28 Thread klo uo
As suggested by Phil, I'm reposting github issue #2067 on this list. I use MPL 1.2.1 on Windows with Python 2.7.5. In my matplotlibrc I've set sans-serif font to "Segoe UI". Now, if I try to save a plot to PDF, MPL saves it fine, but if I try PS or EPS or SVG it fails, because of the font set. (I

Re: [Matplotlib-users] Memory usage when plotting sequental figures

2013-05-28 Thread zetah
Eric Firing wrote: > >plt.close(fig) # that should take care of it Thanks for your quick reply. I tried before posting `plt.close()` and it didn't work, but also `plt.close(fig)` doesn't change memory pumping with every loop. BTW, I'm on Windows with Matplotlib 1.2.1 -

Re: [Matplotlib-users] Memory usage when plotting sequental figures

2013-05-28 Thread Eric Firing
On 2013/05/27 9:51 PM, zetah wrote: > Hi, > > if I use something like this: > > == > import numpy as np > import matplotlib.pyplot as plt > > def draw_fig(arr, fn): > fig = plt.figure() > ax = fig.add_subplot(111) > ax.contourf(arr) >

[Matplotlib-users] Memory usage when plotting sequental figures

2013-05-28 Thread zetah
Hi, if I use something like this: == import numpy as np import matplotlib.pyplot as plt def draw_fig(arr, fn): fig = plt.figure() ax = fig.add_subplot(111) ax.contourf(arr) plt.savefig(fn) if __name__ == '__main__': for i i

[Matplotlib-users] legends in 3D plots

2013-05-28 Thread Nils Wagner
Hi all, I would like to add a legend to a 3D plot. However, the legend ist not visible in the example given below. Am I missing something ? Nils import numpy as np from mpl_toolkits.mplot3d import Axes3D import matplotlib.pyplot as plt import random def fun(x, y): return x**2 + y def fun1(x,