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")