1.python气泡球
2.代码
import plotly as pyimport plotly.graph_objs as gopyplt=py.offline.plottrace0=go.Scatter(x=[0.1,0.2,0.3,0.4],y=[10,11,12,14],text=['A<br>size:40</br>default','B<br>size:23</br>default','C<br>size:80 <br> keny风清扬</br>default','D<br>size:12</br>default'],mode='markers',name='default',marker=dict(color=[120,125,130,245],opacity=[1,0.8,0.6,0.4],size=[400,600,2000,100],sizemode='area',showscale=True,))data=[trace0]pyplt(data, filename='./bubble.html')
3.运行效果
生成bubble.html文件。用浏览器打开后效果为:
如果觉得《python画泡泡图片例子》对你有帮助,请点赞、收藏,并留下你的观点哦!