Try as I might I couldn't get your script to crash, so I modified my
code so it was more like yours (see below - I've also made some
cosmetic changes as well). It now runs without crashing
If you still want to try and squash this bug I'm happy to do some more
testing but as far as I'm concerned the problem is solved.
Many thanks for the help.
Cheers,
John
PS just in case it's at all relevant, I forgot to mention that for
unrelated reasons I'm using matplotlib with numarray rather than numpy
for ani in range(an1, an2):
if ba1 <= ani: ba1 = ani + 1
for bli in range(ba1, ba2):
if v.blank[ani, bli]:
continue
fig = pylab.figure()
ax = fig.add_subplot(111)
for chi in range(v.nch):
ax.plot(v.iat, v.amp[:,ani,bli,0,chi,0], ',')
ax.plot(v.iat, v.amp[:,ani,bli,0,chi,1], ',')
ax.plot(v.iat, v.amp[:,ani,bli,1,chi,0], ',')
ax.plot(v.iat, v.amp[:,ani,bli,1,chi,1], ',')
baseline = '%02d-%02d' % (ani, bli)
ax.set_title('Baseline ' + baseline)
fig.savefig('TimeSeries' + baseline)
pylab.close()
print 'printing baseline ' + baseline
···
On 16/04/07, John Hunter <jdh2358@...287...> wrote:
On 4/13/07, John Morgan <mojoh81@...287...> wrote:
> I'm using matplotlib with Python 2.4.4 to make scatter plots of a
> reasonably large dataset. Specifically about 200 plots with around
> 3224 points each. Unfortunately after about 30-40 plots, python
> invariably crashes with the error:
>
Could you produce a piece of freestanding code that we can run that
reproduces the error so we can try and debug it. Unfortunately, there
is nothing obviously wrong with your code, which means it is likely to
be a bug on our side.
Also, please report your versions of matplotlib and numpy, etc. One
good way to do this is to create a simple test script and run it with
> python test.py --verbose-helpful
and paste the output here.
To kickstart the process, here is a script that makes 500 figures with
a similar number of points that *does not crash* on my system. If you
are generating figures in batch, make sure you are running in a image
backend like Agg (for PNG) or PS (for postscript) ....
import matplotlib
matplotlib.use('Agg')
import numpy
import pylab
N = 3224
ind = numpy.arange(float(N))
for i in range(500):
fig = pylab.figure()
ax = fig.add_subplot(111)
ax.plot(ind, numpy.random.rand(N), ',')
ax.set_title('Baseline %d'%i)
fig.savefig('TimeSeries %d'%i)
pylab.close()
print 'printing baseline ', i
Thanks,
JDH
JDH