如何为Seaborn RegPlot选择不同的色调

2024-10-04 01:23:09 发布

您现在位置:Python中文网/ 问答频道 /正文

我使用的seaborn regplot代码如下:

sns.relplot(x="NumCustomers", y="TotalSales", hue = 'StoreLabel', data=stores_month, height = 5, aspect = 2, s = 100);

要生成以下绘图:

enter image description here

但在谷歌搜索后,这些颜色很难区分,谷歌成功地获得了以下代码:

sns.color_palette("tab10")

但什么也没发生。如何将颜色托盘更改为对比度更好的颜色?最好是tab10调色板


Tags: 代码data颜色seabornhuestoresheightsns