Unable to show legend in seaborn distplot

前端 未结 3 1036
猫巷女王i
猫巷女王i 2021-02-06 21:31

I am new to plotting in python and trying following code to plot distribution in seaborn but unable to see the legend, i.e., test_label1 and test

3条回答
  •  自闭症患者
    2021-02-06 22:02

    As you have already labelled your plots using label= inside your sns.distplot then all you have to do is show your legend. This is done by adding plt.legend() just before plt.show()

    More information on matplotlib legends can be found in the documentation

提交回复
热议问题