#!/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')
#!/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')
最后
以上就是贪玩砖头最近收集整理的关于tushare作图的全部内容,更多相关tushare作图内容请搜索靠谱客的其他文章。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复