Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #54497

matplotlib question: OverflowError: Allocated too many blocks

Newsgroups comp.lang.python
Date 2013-09-20 10:17 -0700
Message-ID <863fd2f3-7855-4afd-a735-bda8e35bb91a@googlegroups.com> (permalink)
Subject matplotlib question: OverflowError: Allocated too many blocks
From Ray <rui.vapps@gmail.com>

Show all headers | View raw


hi,
i'm using matplotlib to generate chart from audio wave file, and I had a problem with it.

test code as:

from scipy.io import wavfile
import matplotlib.pyplot as plt
rate, x = wavfile.read('test2.wav')
plt.plot(x)
plt.savefig('test2.png')

the len of x= 19531840 (as len(x) )
matplotlib give exception: OverflowError: Allocated too many blocks

if I display it by:
plt.draw()
plt.show()

everything works fine. it seems I just can't save the output to a file. 
I know if I reduce the figsize would make it work. [aka plt.subplots(figsize=(5,2)) ] but this is not what I need. I need to generate the large chart. (depends on size of input file)

anyone know if there's another way to "save" big output file?

Back to comp.lang.python | Previous | Next | Find similar | Unroll thread


Thread

matplotlib question: OverflowError: Allocated too many blocks Ray <rui.vapps@gmail.com> - 2013-09-20 10:17 -0700

csiph-web