簡體   English   中英

如何 select Seaborn RegPlot 的不同色調

[英]How to select different hue for Seaborn RegPlot

我正在使用帶有以下代碼的 seaborn regplot:

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

要生成以下 plot:

在此處輸入圖像描述

但是 colors 很難區分,在搜索谷歌后設法得到這個代碼:

sns.color_palette("tab10")

但什么也沒發生。 如何將調色板更改為對比度更好的顏色? 最好是 tab10 調色板。

  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

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM