Newbie Question....

Sorry, I'm a newbie and needed some help to get started.

    > I downlaoded the Enthought version(for WXPython) which is
    > recommended in the web-site and downloaded the latest
    > version of matplot. I'm trying to go through the tutorial
    > and I'm stuck with the first example. The following is
    > what I wrote down on the script:

    > import matplotlib matplotlib.use("WX")

    > from matplotlib.matlab import * plot([1,2,3,4]) show()

    > When I run this script it creates a graph but the the
    > window freezes....

    > 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

Sorry, just realized that I didn't send this to the
list:

John,
I've been running the same examples in all of the
IDE's with the WX backend without any problems. I ran
them again when I saw this message. To the examples I
just add the two lines:

import matplotlib
matplotlib.use("WXAgg")

and all is well. Without these lines the graph
windows freeze (in WinXP).

However, after upgrading to version 0.5.4.2 there is a
new problem: after show() is run, the app quits and
the window disappears without any diagnostic output.
This happens with all of the examples that I've tried
so far. Before the upgrade they were working fine.

I haven't started debugging this yet. Any ideas?

System:
Win XP Pro, 1GB RAM, Pentium 4 2.6GHz
Python 2.3.3, GTK-Runtime-Environment-2.2.4-3,
pygtk-2.2.0-1.win32-py2.3

Regaards,
Barry Drake
— John Hunter wrote:
> >>>>> "Ryugan" == Ryugan Mizuta
> <ryuganmizuta@…209…> 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
>
>
>
>

···

-------------------------------------------------------
> This SF.Net email is sponsored by The 2004
> JavaOne(SM) Conference
> Learn from the experts at JavaOne(SM), Sun's
> Worldwide Java Developer
> Conference, June 28 - July 1 at the Moscone
Center
> in San Francisco, CA
> REGISTER AND SAVE! http://java.sun.com/javaone/sf
> Priority Code NWMGYKND
> _______________________________________________
> Matplotlib-users mailing list
> Matplotlib-users@lists.sourceforge.net
>
https://lists.sourceforge.net/lists/listinfo/matplotlib-users