Bokeh是一款针对浏览器中图形演示的交互式绘图工具。
#-*- coding: utf-8 -*- ''' @author: soyo ''' from bokeh.plotting import figure,output_file,show x=[1,2,3,4,5,6] y=[6,7,8,9,10,11] output_file("soyo.html", title="SoYo-Example") p=figure(title="simple_Bokeh_show",x_axis_label='x',y_axis_label='y') p.line(x,y,legend=" Line A.",line_width=2) p.circle(x,y,size=40) # p.multi_line(xs=[[1, 2, 3]], ys=[[7, 8, 9]],color=['red','green']) p.circle_cross(x, y, size=20,color="#FB8072", fill_alpha=0.2, line_width=2) p.line(x=[1,2,3,4,5,10],y=[2,6,2,6,2,15],line_width=8,color="red") show(p)
结果: