【发布时间】:2021-02-13 18:52:19
【问题描述】:
我有四列:性别、体重、身高、年龄。我需要用 matplotlib 或 seaborn 构建一个 3dscatter 图,其中 x-axis=weight,y=height,z=age,并用不同的颜色标记性别。我只能像这样构建二维散点图
sns.scatterplot(x = 'height', y = 'age',hue='sex',data=df, palette=['blue',"pink"])
但不知道如何添加z轴
【问题讨论】:
标签: python matplotlib seaborn