|
From: John H. <jdh...@ac...> - 2004-06-16 12:20:29
|
>>>>> "Ryugan" == Ryugan Mizuta <ryu...@sb...> writes:
Ryugan> Thanks for all who gave me a reply.... Somehow the
Ryugan> following script worked...:
import matplotlib
matplotlib.interactive(False)
matplotlib.use("WX")
from matplotlib.matlab import *
plot([1,2,3,4])
show()
I just want to point out that in my opinion, the easiest way to set
the default backend is to use your matplotlibrc file -
http://matplotlib.sourceforge.net/faq.html#MATPLOTLIBRC. For windows,
this is found at C:\Python23\share\matplotlib\.matplotlibrc.
You can achieve the same effect by setting
backend : WX # the default backend
interactive : False # see http://matplotlib.sourceforge.net/interactive.html
which will not be so invasive to your script (ie, you can change the
default behavior of your scripts w/o changing the scripts
themselves). Using
import matplotlib
matplotlib.interactive(False)
matplotlib.use("WX")
should be something you reserve to depart from the desired default
behavior.
Glad it's working for you! I have two more questions I am curious
about, for both you and Barry
* Does WXAgg also work?
* In which IDEs do you find this combination works?
Following your question yesterday I added the FAQ entry
http://matplotlib.sourceforge.net/faq.html#FREEZE, and I'd like to
update it to make it as complete as possible.
JDH
|