.. _pylab_examples-data_helper: pylab_examples example code: data_helper.py =========================================== .. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/pylab_examples/data_helper.py :: #!/usr/bin/env python # Some functions to load a return data for the plot demos from numpy import fromstring, argsort, take, array, resize import matplotlib.cbook as cbook def get_two_stock_data(): """ load stock time and price data for two stocks The return values (d1,p1,d2,p2) are the trade time (in days) and prices for stocks 1 and 2 (intc and aapl) """ ticker1, ticker2 = 'INTC', 'AAPL' file1 = cbook.get_sample_data('INTC.dat.gz') file2 = cbook.get_sample_data('AAPL.dat.gz') M1 = fromstring( file1.read(), '