欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

pyecharts 离散图代码

程序员文章站 2022-05-26 21:40:08
...
from pyecharts import Scatter
import pandas as pd
from pyecharts_snapshot.main import make_a_snapshot # 快照,截图

dfgirl = pd.DataFrame()
dfgirl['w'] = [50,62,60,70,57,45,62,65,70,56]
dfgirl['h'] = [155,162,165,170,166,158,160,170,172,165]

scatter = Scatter(title = "体格数据",width = 500,height = 500)
scatter.add(name = "girl", x_axis = dfgirl['w'], y_axis = dfgirl['h'],
           yaxis_min = 0,yaxis_max = 200,xaxis_min = 0,xaxis_max = 100,symbol_size=5)

scatter.render("aaaa.html")

 

相关标签: python学习