我从这里稍微修改了这段代码:
import seaborn as sns
sns.set(style="darkgrid")
tips = sns.load_dataset("tips")
color = sns.color_palette()[5]
g = sns.jointplot("total_bill", "tip", data=tips, kind="reg", stat_func=None,
xlim=(0, 60), ylim=(0, 12), color='k', size=7)
g.set_axis_labels('total bill', 'tip', fontsize=16)
我得到了一个漂亮的情节 - 但是,对于我的情况,我需要能够更改每个单独点的颜色和格式。
我尝试使用关键字 、marker
和style
,fmt
但我得到了错误TypeError: jointplot() got an unexpected keyword argument
。
这样做的正确方法是什么?我想避免sns.JointGrid
手动调用和绘制数据和边际分布..