我找不到一种使用matplotlib Python库画一条任意线的方法。它允许绘制水平和垂直线(例如使用matplotlib.pyplot.axhline和matplotlib.pyplot.axvline),但我不知道如何通过给定的两个点(x1, y1)和(x2, y2)绘制一条线。有什么方法吗?有没有简单的方法?
matplotlib
matplotlib.pyplot.axhline
matplotlib.pyplot.axvline
(x1, y1)
(x2, y2)
用户名或邮箱地址
密码