[SciPy-user] Missing 'plt'

Arnd Baecker arnd.baecker at web.de
Mon Feb 27 08:32:28 CST 2006


Hi Alec,

On Mon, 27 Feb 2006, Alec Edgington wrote:

> Hi,
>
> I'm hoping someone can help me get started with plotting using 'plt' in
> scipy. Aplogogies in advance for being an idiot.
>
> I'm running on up-to-date Windows XP; I've downloaded and installed
> python-2.4.2, numpy-0.9.5, wxPython-2.6 and scipy-0.4.6.
>
> But the 'plt' sub-package just doesn't seem to be there. Nor does
> gui_thread. So when I start up IDLE and try to follow the instructions in
> http://sg0.chem.upenn.edu/adam/howto/scipy/mini-plt.shtml, all that happens
> is:
>
> >>> import gui_thread
>
> Traceback (most recent call last):
>   File "<pyshell#0>", line 1, in -toplevel-
>     import gui_thread
> ImportError: No module named gui_thread
> >>> from scipy import *
> >>> from scipy import plt
>
> Traceback (most recent call last):
>   File "<pyshell#2>", line 1, in -toplevel-
>     from scipy import plt
> ImportError: cannot import name plt
> >>>
>
> I checked in C:\Python24\Lib\site-packages\scipy and found no folder called
> 'plt'.
>
> What am I doing wrong?

Nothing - the "problem" is that gui_thread and all plot packages
(i.e. `plt`, `xplt` and `gplt`) have been essentially taken
out of the new scipy.
See http://www.scipy.org/Cookbook under "Graphics"
They still exist under sandbox, but
their installation has to be done separately.

Unless you heavily rely on special features of `plt`
the general recommendation is to use matplotlib
http://matplotlib.sourceforge.net/
See also
  http://www.scipy.org/Plotting_Tutorial
  http://www.scipy.org/Cookbook/Matplotlib
  http://matplotlib.sourceforge.net/screenshots.html
for examples.

HTH, Arnd




More information about the SciPy-user mailing list