Adding an arbitrary line to a matplotlib plot in ipython notebook

后端 未结 5 1330
孤独总比滥情好
孤独总比滥情好 2020-12-07 14:41

I\'m rather new to both python/matplotlib and using it through the ipython notebook. I\'m trying to add some annotation lines to an existing graph and I can\'t figure out ho

5条回答
  •  既然无缘
    2020-12-07 14:47

    It's not too late for the newcomers.

    plt.axvline(x, color='r')
    

    It takes the range of y as well, using ymin and ymax.

提交回复
热议问题