Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Turn get_sample_data into a much simpler function that merely returns…

… files from an installed sample_data directory. Include the sample data locally. Remove sample data that is no longer used.
  • Loading branch information...
commit 6c5e961080f26141a05d3f6cb2c393f4e980c910 1 parent 94c53e1
@mdboom authored
Showing with 6,271 additions and 329 deletions.
  1. +1 −0  MANIFEST.in
  2. +0 −27 examples/misc/sample_data_test.py
  3. +1 −1  examples/pylab_examples/centered_ticklabels.py
  4. +4 −4 examples/pylab_examples/data_helper.py
  5. +2 −4 examples/pylab_examples/image_demo2.py
  6. +2 −3 examples/pylab_examples/mri_demo.py
  7. +2 −3 examples/pylab_examples/mri_with_eeg.py
  8. +0 −14 lib/matplotlib/__init__.py
  9. +20 −259 lib/matplotlib/cbook.py
  10. BIN  lib/matplotlib/mpl-data/sample_data/AAPL.dat.gz
  11. BIN  lib/matplotlib/mpl-data/sample_data/INTC.dat.gz
  12. BIN  lib/matplotlib/mpl-data/sample_data/Minduka_Present_Blue_Pack.png
  13. +2 −0  lib/matplotlib/mpl-data/sample_data/README.txt
  14. +6,082 −0 lib/matplotlib/mpl-data/sample_data/aapl.csv
  15. BIN  lib/matplotlib/mpl-data/sample_data/aapl.npy.gz
  16. BIN  lib/matplotlib/mpl-data/sample_data/axes_grid/bivariate_normal.npy
  17. BIN  lib/matplotlib/mpl-data/sample_data/ct.raw.gz
  18. +11 −0 lib/matplotlib/mpl-data/sample_data/data_x_x2_x3.csv
  19. +11 −0 lib/matplotlib/mpl-data/sample_data/demodata.csv
  20. BIN  lib/matplotlib/mpl-data/sample_data/eeg.dat
  21. +65 −0 lib/matplotlib/mpl-data/sample_data/embedding_in_wx3.xrc
  22. BIN  lib/matplotlib/mpl-data/sample_data/goog.npy
  23. BIN  lib/matplotlib/mpl-data/sample_data/lena.jpg
  24. BIN  lib/matplotlib/mpl-data/sample_data/lena.png
  25. BIN  lib/matplotlib/mpl-data/sample_data/logo2.png
  26. BIN  lib/matplotlib/mpl-data/sample_data/membrane.dat
  27. +66 −0 lib/matplotlib/mpl-data/sample_data/msft.csv
  28. BIN  lib/matplotlib/mpl-data/sample_data/s1045.ima.gz
  29. +0 −4 lib/matplotlib/rcsetup.py
  30. +0 −10 matplotlibrc.template
  31. +2 −0  setup.py
