I'm using Tkinter as the backend display for
matplotlib and also using IDLE -n. It works fine the
first several times I run it but ends up crashing and
taking down IDLE and pythonw.exe with it after ~10
runs of the script. I know this is not the best way
to use matplotlib right now. Anyway, here's the
plotting part of the script (.matplotlib set to
interactive mode)
if useMatplotlib:
yrange = 1.5
wfList = [p1, p2, p3]
close() # close last plot window if still open
nplots = len(waveformList)
i = 0
for p in wfList:
i +=1
subplot(nplots,1,i)
plot(p, color='#7070a0')
axis([0, totalPoints, -yrange, yrange])
ylabel('Volts')
grid(True)
Here's the eventual error message:
Traceback (most recent call last):
Exception in Tkinter callback
Traceback (most recent call last):
File "C:\Python23\lib\lib-tk\Tkinter.py", line 1345,
in __call__
File
"C:\Python23\lib\site-packages\matplotlib\backends\backend_tkagg.py",
line 120, in resize
File
"C:\Python23\lib\site-packages\matplotlib\backends\backend_tkagg.py",
line 127, in show
File
"C:\Python23\lib\site-packages\matplotlib\backends\backend_agg.py",
line 342, in draw
File
"C:\Python23\lib\site-packages\matplotlib\artist.py",
line 88, in draw
File
"C:\Python23\lib\site-packages\matplotlib\figure.py",
line 83, in _draw
File
"C:\Python23\lib\site-packages\matplotlib\artist.py",
line 88, in draw
File
"C:\Python23\lib\site-packages\matplotlib\axes.py",
line 527, in _draw
File
"C:\Python23\lib\site-packages\matplotlib\artist.py",
line 88, in draw
File
"C:\Python23\lib\site-packages\matplotlib\axis.py",
line 395, in _draw
File
"C:\Python23\lib\site-packages\matplotlib\artist.py",
line 88, in draw
File
"C:\Python23\lib\site-packages\matplotlib\axis.py",
line 93, in _draw
File
"C:\Python23\lib\site-packages\matplotlib\artist.py",
line 88, in draw
File
"C:\Python23\lib\site-packages\matplotlib\text.py",
line 87, in _draw
File
"C:\Python23\lib\site-packages\matplotlib\backends\backend_agg.py",
line 199, in draw_text
File
"C:\Python23\lib\site-packages\matplotlib\backends\backend_agg.py",
line 227, in compute_text_offsets
File
"C:\Python23\lib\site-packages\matplotlib\backends\backend_agg.py",
line 257, in _get_agg_font
RuntimeError: Could not load the facefile
File "C:\Documents and Settings\dlbrown\My
Documents\Python Scripts\gen_nonlinear_error.py", line
114, in ?
File
"C:\Python23\lib\site-packages\matplotlib\matlab.py",
line 942, in plot
File
"C:\Python23\lib\site-packages\matplotlib\backends\backend_tkagg.py",
line 46, in draw_if_interactive
File
"C:\Python23\lib\site-packages\matplotlib\backends\backend_tkagg.py",
line 127, in show
File
"C:\Python23\lib\site-packages\matplotlib\backends\backend_agg.py",
line 342, in draw
File
"C:\Python23\lib\site-packages\matplotlib\artist.py",
line 88, in draw
File
"C:\Python23\lib\site-packages\matplotlib\figure.py",
line 83, in _draw
File
"C:\Python23\lib\site-packages\matplotlib\artist.py",
line 88, in draw
File
"C:\Python23\lib\site-packages\matplotlib\axes.py",
line 527, in _draw
File
"C:\Python23\lib\site-packages\matplotlib\artist.py",
line 88, in draw
File
"C:\Python23\lib\site-packages\matplotlib\axis.py",
line 395, in _draw
File
"C:\Python23\lib\site-packages\matplotlib\artist.py",
line 88, in draw
File
"C:\Python23\lib\site-packages\matplotlib\axis.py",
line 93, in _draw
File
"C:\Python23\lib\site-packages\matplotlib\artist.py",
line 88, in draw
File
"C:\Python23\lib\site-packages\matplotlib\text.py",
line 87, in _draw
File
"C:\Python23\lib\site-packages\matplotlib\backends\backend_agg.py",
line 199, in draw_text
File
"C:\Python23\lib\site-packages\matplotlib\backends\backend_agg.py",
line 227, in compute_text_offsets
File
"C:\Python23\lib\site-packages\matplotlib\backends\backend_agg.py",
line 257, in _get_agg_font
RuntimeError: Could not load the facefile
Also, not sure if it's relevant but if I try to
continue in IDLE I sometimes get "too many files open"
errors as well as mostly non-working windows. Any
suggestions?
-- David
···
__________________________________
Do you Yahoo!?
Yahoo! Small Business $15K Web Design Giveaway
http://promotions.yahoo.com/design_giveaway/