From: John H. <jdh...@ac...> - 2004-06-15 14:07:20
|
>>>>> "Ryugan" == Ryugan Mizuta <ryu...@sb...> writes: Ryugan> Sorry, I'm a newbie and needed some help to get started. Ryugan> I downlaoded the Enthought version(for WXPython) which is Ryugan> recommended in the web-site and downloaded the latest Ryugan> version of matplot. I'm trying to go through the tutorial Ryugan> and I'm stuck with the first example. The following is Ryugan> what I wrote down on the script: Ryugan> import matplotlib matplotlib.use("WX") Ryugan> from matplotlib.matlab import * plot([1,2,3,4]) show() Ryugan> When I run this script it creates a graph but the the Ryugan> window freezes.... Ryugan> Anybody have any suggestions on how I can fix this...???? I'll bet dollars to donuts you are running matplotlib inside an IDE, eg Idle, PythonWin, Scintilla, etc. Quoting from http://matplotlib.sourceforge.net/installing.html Important: There are known conflicts with some of the backends with some python IDEs such as pycrust, idle. If you want to use matplotlib from an IDE, please consult the backends documentation for compatibility information. You will have the greatest likelihood of success if you run the examples from the command shell or by double clicking on them, rather than from an IDE. If you are interactively generating plots, your best bet is TkAgg from the standard python shell. The "backends" page, referred to above, is at http://matplotlib.sourceforge.net/backends.html. Basically, you should open up a command shell and try to run one of the examples from the matplotlib src distribution (the *.zip file for windows users); Eg, c:\matplotlib\examples> python simple_plot.py if this works fine (my guess is it will), then you'll know you have an IDE problem and not a matplotlib specific problem. Unfortunately, this problem tends to crop up a lot. See for example http://sourceforge.net/mailarchive/message.php?msg_id=8610351 and the responses to that post for more information Let me know if this is the case. JDH |