小编jam*_*sss的帖子

如何制作带有色调的 3D 散点图?

我有四列:性别、体重、身高、年龄。我需要用 matplotlib 或 seaborn 构建一个 3dscatter 图,其中 x 轴 = 重量,y = 高度,z = 年龄,并用不同的颜色标记性别。我只能像这样构建二维散点图

sns.scatterplot(x = 'height', y = 'age',hue='sex',data=df, palette=['blue',"pink"])
Run Code Online (Sandbox Code Playgroud)

但不知道如何添加 z 轴

python matplotlib seaborn

2
推荐指数
1
解决办法
975
查看次数

标签 统计

matplotlib ×1

python ×1

seaborn ×1