View
1  MANIFEST.in
@@ -13,6 +13,7 @@ include lib/matplotlib/mpl-data/images/*
include lib/matplotlib/mpl-data/fonts/ttf/*
include lib/matplotlib/mpl-data/fonts/pdfcorefonts/*
include lib/matplotlib/mpl-data/fonts/afm/*
+recursive-include lib/matplotlib/mpl-data/sample_data/*
recursive-include license LICENSE*
recursive-include examples *
recursive-include doc *
View
27 examples/misc/sample_data_test.py
@@ -1,27 +0,0 @@
-"""
-Demonstrate how get_sample_data works with git revisions in the data.
-
- git clone git@github.com/matplotlib/sample_data.git
-
-and edit testdata.csv to add a new row. After committing the changes,
-when you rerun this script you will get the updated data (and the new
-git version will be cached in ~/.matplotlib/sample_data)
-"""
-
-from __future__ import print_function
-import matplotlib.mlab as mlab
-import matplotlib.cbook as cbook
-
-# get the file handle to the cached data and print the contents
-datafile = 'testdir/subdir/testsub.csv'
-fh = cbook.get_sample_data(datafile)
-print(fh.read())
-
-# make sure we can read it using csv2rec
-fh.seek(0)
-r = mlab.csv2rec(fh)
-
-print(mlab.rec2txt(r))
-
-fh.close()
-
View
2  examples/pylab_examples/centered_ticklabels.py
@@ -21,7 +21,7 @@
import matplotlib.pyplot as plt
# load some financial data; apple's stock price
-fh = cbook.get_sample_data('aapl.npy')
+fh = cbook.get_sample_data('aapl.npy.gz')
r = np.load(fh); fh.close()
r = r[-250:] # get the last 250 days
View
8 examples/pylab_examples/data_helper.py 100644 → 100755
@@ -11,13 +11,13 @@ def get_two_stock_data():
"""
ticker1, ticker2 = 'INTC', 'AAPL'
- file1 = cbook.get_sample_data('INTC.dat', asfileobj=False)
- file2 = cbook.get_sample_data('AAPL.dat', asfileobj=False)
- M1 = fromstring( open(file1, 'rb').read(), '<d')
+ file1 = cbook.get_sample_data('INTC.dat.gz')
+ file2 = cbook.get_sample_data('AAPL.dat.gz')
+ M1 = fromstring( file1.read(), '<d')
M1 = resize(M1, (M1.shape[0]/2,2) )
- M2 = fromstring( open(file2, 'rb').read(), '<d')
+ M2 = fromstring( file2.read(), '<d')
M2 = resize(M2, (M2.shape[0]/2,2) )
d1, p1 = M1[:,0], M1[:,1]
View
6 examples/pylab_examples/image_demo2.py
@@ -6,9 +6,8 @@
w, h = 512, 512
-datafile = cbook.get_sample_data('ct.raw', asfileobj=False)
-print ('loading %s' % datafile)
-s = open(datafile, 'rb').read()
+datafile = cbook.get_sample_data('ct.raw.gz', asfileobj=True)
+s = datafile.read()
A = fromstring(s, uint16).astype(float)
A *= 1.0/max(A)
A.shape = w, h
@@ -35,4 +34,3 @@
setp(gca(), 'xticklabels', [])
show()
-
View
5 examples/pylab_examples/mri_demo.py
@@ -4,9 +4,8 @@
from pylab import *
import matplotlib.cbook as cbook
# data are 256x256 16 bit integers
-dfile = cbook.get_sample_data('s1045.ima', asfileobj=False)
-print ('loading image %s' % dfile)
-im = np.fromstring(open(dfile, 'rb').read(), np.uint16).astype(float)
+dfile = cbook.get_sample_data('s1045.ima')
+im = np.fromstring(dfile.read(), np.uint16).astype(float)
im.shape = 256, 256
#imshow(im, ColormapJet(256))
View
5 examples/pylab_examples/mri_with_eeg.py
@@ -15,9 +15,8 @@
if 1: # load the data
# data are 256x256 16 bit integers
- dfile = cbook.get_sample_data('s1045.ima', asfileobj=False)
- print ('loading image %s' % dfile)
- im = np.fromstring(open(dfile, 'rb').read(), np.uint16).astype(float)
+ dfile = cbook.get_sample_data('s1045.ima.gz')
+ im = np.fromstring(dfile.read(), np.uint16).astype(float)
im.shape = 256, 256
if 1: # plot the MRI in pcolor
View
14 lib/matplotlib/__init__.py
@@ -813,20 +813,6 @@ def rc_params_from_file(fname, fail_on_error=False):
# this is the instance used by the matplotlib classes
rcParams = rc_params()
-if rcParams['examples.directory']:
- # paths that are intended to be relative to matplotlib_fname()
- # are allowed for the examples.directory parameter.
- # However, we will need to fully qualify the path because
- # Sphinx requires absolute paths.
- if not os.path.isabs(rcParams['examples.directory']):
- _basedir, _fname = os.path.split(matplotlib_fname())
- # Sometimes matplotlib_fname() can return relative paths,
- # Also, using realpath() guarentees that Sphinx will use
- # the same path that matplotlib sees (in case of weird symlinks).
- _basedir = os.path.realpath(_basedir)
- _fullpath = os.path.join(_basedir, rcParams['examples.directory'])
- rcParams['examples.directory'] = _fullpath
-
rcParamsOrig = rcParams.copy()
rcParamsDefault = RcParams([ (key, default) for key, (default, converter) in \
View
279 lib/matplotlib/cbook.py
@@ -4,44 +4,22 @@
"""
from __future__ import print_function
-import re, os, errno, sys, io, traceback, locale, threading, types
+import re, os, errno, sys, io, traceback, locale, threading
+import gzip
import time, datetime
import warnings
import numpy as np
import numpy.ma as ma
from weakref import ref, WeakKeyDictionary
-import cPickle
import os.path
-import random
from functools import reduce
-import matplotlib
-
major, minor1, minor2, s, tmp = sys.version_info
-# Handle the transition from urllib2 in Python 2 to urllib in Python 3
if major >= 3:
import types
- import urllib.request, urllib.error, urllib.parse
- def urllib_quote():
- return urllib.parse.quote
- def addinfourl(data, headers, url, code=None):
- return urllib.request.addinfourl(io.BytesIO(data),
- headers, url, code)
- urllib_HTTPSHandler = urllib.request.HTTPSHandler
- urllib_build_opener = urllib.request.build_opener
- urllib_URLError = urllib.error.URLError
else:
import new
- import urllib2
- def urllib_quote():
- return urllib2.quote
- def addinfourl(data, headers, url, code=None):
- return urllib2.addinfourl(io.BytesIO(data),
- headers, url, code)
- urllib_HTTPSHandler = urllib2.HTTPSHandler
- urllib_build_opener = urllib2.build_opener
- urllib_URLError = urllib2.URLError
# On some systems, locale.getpreferredencoding returns None,
# which can break unicode; and the sage project reports that
@@ -497,249 +475,32 @@ def to_filehandle(fname, flag='rU', return_opened=False):
def is_scalar_or_string(val):
return is_string_like(val) or not iterable(val)
-def _get_data_server(cache_dir, baseurl):
- class ViewVCCachedServer(urllib_HTTPSHandler):
- """
- Urllib handler that takes care of caching files.
- The file cache.pck holds the directory of files that have been cached.
- """
- def __init__(self, cache_dir, baseurl):
- urllib_HTTPSHandler.__init__(self)
- self.cache_dir = cache_dir
- self.baseurl = baseurl
- self.read_cache()
- self.remove_stale_files()
- self.opener = urllib_build_opener(self)
-
- def in_cache_dir(self, fn):
- # make sure the datadir exists
- reldir, filename = os.path.split(fn)
- datadir = os.path.join(self.cache_dir, reldir)
- if not os.path.exists(datadir):
- os.makedirs(datadir)
-
- return os.path.join(datadir, filename)
-
- def read_cache(self):
- """
- Read the cache file from the cache directory.
- """
- fn = self.in_cache_dir('cache.pck')
- if not os.path.exists(fn):
- self.cache = {}
- return
-
- with open(fn, 'rb') as f:
- cache = cPickle.load(f)
-
- # Earlier versions did not have the full paths in cache.pck
- for url, (fn, x, y) in cache.items():
- if not os.path.isabs(fn):
- cache[url] = (self.in_cache_dir(fn), x, y)
-
- # If any files are deleted, drop them from the cache
- for url, (fn, _, _) in cache.items():
- if not os.path.exists(fn):
- del cache[url]
-
- self.cache = cache
-
- def remove_stale_files(self):
- """
- Remove files from the cache directory that are not listed in
- cache.pck.
- """
- # TODO: remove empty subdirectories
- listed = set(fn for (_, (fn, _, _)) in self.cache.items())
- existing = reduce(set.union,
- (set(os.path.join(dirpath, fn) for fn in filenames)
- for (dirpath, _, filenames) in os.walk(self.cache_dir)))
- matplotlib.verbose.report(
- 'ViewVCCachedServer: files listed in cache.pck: %s' % listed,
- 'debug')
- matplotlib.verbose.report(
- 'ViewVCCachedServer: files in cache directory: %s' % existing,
- 'debug')
-
- for path in existing - listed - \
- set([self.in_cache_dir('cache.pck')]):
- matplotlib.verbose.report(
- 'ViewVCCachedServer:remove_stale_files: removing %s'%path,
- level='debug')
- os.remove(path)
-
- def write_cache(self):
- """
- Write the cache data structure into the cache directory.
- """
- fn = self.in_cache_dir('cache.pck')
- with open(fn, 'wb') as f:
- cPickle.dump(self.cache, f, -1)
-
- def cache_file(self, url, data, headers):
- """
- Store a received file in the cache directory.
- """
- # Pick a filename
- fn = url[len(self.baseurl):]
- fullpath = self.in_cache_dir(fn)
-
- with open(fullpath, 'wb') as f:
- f.write(data)
-
- # Update the cache
- self.cache[url] = (fullpath, headers.get('ETag'),
- headers.get('Last-Modified'))
- self.write_cache()
-
- # These urllib entry points are used:
- # http_request for preprocessing requests
- # http_error_304 for handling 304 Not Modified responses
- # http_response for postprocessing requests
-
- def https_request(self, req):
- """
- Make the request conditional if we have a cached file.
- """
- url = req.get_full_url()
- if url in self.cache:
- _, etag, lastmod = self.cache[url]
- if etag is not None:
- req.add_header("If-None-Match", etag)
- if lastmod is not None:
- req.add_header("If-Modified-Since", lastmod)
- matplotlib.verbose.report(
- "ViewVCCachedServer: request headers %s" % req.header_items(),
- "debug")
- return req
-
- def https_error_304(self, req, fp, code, msg, hdrs):
- """
- Read the file from the cache since the server has no newer version.
- """
- url = req.get_full_url()
- fn, _, _ = self.cache[url]
- matplotlib.verbose.report(
- 'ViewVCCachedServer: reading data file from cache file "%s"'
- %fn, 'debug')
- with open(fn, 'rb') as file:
- handle = addinfourl(file, hdrs, url)
- handle.code = 304
- return handle
-
- def https_response(self, req, response):
- """
- Update the cache with the returned file.
- """
- matplotlib.verbose.report(
- 'ViewVCCachedServer: received response %d: %s'
- % (response.code, response.msg), 'debug')
- if response.code != 200:
- return response
- else:
- data = response.read()
- self.cache_file(req.get_full_url(), data, response.headers)
- result = addinfourl(data,
- response.headers,
- req.get_full_url())
- result.code = response.code
- result.msg = response.msg
- return result
-
- def get_sample_data(self, fname, asfileobj=True):
- """
- Check the cachedirectory for a sample_data file. If it does
- not exist, fetch it with urllib from the git repo and
- store it in the cachedir.
-
- If asfileobj is True, a file object will be returned. Else the
- path to the file as a string will be returned.
- """
- # TODO: time out if the connection takes forever
- # (may not be possible with urllib only - spawn a helper process?)
-
- quote = urllib_quote()
-
- # retrieve the URL for the side effect of refreshing the cache
- url = self.baseurl + quote(fname)
- error = 'unknown error'
- matplotlib.verbose.report('ViewVCCachedServer: retrieving %s'
- % url, 'debug')
- try:
- response = self.opener.open(url)
- except urllib_URLError as e:
- # could be a missing network connection
- error = str(e)
-
- cached = self.cache.get(url)
- if cached is None:
- msg = 'file %s not in cache; received %s when trying to '\
- 'retrieve' % (fname, error)
- raise KeyError(msg)
-
- fname = cached[0]
-
- if asfileobj:
- if (os.path.splitext(fname)[-1].lower() in
- ('.csv', '.xrc', '.txt')):
- mode = 'r'
- else:
- mode = 'rb'
- return open(fname, mode)
- else:
- return fname
-
- return ViewVCCachedServer(cache_dir, baseurl)
-
def get_sample_data(fname, asfileobj=True):
"""
- Check the cachedirectory ~/.matplotlib/sample_data for a sample_data
- file. If it does not exist, fetch it with urllib from the mpl git repo
+ Return a sample data file. *fname* is a path relative to the
+ `mpl-data/sample_data` directory. If *asfileobj* is `True`
+ return a file object, otherwise just a file path.
- https://raw.github.com/matplotlib/sample_data/master
-
- and store it in the cachedir.
-
- If asfileobj is True, a file object will be returned. Else the
- path to the file as a string will be returned
-
- To add a datafile to this directory, you need to check out
- sample_data from matplotlib git::
-
- git clone git@github.com:matplotlib/sample_data
-
- and git add the data file you want to support. This is primarily
- intended for use in mpl examples that need custom data.
-
- To bypass all downloading, set the rc parameter examples.download to False
- and examples.directory to the directory where we should look.
+ If the filename ends in .gz, the file is implicitly ungzipped.
"""
+ root = os.path.join(os.path.dirname(__file__), "mpl-data", "sample_data")
+ path = os.path.join(root, fname)
- if not matplotlib.rcParams['examples.download']:
- directory = matplotlib.rcParams['examples.directory']
- f = os.path.join(directory, fname)
- if asfileobj:
- return open(f, 'rb')
+ if asfileobj:
+ if (os.path.splitext(fname)[-1].lower() in
+ ('.csv', '.xrc', '.txt')):
+ mode = 'r'
else:
- return f
+ mode = 'rb'
- myserver = get_sample_data.myserver
- if myserver is None:
- configdir = matplotlib.get_configdir()
- cachedir = os.path.join(configdir, 'sample_data')
- baseurl = 'https://raw.github.com/matplotlib/sample_data/master/'
- try:
- myserver = _get_data_server(cachedir, baseurl)
- get_sample_data.myserver = myserver
- except ImportError:
- raise ImportError(
- 'Python must be built with SSL support to fetch sample data '
- 'from the matplotlib repository')
-
- return myserver.get_sample_data(fname, asfileobj=asfileobj)
-
-get_sample_data.myserver = None
+ base, ext = os.path.splitext(fname)
+ if ext == '.gz':
+ return gzip.open(path, mode)
+ else:
+ return open(path, mode)
+ else:
+ return path
def flatten(seq, scalarp=is_scalar_or_string):
"""
View
BIN  lib/matplotlib/mpl-data/sample_data/AAPL.dat.gz
Binary file not shown
View
BIN  lib/matplotlib/mpl-data/sample_data/INTC.dat.gz
Binary file not shown
View
BIN  lib/matplotlib/mpl-data/sample_data/Minduka_Present_Blue_Pack.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
2  lib/matplotlib/mpl-data/sample_data/README.txt
@@ -0,0 +1,2 @@
+This is the sample data needed for some of matplotlib's examples and
+docs. See matplotlib.cbook.get_sample_data for more info.
View
6,082 lib/matplotlib/mpl-data/sample_data/aapl.csv
6,082 additions, 0 deletions not shown
View
BIN  lib/matplotlib/mpl-data/sample_data/aapl.npy.gz
Binary file not shown
View
BIN  lib/matplotlib/mpl-data/sample_data/axes_grid/bivariate_normal.npy
Binary file not shown
View
BIN  lib/matplotlib/mpl-data/sample_data/ct.raw.gz
Binary file not shown
View
11 lib/matplotlib/mpl-data/sample_data/data_x_x2_x3.csv
@@ -0,0 +1,11 @@
+ 0 0 0
+ 1 1 1
+ 2 4 8
+ 3 9 27
+ 4 16 64
+ 5 25 125
+ 6 36 216
+ 7 49 343
+ 8 64 512
+ 9 81 729
+10 100 1000
View
11 lib/matplotlib/mpl-data/sample_data/demodata.csv
@@ -0,0 +1,11 @@
+clientid,date,weekdays,gains,prices,up
+0,2008-04-30,Wed,-0.52458192906686452,7791404.0091921333,False
+1,2008-05-01,Thu,0.076191536201738269,3167180.7366340165,True
+2,2008-05-02,Fri,-0.86850970062880861,9589766.9613829032,False
+3,2008-05-03,Sat,-0.42701083852713395,8949415.1867596991,False
+4,2008-05-04,Sun,0.2532553652693274,937163.44375252665,True
+5,2008-05-05,Mon,-0.68151636911081892,949579.88022264629,False
+6,2008-05-06,Tue,0.0071911579626532168,7268426.906552773,True
+7,2008-05-07,Wed,0.67449747200412147,7517014.782897247,True
+8,2008-05-08,Thu,-1.1841008656818983,1920959.5423492221,False
+9,2008-05-09,Fri,-1.5803692595811152,8456240.6198725495,False
View
BIN  lib/matplotlib/mpl-data/sample_data/eeg.dat
Binary file not shown
View
65 lib/matplotlib/mpl-data/sample_data/embedding_in_wx3.xrc
@@ -0,0 +1,65 @@
+<?xml version="1.0" ?>
+<resource>
+ <object class="wxFrame" name="MainFrame">
+ <title>embedding_in_wx3</title>
+ <object class="wxPanel" name="MainPanel">
+ <object class="wxBoxSizer">
+ <orient>wxVERTICAL</orient>
+ <object class="sizeritem">
+ <object class="wxStaticText">
+ <label>Check out this whizz-bang stuff!</label>
+ <style>wxALIGN_CENTRE</style>
+ </object>
+ <option>0</option>
+ <flag>wxALL|wxEXPAND</flag>
+ <border>5</border>
+ </object>
+ <object class="sizeritem">
+ <object class="wxBoxSizer">
+ <orient>wxHORIZONTAL</orient>
+ <object class="sizeritem">
+ <object class="wxButton" name="whiz_button">
+ <label>whiz</label>
+ </object>
+ <option>0</option>
+ <flag>wxALL|wxEXPAND</flag>
+ <border>2</border>
+ </object>
+ <object class="sizeritem">
+ <object class="wxButton" name="bang_button">
+ <label>bang</label>
+ </object>
+ <option>0</option>
+ <flag>wxALL|wxEXPAND</flag>
+ <border>2</border>
+ </object>
+ <object class="sizeritem">
+ <object class="wxStaticText" name="">
+ <label>bang count:</label>
+ <style>wxALIGN_RIGHT</style>
+ </object>
+ <option>1</option>
+ <flag>wxALL|wxEXPAND</flag>
+ <border>2</border>
+ </object>
+ <object class="sizeritem">
+ <object class="wxTextCtrl" name="bang_count">
+ <value>0</value>
+ </object>
+ <option>0</option>
+ <flag>wxEXPAND</flag>
+ </object>
+ </object>
+ <option>0</option>
+ <flag>wxLEFT|wxRIGHT|wxEXPAND</flag>
+ <border>5</border>
+ </object>
+ <object class="sizeritem">
+ <object class="wxPanel" name="plot_container_panel"/>
+ <option>1</option>
+ <flag>wxEXPAND</flag>
+ </object>
+ </object>
+ </object>
+ </object>
+</resource>
View
BIN  lib/matplotlib/mpl-data/sample_data/goog.npy
Binary file not shown
View
BIN  lib/matplotlib/mpl-data/sample_data/lena.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  lib/matplotlib/mpl-data/sample_data/lena.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  lib/matplotlib/mpl-data/sample_data/logo2.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  lib/matplotlib/mpl-data/sample_data/membrane.dat
Binary file not shown
View
66 lib/matplotlib/mpl-data/sample_data/msft.csv
@@ -0,0 +1,66 @@
+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
+9-Sep-03,28.65,28.71,28.31,28.37,44315200,28.21
+8-Sep-03,28.39,28.92,28.34,28.84,46105300,28.68
+5-Sep-03,28.23,28.75,28.17,28.38,64024500,28.22
+4-Sep-03,28.10,28.47,27.99,28.43,59840800,28.27
+3-Sep-03,27.42,28.40,27.38,28.30,109437800,28.14
+2-Sep-03,26.70,27.30,26.47,27.26,74168896,27.11
+29-Aug-03,26.46,26.55,26.35,26.52,34503000,26.37
+28-Aug-03,26.50,26.58,26.24,26.51,46211200,26.36
+27-Aug-03,26.51,26.58,26.30,26.42,30633900,26.27
+26-Aug-03,26.31,26.67,25.96,26.57,47546000,26.42
+25-Aug-03,26.31,26.54,26.23,26.50,36132900,26.35
+22-Aug-03,26.78,26.95,26.21,26.22,65846300,26.07
+21-Aug-03,26.65,26.73,26.13,26.24,63802700,26.09
+20-Aug-03,26.30,26.53,26.00,26.45,56739300,26.30
+19-Aug-03,25.85,26.65,25.77,26.62,72952896,26.47
+18-Aug-03,25.56,25.83,25.46,25.70,45817400,25.56
+15-Aug-03,25.61,25.66,25.43,25.54,27607900,25.40
+14-Aug-03,25.66,25.71,25.52,25.63,37338300,25.49
+13-Aug-03,25.79,25.89,25.50,25.60,39636900,25.46
+12-Aug-03,25.71,25.77,25.45,25.73,38208400,25.59
+11-Aug-03,25.61,25.99,25.54,25.61,36433900,25.47
+8-Aug-03,25.88,25.98,25.50,25.58,33241400,25.44
+7-Aug-03,25.72,25.81,25.45,25.71,44258500,25.57
+6-Aug-03,25.54,26.19,25.43,25.65,56294900,25.51
+5-Aug-03,26.31,26.54,25.60,25.66,58825800,25.52
+4-Aug-03,26.15,26.41,25.75,26.18,51825600,26.03
+1-Aug-03,26.33,26.51,26.12,26.17,42649700,26.02
+31-Jul-03,26.60,26.99,26.31,26.41,64504800,26.26
+30-Jul-03,26.46,26.57,26.17,26.23,41240300,26.08
+29-Jul-03,26.88,26.90,26.24,26.47,62391100,26.32
+28-Jul-03,26.94,27.00,26.49,26.61,52658300,26.46
+25-Jul-03,26.28,26.95,26.07,26.89,54173000,26.74
+24-Jul-03,26.78,26.92,25.98,26.00,53556600,25.85
+23-Jul-03,26.42,26.65,26.14,26.45,49828200,26.30
+22-Jul-03,26.28,26.56,26.13,26.38,51791000,26.23
+21-Jul-03,26.87,26.91,26.00,26.04,48480800,25.89
+18-Jul-03,27.11,27.23,26.75,26.89,63388400,26.74
+17-Jul-03,27.14,27.27,26.54,26.69,72805000,26.54
+16-Jul-03,27.56,27.62,27.20,27.52,49838900,27.37
+15-Jul-03,27.47,27.53,27.10,27.27,53567600,27.12
+14-Jul-03,27.63,27.81,27.05,27.40,60464400,27.25
+11-Jul-03,26.95,27.45,26.89,27.31,50377300,27.16
+10-Jul-03,27.25,27.42,26.59,26.91,55350800,26.76
+9-Jul-03,27.56,27.70,27.25,27.47,62300700,27.32
+8-Jul-03,27.26,27.80,27.25,27.70,61896800,27.55
+7-Jul-03,27.02,27.55,26.95,27.42,88960800,27.27
+3-Jul-03,26.69,26.95,26.41,26.50,39440900,26.35
+2-Jul-03,26.50,26.93,26.45,26.88,94069296,26.73
+1-Jul-03,25.59,26.20,25.39,26.15,60926000,26.00
+30-Jun-03,25.94,26.12,25.50,25.64,48073100,25.50
+27-Jun-03,25.95,26.34,25.53,25.63,76040304,25.49
+26-Jun-03,25.39,26.51,25.21,25.75,51758100,25.61
+25-Jun-03,25.64,25.99,25.14,25.26,60483500,25.12
+24-Jun-03,25.65,26.04,25.52,25.70,51820300,25.56
+23-Jun-03,26.14,26.24,25.49,25.78,52584500,25.64
+20-Jun-03,26.34,26.38,26.01,26.33,86048896,26.18
+19-Jun-03,26.09,26.39,26.01,26.07,63626900,25.92
View
BIN  lib/matplotlib/mpl-data/sample_data/s1045.ima.gz
Binary file not shown
View
4 lib/matplotlib/rcsetup.py
@@ -612,10 +612,6 @@ def __call__(self, s):
'keymap.xscale' : [['k', 'L'], validate_stringlist],
'keymap.all_axes' : ['a', validate_stringlist],
- # sample data
- 'examples.download' : [True, validate_bool],
- 'examples.directory' : ['', str],
-
# Animation settings
'animation.writer' : ['ffmpeg', validate_movie_writer],
'animation.codec' : ['mpeg4', str],
View
10 matplotlibrc.template
@@ -423,16 +423,6 @@ text.hinting_factor : 8 # Specifies the amount of softness for hinting in the
#keymap.xscale : L, k # toggle scaling of x-axes ('log'/'linear')
#keymap.all_axes : a # enable all axes
-# Control downloading of example data. Various examples download some
-# data from the Matplotlib git repository to avoid distributing extra
-# files, but sometimes you want to avoid that. In that case set
-# examples.download to False and examples.directory to the directory
-# where you have a checkout of https://github.com/matplotlib/sample_data
-
-#examples.download : True # False to bypass downloading mechanism
-#examples.directory : '' # directory to look in if download is false
-#
-
###ANIMATION settings
#animation.writer : ffmpeg # MovieWriter 'backend' to use
#animation.codec : mp4 # Codec to use for writing movie
View
2  setup.py
@@ -104,6 +104,8 @@
'mpl-data/example/*.npy',
'mpl-data/matplotlibrc',
'mpl-data/*.glade',
+ 'mpl-data/sample_data/*.*',
+ 'mpl-data/sample_data/axes_grid/*.*',
'backends/Matplotlib.nib/*',
]}
Please sign in to comment.
Something went wrong with that request. Please try again.