FW: Pylab load dates
I there someone on this list that can build matplotlib for the mac? I used the matplotlib package in the superpack and also tried the one on macpython to run the example below to read dates from a csv file but it didn't work. Apparently because the pytz module is not available in the matplotlib packages for the mac. I tried compiling matplotlib myself but got the following error on build: gcc: cannot specify -o with -c or -S and multiple compilations Vincent from pylab import figure, show, datestr2num, load dates, closes = load( 'data/msft.csv', delimiter=',', converters={0:datestr2num}, skiprows=1, usecols=(0,2), unpack=True) Date,Open,High,Low,Close,Volume,Adj. Close* 19-Sep-03,29.76,29.97,29.52,29.96,92433800,29.79 18-Sep-03,28.49,29.51,28.42,29.50,67268096,29.34 17-Sep-03,28.76,28.95,28.47,28.50,47221600,28.34 16-Sep-03,28.41,28.95,28.32,28.90,52060600,28.74 15-Sep-03,28.37,28.61,28.33,28.36,41432300,28.20 12-Sep-03,27.48,28.40,27.45,28.34,55777200,28.18 11-Sep-03,27.66,28.11,27.59,27.84,37813300,27.68 10-Sep-03,28.03,28.18,27.48,27.55,54763500,27.40
Interesting. I never tried the date stuff. Bet it would probably die on my end too. --b On Dec 30, 2006, at 8:13 PM, Vincent Nijs wrote:
I there someone on this list that can build matplotlib for the mac? I used the matplotlib package in the superpack and also tried the one on macpython to run the example below to read dates from a csv file but it didn't work. Apparently because the pytz module is not available in the matplotlib packages for the mac.
I tried compiling matplotlib myself but got the following error on build:
gcc: cannot specify -o with -c or -S and multiple compilations
Vincent
from pylab import figure, show, datestr2num, load dates, closes = load( 'data/msft.csv', delimiter=',', converters={0:datestr2num}, skiprows=1, usecols=(0,2), unpack=True)
Date,Open,High,Low,Close,Volume,Adj. Close* 19-Sep-03,29.76,29.97,29.52,29.96,92433800,29.79 18-Sep-03,28.49,29.51,28.42,29.50,67268096,29.34 17-Sep-03,28.76,28.95,28.47,28.50,47221600,28.34 16-Sep-03,28.41,28.95,28.32,28.90,52060600,28.74 15-Sep-03,28.37,28.61,28.33,28.36,41432300,28.20 12-Sep-03,27.48,28.40,27.45,28.34,55777200,28.18 11-Sep-03,27.66,28.11,27.59,27.84,37813300,27.68 10-Sep-03,28.03,28.18,27.48,27.55,54763500,27.40
_______________________________________________ SciPy-user mailing list SciPy-user@scipy.org http://projects.scipy.org/mailman/listinfo/scipy-user
p.s. when I tried my own build (via easy_install, which is pretty slick) I got the same blasted error. --b On Dec 30, 2006, at 8:13 PM, Vincent Nijs wrote:
I tried compiling matplotlib myself but got the following error on build:
gcc: cannot specify -o with -c or -S and multiple compilations
Vincent
"Vincent" == Vincent Nijs <v-nijs@kellogg.northwestern.edu> writes:
Vincent> I there someone on this list that can build matplotlib Vincent> for the mac? I used the matplotlib package in the Vincent> superpack and also tried the one on macpython to run the Vincent> example below to read dates from a csv file but it didn't Vincent> work. Apparently because the pytz module is not Vincent> available in the matplotlib packages for the mac. There are instructions on how to build a whole bunch of packages on the Intel Mac here: https://svn.enthought.com/enthought/wiki/IntelMacPython25 I just added some instructions on how to build matplotlib (with the Tk and wxPython backends) to this list. HTH, prabhu
participants (3)
-
belinda thom
-
Prabhu Ramachandran
-
Vincent Nijs