My seaborn plot is working fine. I am having issues in legend. The legend is placed inside the plot bydefault. But when I place it outside, the title goes missing.
My code: import seaborn as sns
sns.barplot(x='xdata',y='ydata',hue='Rank',
data=df,
palette='jet_r')
plt.gcf().autofmt_xdate()
plt.legend(bbox_to_anchor=(1,0.9),loc='upper left')
plt.show()
Present output: the legend is placed outside but the title is missing. How to solve this?
source https://stackoverflow.com/questions/70931643/python-seaborn-placing-legend-outside-with-a-title
Comments
Post a Comment