|
From: John H. <jdh...@ac...> - 2005-02-01 22:47:37
|
>>>>> "Fernando" == Fernando Perez <Fer...@co...> writes:
Fernando> You have to carefully wire reload() calls into the
Fernando> proper backends. It's doable, but doing it generically
Fernando> and with all the complex mpl backend machinery would
Fernando> likely take a bit of effort.
I have something in CVS that appears to work. You can interactively
switch backends in the pylab interface. The caveat is that you lose
all current figures when doing the switch (close('all') is called).
With some work I could probably patch the current figure manager to
work with multiple simultaneous backends but have no real interest in
doing this now. But it could serve as a basis for an ipython patch
that allowed you to run as ps, eg something like the following
def runps(fname):
curr = pylab.rcParams['backend']
pylab.switch_backend('PS')
reload(pylab)
run(fname)
pylab.switch_backend(curr)
reload(pylab)
or modify "run" to take a kwarg for the backend.
Fernando> But for now, I'd rather see the tk close bug fixed and
Fernando> the figure() improvements I referred to in my other mail
Fernando> ;)
Well, the tk close bug should be a non-issue with CVS matplotlib.
Just make sure you use the rc param (which is the default in CVS)
tk.pythoninspect : False # tk sets PYTHONINSEPCT
And your figure num patch is already in....
JDH
|