python matplotlib: label in histogram

前端 未结 1 682
生来不讨喜
生来不讨喜 2021-01-13 14:58

I am using Python (3.4) Jupyter Notebook. I tried to plot a histogram with label using the code below.

   %matplotlib notebook
    import matplotlib.pyplot          


        
相关标签:
1条回答
  • 2021-01-13 15:42

    you need to add a legend. See legend for details.

    plt.legend()
    
    0 讨论(0)
提交回复
热议问题