码迷,mamicode.com
首页 > 其他好文 > 详细

分时图设计

时间:2016-05-28 06:34:20      阅读:270      评论:0      收藏:0      [点我收藏+]

标签:

# -*- coding: utf-8 -*-
# %%
import tushare
import matplotlib.pyplot as plot
import time
# %%
count = 0
while count < 5:
    # %%
    rtquotes = tushare.get_realtime_quotes(002237)
    # %%
    name = rtquotes[name]
    code = rtquotes[code]
    # %%
    open = rtquotes[open]
    pre_close = rtquotes[pre_close]
    # %%
    bid = rtquotes[bid]
    ask = rtquotes[ask]
    # %%
    volume = rtquotes[volume]
    # %% bid
    b1_v = rtquotes[b1_v]
    b1_p = rtquotes[b1_p]
    b2_v = rtquotes[b2_v]
    b2_p = rtquotes[b2_p]
    b3_v = rtquotes[b3_v]
    b3_p = rtquotes[b3_p]
    b4_v = rtquotes[b4_v]
    b4_p = rtquotes[b4_p]
    b5_v = rtquotes[b5_v]
    b5_p = rtquotes[b5_p]
    # %% ask
    a1_v = rtquotes[a1_v]
    a1_p = rtquotes[a1_p]
    a2_v = rtquotes[a2_v]
    a2_p = rtquotes[a2_p]
    a3_v = rtquotes[a3_v]
    a3_p = rtquotes[a3_p]
    a4_v = rtquotes[a4_v]
    a4_p = rtquotes[a4_p]
    a5_v = rtquotes[a5_v]
    a5_p = rtquotes[a5_p]
    # %%
    date = rtquotes[date]
    time = rtquotes[time]
    # %%
    figure = plot.figure(count)
    # %%
    sp1 = plot.subplot(221)
    # %%
    sp2 = plot.subplot(222)
    # %%
    sp3 = plot.subplot(223)
    # %%
    sp4 = plot.subplot(224)
    # %%
    plot.hold(True)
    count += 1

分时图设计

标签:

原文地址:http://www.cnblogs.com/blog-3123958139/p/5536670.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!