Hi all,
I am a new user of this library and scipy but I see something strange when I run the following script:
from scipy import *
import pylab
b = [0.0,1.0,0.0]
a = 1
w,h = signal.freqz(b,a)
magnitude = []
phase = []
for i in h:
magnitude.append(sqrt(i.real**2. +i.imag**2.))
phase.append(arctan(i.imag/i.real))
print len(w)
print len(h)
print len(magnitude)
print len(phase)
i = range(len(magnitude))
gplt.plot(i,magnitude)
pylab.plot(i,magnitude)
pylab.show()
This script show me the magnitude response of a digital filter. In this case the magnitude response is a costant with value equal to 1.
Now if I use the gplt.plot I can see the correct response while pylab.plot doesn't show me the correct one.
Am I doing something wrong?
Thanks
Daigos
INFINITO ADSLFLAT 4 MEGA: SOLO 27,90 EURO AL MESE IVA INCLUSA IP STATICO, BANDA GARANTITA 256Kbps ANTIVIRUS E FIREWALL INCLUSI NEL PREZZO
http://adsl.infinito.it
Hi All,
I installed the new release for win32 and python 2.3 but every time that I import the pylab, I receive the following error:
Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.
C:\Python23>python FIRExample --verbose-helpful
matplotlib data path C:\Python23\lib\site-packages\matplotlib\mpl-data
$HOME=C:\Documents and Settings\a
CONFIGDIR=C:\Documents and Settings\a\.matplotlib
loaded rc file C:\Python23\lib\site-packages\matplotlib\mpl-data\matplotlibrc
matplotlib version 0.87.2
verbose.level helpful
interactive is False
platform is win32
numerix Numeric 23.6
font search path ['C:\\Python23\\lib\\site-packages\\matplotlib\\mpl-data']
loaded ttfcache file C:\Documents and Settings\a\.matplotlib\ttffont.
cache
Traceback (most recent call last):
File "FIRExample", line 2, in ?
import pylab
File "C:\Python23\Lib\site-packages\pylab.py", line 1, in ?
from matplotlib.pylab import *
File "C:\Python23\Lib\site-packages\matplotlib\pylab.py", line 219, in ?
new_figure_manager, draw_if_interactive, show = pylab_setup()
File "C:\Python23\Lib\site-packages\matplotlib\backends\__init__.py", line 23,
in pylab_setup
globals(),locals(),[backend_name])
File "C:\Python23\Lib\site-packages\matplotlib\backends\backend_tkagg.py", lin
e 9, in ?
from backend_agg import FigureCanvasAgg
File "C:\Python23\Lib\site-packages\matplotlib\backends\backend_agg.py", line
86, in ?
from matplotlib.texmanager import TexManager
File "C:\Python23\Lib\site-packages\matplotlib\texmanager.py", line 37, in ?
from subprocess import Popen, STDOUT, PIPE
File "C:\Python23\Lib\site-packages\subprocess\__init__.py", line 366, in ?
from _subprocess import *
ImportError: No module named _subprocess
Also the User's Guide doesn't work. The pdf file seems to be damaged.
Can you help me?
Thanks in advance
Daigos
INFINITO ADSLFLAT 4 MEGA: SOLO 27,90 EURO AL MESE IVA INCLUSA IP STATICO, BANDA GARANTITA 256Kbps ANTIVIRUS E FIREWALL INCLUSI NEL PREZZO
http://adsl.infinito.it
This is sneaking in for python2.3 and windows. Here is the code
culprit below. We'll have to look into where this _subprocess module
is supposed to be coming from.
For now you can download
"http://effbot.org/downloads/subprocess-0.1-20041012.win32-py2.3.exe"
from "http://effbot.org/downloads/"\. I'll post a new python2.3 build
shortly that includes this.
if mswindows:
import threading
import msvcrt
if 0: # <-- change this to use pywin32 instead of the _subprocess driver
import pywintypes
from win32api import GetStdHandle, STD_INPUT_HANDLE, \
STD_OUTPUT_HANDLE, STD_ERROR_HANDLE
from win32api import GetCurrentProcess, DuplicateHandle, \
GetModuleFileName, GetVersion
from win32con import DUPLICATE_SAME_ACCESS, SW_HIDE
from win32pipe import CreatePipe
from win32process import CreateProcess, STARTUPINFO, \
GetExitCodeProcess, STARTF_USESTDHANDLES, \
STARTF_USESHOWWINDOW, CREATE_NEW_CONSOLE
from win32event import WaitForSingleObject, INFINITE, WAIT_OBJECT_0
else:
from _subprocess import *
class STARTUPINFO:
dwFlags = 0
hStdInput = None
hStdOutput = None
hStdError = None
class pywintypes:
error = IOError
else:
import select
import errno
import fcntl
import pickle
···
On 3/16/06, daigos@...1043... <daigos@...1043...> wrote:
Hi All,
I installed the new release for win32 and python 2.3 but
every time that I import the pylab, I receive the
following error:
Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.
C:\Python23>python FIRExample --verbose-helpful
matplotlib data path
C:\Python23\lib\site-packages\matplotlib\mpl-data
$HOME=C:\Documents and Settings\a
CONFIGDIR=C:\Documents and Settings\a\.matplotlib
loaded rc file
C:\Python23\lib\site-packages\matplotlib\mpl-data\matplotlibrc
matplotlib version 0.87.2
verbose.level helpful
interactive is False
platform is win32
numerix Numeric 23.6
font search path
['C:\\Python23\\lib\\site-packages\\matplotlib\\mpl-data']
loaded ttfcache file C:\Documents and
Settings\a\.matplotlib\ttffont.
cache
Traceback (most recent call last):
File "FIRExample", line 2, in ?
import pylab
File "C:\Python23\Lib\site-packages\pylab.py", line 1,
in ?
from matplotlib.pylab import *
File
"C:\Python23\Lib\site-packages\matplotlib\pylab.py", line
219, in ?
new_figure_manager, draw_if_interactive, show =
pylab_setup()
File
"C:\Python23\Lib\site-packages\matplotlib\backends\__init__.py",
line 23,
in pylab_setup
globals(),locals(),[backend_name])
File
"C:\Python23\Lib\site-packages\matplotlib\backends\backend_tkagg.py",
lin
e 9, in ?
from backend_agg import FigureCanvasAgg
File
"C:\Python23\Lib\site-packages\matplotlib\backends\backend_agg.py",
line
86, in ?
from matplotlib.texmanager import TexManager
File
"C:\Python23\Lib\site-packages\matplotlib\texmanager.py",
line 37, in ?
from subprocess import Popen, STDOUT, PIPE
File
"C:\Python23\Lib\site-packages\subprocess\__init__.py",
line 366, in ?
from _subprocess import *
ImportError: No module named _subprocess
Also the User's Guide doesn't work. The pdf file seems to
be damaged.
Can you help me?
Thanks in advance
Daigos
INFINITO ADSLFLAT 4 MEGA: SOLO 27,90 EURO AL MESE IVA INCLUSA IP STATICO, BANDA GARANTITA 256Kbps ANTIVIRUS E FIREWALL INCLUSI NEL PREZZO
http://adsl.infinito.it
-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
matplotlib-users List Signup and Options
Hi All,
I installed the new release for win32 and python 2.3 but
every time that I import the pylab, I receive the
following error:
[...]
"C:\Python23\Lib\site-packages\matplotlib\texmanager.py",
line 37, in ?
from subprocess import Popen, STDOUT, PIPE
File
"C:\Python23\Lib\site-packages\subprocess\__init__.py",
line 366, in ?
from _subprocess import *
ImportError: No module named _subprocess
Do you have pywin32 installed on your computer? If so, you can change line 353
of subprocess/__init__.py to read "if 1:".
I'll work on a proper fix. In my defense, I posted to this list on March 8
asking for windows users with python-2.3 to test the subprocess module, along
with a link to the file on my webpage.
···
On Thursday 16 March 2006 14:33, daigos@...1043... wrote:
Since this is in 2.4, I almost want to say we should just point
python2.3 users to a download url if there is an error on import.
Kinda like IPython does if it can't import readline.
···
On 3/16/06, Darren Dale <dd55@...163...> wrote:
On Thursday 16 March 2006 14:33, daigos@...1043... wrote:
> Hi All,
>
> I installed the new release for win32 and python 2.3 but
> every time that I import the pylab, I receive the
> following error:
[...]
> "C:\Python23\Lib\site-packages\matplotlib\texmanager.py",
> line 37, in ?
> from subprocess import Popen, STDOUT, PIPE
> File
> "C:\Python23\Lib\site-packages\subprocess\__init__.py",
> line 366, in ?
> from _subprocess import *
> ImportError: No module named _subprocess
Do you have pywin32 installed on your computer? If so, you can change line 353
of subprocess/__init__.py to read "if 1:".
I'll work on a proper fix. In my defense, I posted to this list on March 8
asking for windows users with python-2.3 to test the subprocess module, along
with a link to the file on my webpage.
-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
matplotlib-users List Signup and Options