热线电话:13121318867

登录
2018-12-08 阅读量: 871
Bokeh怎么数据可视化?

Bokeh是Python中的一个数据可视化库,提供高性能的交互式图表和绘图。散景输出可以在各种媒体中获得,如笔记本,HTML和服务器。可以在Django和flask应用程序中嵌入散景图。

Bokeh为用户提供了两个可视化界面:

要安装散装包,请在终端中运行以下命令:

pip安装散景

用于生成散景图的数据集是从Kaggle收集的。

代码#1:散点标记
要创建散点圆标记,请使用circle()方法。

# 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 circle renderer with

# size, color and alpha

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

size = 10, color = "navy", alpha = 0.5)

# show the results

show(p)

0.0000
6
关注作者
收藏
评论(0)

发表评论

暂无数据
推荐帖子