热线电话:13121318867

登录
2019-03-25 阅读量: 7038
python如何使用line函数?

代码#:单行

要创建单行,使用line()方法。

# import modules

from bokeh.plotting import figure, output_notebook, show

# output to notebook

output_notebook()

# create figure

p = figure(plot_width = 400, plot_height = 400)

# add a line renderer

p.line([1, 2, 3, 4, 5], [3, 1, 2, 6, 5],

line_width = 2, color = "green")

# show the results

show(p)

29.1701
0
关注作者
收藏
评论(0)

发表评论

暂无数据
推荐帖子