%matplotlib inline
%time from hikyuu.interactive import *
使用 create_figure 函数快速创建查看证券K线信息的常见组合窗口
help(create_figure)
#不同坐标轴数量,其显示窗口布局
create_figure(figsize=(6,4))
create_figure(2, figsize=(6,4))
create_figure(3, figsize=(6,4))
create_figure(4, figsize=(6,4))
s = sm['sh000001']
k = s.get_kdata(Query(-200))
#创建两个显示坐标轴的窗口
ax1,ax2 = create_figure(2)
#在第一个坐标轴中绘制K线和EMA
k.plot(axes=ax1)
ma = EMA(CLOSE(k))
ma.plot(axes=ax1, legend_on=True)
#在第二个坐标轴中绘制艾尔德力度指标
v = VIGOR(k)
v.plot(axes=ax2, legend_on=True)
ax1,ax2, ax3 = create_figure(3)
k.plot(axes=ax1)
ma.plot(axes=ax1, legend_on=True)
ax_draw_macd(axes=ax2, kdata=k)
ax_draw_macd2(axes=ax3, ref=ma, kdata=k)
el.draw(s)
vl.draw(s)
vl.draw2(s)
kf.draw(s)
kf.draw2(blocka)