tushare作图

如何从tushare读取平安银行股价,并作图

#!/usr/bin/python2.7

import matplotlib
import tushare as ts
import pandas as pd
import matplotlib.pyplot as plt
fig = plt.gcf()
df=ts.get_hist_data('000001',start='2015-11-01',end='2015-12-31')
with pd.plot_params.use('x_compat', True):
    df.high.plot(color='r',figsize=(10,4),grid='on')
    df.low.plot(color='b',figsize=(10,4),grid='on')
    fig.savefig('/Users/david/pythongraph/graph000001.png')

你可能感兴趣的:(python)