Does matplotlib have a function for drawing diagonal lines in axis coordinates?

后端 未结 4 2092
生来不讨喜
生来不讨喜 2020-12-28 12:55

Matplotlib Axes have the functions axhline and axvline for drawing horizontal or vertical lines at a given y or x coordinate (respectively) indepen

4条回答
  •  梦毁少年i
    2020-12-28 13:23

    If the axes are in the range [0,1], it can be resolved in this way:

    ident = [0.0, 1.0]
    plt.plot(ident,ident)
    

提交回复
热议问题