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? Many thanks, Alec
The documentation may not reflect this yet, but scipy recommends 2D plotting be handled by matplotlib: http://matplotlib.sourceforge.net/ and instead of dealing with gui_thread directly, use the ipython shell which has lots of other nice features: http://ipython.scipy.org/ launch ipython with the -pylab flag and it will handle all of your threading needs. In windows that most likely means looking at the properties of the desktop short cut and adding -pylab to the end of the part that actually launches ipython. In linux that means typing ipython -pylab at the command prompt. Ryan On 2/27/06, Alec Edgington <alec@obtext.com> 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?
Many thanks,
Alec
_______________________________________________ SciPy-user mailing list SciPy-user@scipy.net http://www.scipy.net/mailman/listinfo/scipy-user
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
Ah, great, many thanks! Alec -----Original Message----- From: scipy-user-bounces@scipy.net [mailto:scipy-user-bounces@scipy.net]On Behalf Of Arnd Baecker Sent: 27 February 2006 14:32 To: SciPy Users List Subject: Re: [SciPy-user] Missing '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
participants (3)
-
Alec Edgington -
Arnd Baecker -
Ryan Krauss