重发:Bqplot是一款用于Jupyter的交互式2D的python绘图库( 二 )


#%%import numpy as npimport bqplot.pyplot as pltplt.figure()plt.boxplot(np.arange(10), np.random.randn(10, 100))plt.show()8.2 图:

重发:Bqplot是一款用于Jupyter的交互式2D的python绘图库

文章插图
 
9 ohlc图:
=======
9.1 代码:
#%%import numpy as npimport bqplot.pyplot as pltimport datetime as dt#dates代表x轴坐标为日期dates = np.arange(dt.datetime(2014, 1, 2), dt.datetime(2014, 1, 30), dt.timedelta(days=1))#y轴为价格数据prices = np.array([[ 187.21,187.4,185.2,185.53],[ 185.83,187.35,185.3,186.64],[ 187.15,187.355 ,185.3,186.],[ 186.39,190.35,186.38,189.71],[ 189.33,189.4175,187.26,187.97],[ 189.02,189.5,186.55,187.38],[ 188.31,188.57,186.28,187.26],[ 186.26,186.95,183.86,184.16],[ 185.06,186.428 ,183.8818,185.92],[ 185.82,188.65,185.49,187.74],[ 187.53,188.99,186.8,188.76],[ 188.04,190.81,187.86,190.09],[ 190.23,190.39,186.79,188.43],[ 181.28,183.5,179.67,182.25],[ 181.43,183.72,180.71,182.73],[ 181.25,182.8141,179.64,179.64],[ 179.605 ,179.65,177.66,177.9],[ 178.05,178.45,176.16,176.85],[ 175.98,178.53,175.89,176.4],[ 177.17,177.86,176.36,177.36]])plt.figure()plt.ohlc(dates, prices)plt.show()9.2 图:
重发:Bqplot是一款用于Jupyter的交互式2D的python绘图库

文章插图
 
10 高级图,不放代码了,欣赏一下 。
重发:Bqplot是一款用于Jupyter的交互式2D的python绘图库

文章插图
 
===自己整理并分享出来===
喜欢的人,请点赞、关注、评论、转发和收藏 。




推荐阅读