|
From: <jd...@us...> - 2009-08-05 16:23:16
|
Revision: 7383
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7383&view=rev
Author: jdh2358
Date: 2009-08-05 16:23:06 +0000 (Wed, 05 Aug 2009)
Log Message:
-----------
removed examples/data; ported all examples to use sample_data
Modified Paths:
--------------
trunk/matplotlib/examples/pylab_examples/date_index_formatter.py
trunk/matplotlib/examples/pylab_examples/image_demo2.py
trunk/matplotlib/examples/pylab_examples/load_converter.py
trunk/matplotlib/examples/pylab_examples/loadrec.py
trunk/matplotlib/examples/pylab_examples/logo.py
trunk/matplotlib/examples/pylab_examples/plotfile_demo.py
Modified: trunk/matplotlib/examples/pylab_examples/date_index_formatter.py
===================================================================
--- trunk/matplotlib/examples/pylab_examples/date_index_formatter.py 2009-08-05 16:21:23 UTC (rev 7382)
+++ trunk/matplotlib/examples/pylab_examples/date_index_formatter.py 2009-08-05 16:23:06 UTC (rev 7383)
@@ -14,7 +14,7 @@
import matplotlib.cbook as cbook
from matplotlib.ticker import Formatter
-datafile = cbook.get_sample_data('msft.csv', asobj=False)
+datafile = cbook.get_sample_data('msft.csv', asfileobj=False)
print 'loading', datafile
r = csv2rec(datafile)[-40:]
Modified: trunk/matplotlib/examples/pylab_examples/image_demo2.py
===================================================================
--- trunk/matplotlib/examples/pylab_examples/image_demo2.py 2009-08-05 16:21:23 UTC (rev 7382)
+++ trunk/matplotlib/examples/pylab_examples/image_demo2.py 2009-08-05 16:23:06 UTC (rev 7383)
@@ -1,9 +1,10 @@
#!/usr/bin/env python
from pylab import *
+import matplotlib.cbook as cbook
w, h = 512, 512
-datafile = cbook.get_sample_data('ct.raw', asobj=False)
+datafile = cbook.get_sample_data('ct.raw', asfileobj=False)
print 'loading', datafile
s = file(datafile, 'rb').read()
A = fromstring(s, uint16).astype(float)
Modified: trunk/matplotlib/examples/pylab_examples/load_converter.py
===================================================================
--- trunk/matplotlib/examples/pylab_examples/load_converter.py 2009-08-05 16:21:23 UTC (rev 7382)
+++ trunk/matplotlib/examples/pylab_examples/load_converter.py 2009-08-05 16:23:06 UTC (rev 7383)
@@ -4,7 +4,7 @@
from pylab import figure, show
import matplotlib.cbook as cbook
-datafile = cbook.get_sample_data('msft.csv', asobj=False)
+datafile = cbook.get_sample_data('msft.csv', asfileobj=False)
print 'loading', datafile
dates, closes = np.loadtxt(
Modified: trunk/matplotlib/examples/pylab_examples/loadrec.py
===================================================================
--- trunk/matplotlib/examples/pylab_examples/loadrec.py 2009-08-05 16:21:23 UTC (rev 7382)
+++ trunk/matplotlib/examples/pylab_examples/loadrec.py 2009-08-05 16:23:06 UTC (rev 7383)
@@ -2,7 +2,7 @@
from pylab import figure, show
import matplotlib.cbook as cbook
-datafile = cbook.get_sample_data('msft.csv', asobj=False)
+datafile = cbook.get_sample_data('msft.csv', asfileobj=False)
print 'loading', datafile
a = mlab.csv2rec(datafile)
a.sort()
Modified: trunk/matplotlib/examples/pylab_examples/logo.py
===================================================================
--- trunk/matplotlib/examples/pylab_examples/logo.py 2009-08-05 16:21:23 UTC (rev 7382)
+++ trunk/matplotlib/examples/pylab_examples/logo.py 2009-08-05 16:23:06 UTC (rev 7383)
@@ -4,7 +4,7 @@
# convert data to mV
-datafile = cbook.get_sample_data('membrane.dat', asobj=False)
+datafile = cbook.get_sample_data('membrane.dat', asfileobj=False)
print 'loading', datafile
x = 1000*0.1*fromstring(file(datafile, 'rb').read(), float32)
Modified: trunk/matplotlib/examples/pylab_examples/plotfile_demo.py
===================================================================
--- trunk/matplotlib/examples/pylab_examples/plotfile_demo.py 2009-08-05 16:21:23 UTC (rev 7382)
+++ trunk/matplotlib/examples/pylab_examples/plotfile_demo.py 2009-08-05 16:23:06 UTC (rev 7383)
@@ -1,8 +1,8 @@
from pylab import plotfile, show, gca
import matplotlib.cbook as cbook
-fname = cbook.get_sample_data('msft.csv', asobj=False)
-fname2 = cbook.get_sample_data('data_x_x2_x3.csv', asobj=False)
+fname = cbook.get_sample_data('msft.csv', asfileobj=False)
+fname2 = cbook.get_sample_data('data_x_x2_x3.csv', asfileobj=False)
# test 1; use ints
plotfile(fname, (0,5,6))
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|