savefig problems with matplotlib

When it doesn't work, a dialog box opens with this message

    > Save figure failure: None: Interrupted system call

What backend are you using? I have seen something like this on GTK*.
I'm pretty sure it is a threading problem. Basically, we need a
backend dependent thread-safe way to make system calls. Not a trivial
task. I've posted a thread about this to the pygtk mailing list a few
months ago, but have yet to find a reliable recipe. gtk gurus, please
advise.

In the meantime, you may want to try a different GUI backend, eg,
tkagg. If this helps, let us know, because it will help determine
that this is indeed your problem.

JDH

I tried using tkagg by setting

backend : TkAgg

in my matplotlibrc, which includes only the following lines:

backend : TkAgg

latex options for matplotlib

font.latex.package : type1cm
text.usetex : False
text.tex.engine : latex

I get the following message, when I try to use it, which I don’t understand, because I have tkinter installed:

[jwlandry@…897… flow]$ ~/grain/plots/hopper/pof-w-insert.py
data_hopper-40k-r1.5.funnel-pof.combo
data_hopper-40k-r2.funnel-pof.combo data_hopper-40k-r4.funnel-pof.combo
data_hopper-40k-r6.funnel-pof.combo
Traceback (most recent call last):
File “/home/jwlandry/grain/plots/hopper/pof-w-insert.py”, line 12, in ?
from pylab import *
File “/usr/lib/python2.4/site-packages/pylab.py”, line 1, in ?
from matplotlib.pylab import *
File “/usr/lib/python2.4/site-packages/matplotlib/pylab.py”, line 217, in ?
new_figure_manager, draw_if_interactive, show = pylab_setup()
File “/usr/lib/python2.4/site-packages/matplotlib/backends/init.py”, line 24, in pylab_setup
globals(),locals(),[backend_name])
File “/usr/lib/python2.4/site-packages/matplotlib/backends/backend_tkagg.py”, line 8, in ?
import
tkagg

Paint image to Tk photo blitter extension

File “/usr/lib/python2.4/site-packages/matplotlib/backends/tkagg.py”, line 1, in ?
import _tkagg
ImportError: No module named _tkagg

James

···

On 11/25/05, John Hunter <jdhunter@…4…> wrote:

> When it doesn't work, a dialog box opens with this message

> Save figure failure: None: Interrupted system call

What backend are you using? I have seen something like this on GTK*.
I’m pretty sure it is a threading problem. Basically, we need a
backend dependent thread-safe way to make system calls. Not a trivial

task. I’ve posted a thread about this to the pygtk mailing list a few
months ago, but have yet to find a reliable recipe. gtk gurus, please
advise.

In the meantime, you may want to try a different GUI backend, eg,

tkagg. If this helps, let us know, because it will help determine
that this is indeed your problem.

JDH


James W. Landry

jwlandry@…287…