Warm tip: This article is reproduced from serverfault.com, please click

How to select different hue for Seaborn RegPlot

发布于 2020-11-28 14:43:21

I am using a seaborn regplot with the following code :

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

To generate the following plot :

enter image description here

But the colors are hard to differentiate, after scouring google managed to get this code :

sns.color_palette("tab10")

but nothing happens. How can I change the color pallet to something with better contrast? preferably the tab10 palette.

Thanks for any help :)

Questioner
Yussuf Abdirizak
Viewed
0
Golden Lion 2021-02-14 22:28:22
  try
  sns.set_palette("Blues")
  or
  sns.set_palette("Dark")

 sns.set_style()
 1.white
 2.dark
 3.whitegrid
 4.darkgrid
 5.ticks
 The set palette api must occur before the relPlot
 other apis to try catDist, distPlot, catPlot

 I think catPlot would work better