You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
importseabornassnsimportpandasaspdimportnumpyasnp# for test dataimportrandom# for test dataimportcalendar# for test data# test dataframenp.random.seed(365)
random.seed(365)
df=pd.DataFrame({'Days': random.choices(calendar.day_name, k=1000), 'Visitors': np.random.randint(1, 121, size=(1000))})
ax=sns.histplot(data=df, x='Visitors', hue='Days', multiple="stack")
ax.legend(bbox_to_anchor=(1.05, 1), loc='upper left')
Without trying to move the legend
Moving the legend in this way works fine with sns.barplot
I'm trying to move the legend for a
sns.histplot
Without trying to move the legend

Moving the legend in this way works fine with
sns.barplot
The text was updated successfully, but these errors were encountered: