zoukankan      html  css  js  c++  java
  • 分时图设计

    # -*- 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
  • 相关阅读:
    C指针
    redis五种基本数据类型
    mongoDB MapReduce
    JSON传参
    mongodb查询实练
    逻辑数据结构和存储数据结构
    线性表的顺序存储和链式存储
    数据结构和算法关系
    UIActivityIndicatorView使用
    Swift中格式化日期
  • 原文地址:https://www.cnblogs.com/blog-3123958139/p/5536670.html
Copyright © 2011-2022 走看看