Re: [Matplotlib-users] RuntimeError: Could not open facefile

2012-03-23 Thread John Hunter
On Fri, Mar 23, 2012 at 3:35 PM, Andrew Smart wrote: > Hi, > I'm running into this RuntimeError: Could not open facefile > c:\Python32\lib\site-packages\matplotlib\mpl-data\fonts\ttf\Vera.ttf; > Cannot_Open_Resource when I'm trying to save out a series of *.png files in > a loop. It crashes on thi

Re: [Matplotlib-users] RuntimeError: Could not open facefile

2012-03-23 Thread Andrew Smart
Ok thank you - so one way to work around it is to just generate the files I want in batches so Windows won't run out of file handles - but is there a way to know how many handles are available? I'm trying to animate some data and I don't really know how many frames there are - could be thousands.

Re: [Matplotlib-users] RuntimeError: Could not open facefile

2012-03-23 Thread Michael Droettboom
This is a known bug on Windows where it runs out of file handles after a while. This commit was an attempt to fix it, but it doesn't seem to work: https://github.com/matplotlib/matplotlib/commit/4cb2aaa87b0aa9efe7178d7510d3d091ef5206df I think we need a Windows user/developer/expert to get to

[Matplotlib-users] RuntimeError: Could not open facefile

2012-03-23 Thread Andrew Smart
Hi, I'm running into this RuntimeError: Could not open facefile c:\Python32\lib\site-packages\matplotlib\mpl-data\fonts\ttf\Vera.ttf; Cannot_Open_Resource when I'm trying to save out a series of *.png files in a loop. It crashes on this error after many passes through the loop and successful files

Re: [Matplotlib-users] Clearing figures from memory

2012-03-23 Thread Eric Firing
On 03/23/2012 08:05 AM, Albert Kottke wrote: > I am having problems clearing figures from memory. After saving the > figure, I use pyplot.close() on the figure handle and then del all of > the data and figure, as shown here: > > fig.savefig('plots/%(record_id)05i' % recording) > plt.close(fig) > >

[Matplotlib-users] Clearing figures from memory

2012-03-23 Thread Albert Kottke
I am having problems clearing figures from memory. After saving the figure, I use pyplot.close() on the figure handle and then del all of the data and figure, as shown here: fig.savefig('plots/%(record_id)05i' % recording) plt.close(fig) del accel, fourier_amp, fig, time, disp gc.collect() Despi

Re: [Matplotlib-users] Problem using plot_surface.

2012-03-23 Thread Benjamin Root
The shapes of X, Y, and Z must match. After the mesh grid, Z no longer matches X and Y. Ben Root (I will be out of contact for at least a week, sorry I won't be able to help any further till then.) -- This SF email is sp

[Matplotlib-users] Problem using plot_surface.

2012-03-23 Thread David Craig
Hi, I have three variables I would like to plot using plot_surface but I keep getting the error given at the bottom. Anyone know what I am doing wrong?? My code is as follows, fig3 = plt.figure() ax = Axes3D(fig3) X = np.zeros((78,1)) Y = np.zeros((78,1)) Z = np.zeros((78,1)) for p in range(len(