Python绘制气泡图示例,python,画,泡泡,图片,例子

发表时间:2020-03-30

1.python气泡球

2.代码

import  plotly as py
import plotly.graph_objs as go
pyplt=py.offline.plot
trace0=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文件。用浏览器打开后效果为:

文章来源互联网,如有侵权,请联系管理员删除。邮箱:417803890@qq.com / QQ:417803890

微配音

Python Free

邮箱:417803890@qq.com
QQ:417803890

皖ICP备19001818号-4
© 2019 copyright www.pythonf.cn - All rights reserved

微信扫一扫关注公众号:

联系方式

Python Free