Revision: 7377
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7377&view=rev
Author: jdh2358
Date: 2009-08-05 15:52:29 +0000 (Wed, 05 Aug 2009)
Log Message:
-----------
moved the mpl example data to sample data and ported over the examples
Modified Paths:
--------------
trunk/matplotlib/examples/api/date_demo.py
trunk/matplotlib/examples/pylab_examples/centered_ticklabels.py
trunk/matplotlib/examples/pylab_examples/scatter_demo2.py
trunk/matplotlib/lib/matplotlib/__init__.py
Added Paths:
-----------
trunk/sample_data/aapl.npy
trunk/sample_data/goog.npy
trunk/sample_data/msft_nasdaq.npy
Removed Paths:
-------------
trunk/matplotlib/lib/matplotlib/mpl-data/example/aapl.npy
trunk/matplotlib/lib/matplotlib/mpl-data/example/goog.npy
trunk/matplotlib/lib/matplotlib/mpl-data/example/msft_nasdaq.npy
Modified: trunk/matplotlib/examples/api/date_demo.py
===================================================================
--- trunk/matplotlib/examples/api/date_demo.py 2009-08-05 15:47:20 UTC (rev
7376)
+++ trunk/matplotlib/examples/api/date_demo.py 2009-08-05 15:52:29 UTC (rev
7377)
@@ -17,6 +17,7 @@
import matplotlib.pyplot as plt
import matplotlib.dates as mdates
import matplotlib.mlab as mlab
+import matplotlib.cbook as cbook
years = mdates.YearLocator() # every year
months = mdates.MonthLocator() # every month
@@ -26,7 +27,7 @@
# open, close, volume, adj_close from the mpl-data/example directory.
# The record array stores python datetime.date as an object array in
# the date column
-datafile = matplotlib.get_example_data('goog.npy')
+datafile = cbook.get_sample_data('goog.npy')
r = np.load(datafile).view(np.recarray)
fig = plt.figure()
Modified: trunk/matplotlib/examples/pylab_examples/centered_ticklabels.py
===================================================================
--- trunk/matplotlib/examples/pylab_examples/centered_ticklabels.py
2009-08-05 15:47:20 UTC (rev 7376)
+++ trunk/matplotlib/examples/pylab_examples/centered_ticklabels.py
2009-08-05 15:52:29 UTC (rev 7377)
@@ -15,12 +15,13 @@
import datetime
import numpy as np
import matplotlib
+import matplotlib.cbook as cbook
import matplotlib.dates as dates
import matplotlib.ticker as ticker
import matplotlib.pyplot as plt
# load some financial data; apple's stock price
-fh = matplotlib.get_example_data('aapl.npy')
+fh = cbook.get_sample_data('aapl.npy')
r = np.load(fh); fh.close()
r = r[-250:] # get the last 250 days
Modified: trunk/matplotlib/examples/pylab_examples/scatter_demo2.py
===================================================================
--- trunk/matplotlib/examples/pylab_examples/scatter_demo2.py 2009-08-05
15:47:20 UTC (rev 7376)
+++ trunk/matplotlib/examples/pylab_examples/scatter_demo2.py 2009-08-05
15:52:29 UTC (rev 7377)
@@ -5,12 +5,13 @@
import numpy as np
import matplotlib.pyplot as plt
import matplotlib.mlab as mlab
+import matplotlib.cbook as cbook
# load a numpy record array from yahoo csv data with fields date,
# open, close, volume, adj_close from the mpl-data/example directory.
# The record array stores python datetime.date as an object array in
# the date column
-datafile = matplotlib.get_example_data('goog.npy')
+datafile = cbook.get_sample_data('goog.npy')
r = np.load(datafile).view(np.recarray)
r = r[-250:] # get the most recent 250 trading days
Modified: trunk/matplotlib/lib/matplotlib/__init__.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/__init__.py 2009-08-05 15:47:20 UTC (rev
7376)
+++ trunk/matplotlib/lib/matplotlib/__init__.py 2009-08-05 15:52:29 UTC (rev
7377)
@@ -490,17 +490,9 @@
def get_example_data(fname):
"""
- return a filehandle to one of the example files in mpl-data/example
-
- *fname*
- the name of one of the files in mpl-data/example
+ get_example_data is deprecated -- use matplotlib.cbook.get_sample_data
instead
"""
- datadir = os.path.join(get_data_path(), 'example')
- fullpath = os.path.join(datadir, fname)
- if not os.path.exists(fullpath):
- raise IOError('could not find matplotlib example file "%s" in data
directory "%s"'%(
- fname, datadir))
- return file(fullpath, 'rb')
+ raise NotImplementedError('get_example_data is deprecated -- use
matplotlib.cbook.get_sample_data instead')
def get_py2exe_datafiles():
Deleted: trunk/matplotlib/lib/matplotlib/mpl-data/example/aapl.npy
===================================================================
(Binary files differ)
Deleted: trunk/matplotlib/lib/matplotlib/mpl-data/example/goog.npy
===================================================================
(Binary files differ)
Deleted: trunk/matplotlib/lib/matplotlib/mpl-data/example/msft_nasdaq.npy
===================================================================
(Binary files differ)
Copied: trunk/sample_data/aapl.npy (from rev 7363,
trunk/matplotlib/lib/matplotlib/mpl-data/example/aapl.npy)
===================================================================
(Binary files differ)
Copied: trunk/sample_data/goog.npy (from rev 7363,
trunk/matplotlib/lib/matplotlib/mpl-data/example/goog.npy)
===================================================================
(Binary files differ)
Copied: trunk/sample_data/msft_nasdaq.npy (from rev 7363,
trunk/matplotlib/lib/matplotlib/mpl-data/example/msft_nasdaq.npy)
===================================================================
(Binary files differ)
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now. http://p.sf.net/sfu/bobj-july
_______________________________________________
Matplotlib-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins