problem reading data file in stock_demo.py

Hello, i cant get stock_demo.py to run correctly. it

    > seems there is a problem reading the data files,
    > specifically using numarray/Numeric's "fromstring" on the
    > example data files. the first result below is with
    > numarray and the second is with Numeric. im using python
    > 2.3.4 and matplotlib 0.54.2 win32 for python 2.3.

Where are you getting the examples dir from? I notice that I failed
to upload a zip file that includes the examples directory with the
0.54.2 release. Are you using one from a previous release?

It looks like you make have a corrupt stock data file. I was able to
load the stock_demo example using both the numeric and numarray win32
builds, with either numerix setting in my rc file.

I did, however, discover a bug in the navigation code in that example
related to data clipping.

The zip file below fixes the latter problem. Unzip it in your
site-packages dir (do not remove the old matplotlib code, just unzip
this over it)

  http://nitace.bsd.uchicago.edu:8080/files/share/matplotlib-py.60a.zip

And get a fresh examples dir from

  http://nitace.bsd.uchicago.edu:8080/files/share/matplotlib-examples.60a.zip

Hope this helps,
JDH

John,

Tks vm for your reply. I was able to get the script to run with your
"examples" directory. Much appreciated.

However, when I unzipped the py.60a.zip files over my site-packages
directory and re-ran the script, I got the following error:

C:\Matplotlib\matplotlib src\examples>python stock_demo.py
Traceback (most recent call last):
  File "stock_demo.py", line 4, in ?
    from matplotlib.matlab import *
  File "C:\Python23\lib\site-packages\matplotlib\matlab.py", line 134, in ?
    from axes import Axes
  File "C:\Python23\lib\site-packages\matplotlib\axes.py", line 9, in ?
    from artist import Artist
  File "C:\Python23\lib\site-packages\matplotlib\artist.py", line 4, in ?
    from transforms import identity_transform
  File "C:\Python23\lib\site-packages\matplotlib\transforms.py", line 181,
in ?
    from _transforms import IDENTITY, LOG10, Func, FuncXY, PolarXY
ImportError: cannot import name IDENTITY

C:\Matplotlib\matplotlib src\examples>

Is version 0.54.2 not the correct starting point for doing this unzip? If
solving this is a hassle, I don't mind going back to the old 0.54.2 and
waiting for the bug fixes that come with the next proper release.

Tks again,

Tom

···

-----Original Message-----
From: John Hunter [mailto:jdhunter@…4…]
Sent: Monday, June 21, 2004 2:26 PM
To: Thomas Barket
Cc: matplotlib-users@lists.sourceforge.net
Subject: Re: [Matplotlib-users] problem reading data file in stock_demo.py

    > Hello, i cant get stock_demo.py to run correctly. it
    > seems there is a problem reading the data files,
    > specifically using numarray/Numeric's "fromstring" on the
    > example data files. the first result below is with
    > numarray and the second is with Numeric. im using python
    > 2.3.4 and matplotlib 0.54.2 win32 for python 2.3.

Where are you getting the examples dir from? I notice that I failed to
upload a zip file that includes the examples directory with the
0.54.2 release. Are you using one from a previous release?

It looks like you make have a corrupt stock data file. I was able to load
the stock_demo example using both the numeric and numarray win32 builds,
with either numerix setting in my rc file.

I did, however, discover a bug in the navigation code in that example
related to data clipping.

The zip file below fixes the latter problem. Unzip it in your site-packages
dir (do not remove the old matplotlib code, just unzip this over it)

  http://nitace.bsd.uchicago.edu:8080/files/share/matplotlib-py.60a.zip

And get a fresh examples dir from

http://nitace.bsd.uchicago.edu:8080/files/share/matplotlib-examples.60a.zip

Hope this helps,
JDH