小编use*_*496的帖子

你如何在 Seaborn 中为 kde plot 创建一个传奇?

我有一个 kdeplot,但我正在努力弄清楚如何创建图例。

import matplotlib.patches as mpatches  # see the tutorial for how we use mpatches to generate this figure!

# Set 'is_workingday' to a boolean array that is true for all working_days
is_workingday = daily_counts["workingday"] == "yes"
is_not_workingday = daily_counts['workingday'] == "no"
# Bivariate KDEs require two data inputs. 
# In this case, we will need the daily counts for casual and registered riders on workdays
casual_workday = daily_counts.loc[is_workingday, 'casual']
registered_workday = daily_counts.loc[is_workingday, 'registered']

# Use sns.kdeplot on the two …
Run Code Online (Sandbox Code Playgroud)

python plot legend seaborn

3
推荐指数
2
解决办法
3346
查看次数

标签 统计

legend ×1

plot ×1

python ×1

seaborn ×1