python 两点连线 matplotlib

1. 若想要将两点之间链接起来:python import matplotlib.pyplot as plt p1 = [x1, y1] #点p1的坐标值 p2 = [x2, y2] #点p2的坐标值 plt.plot([x1,x2],[y1,y2]) #简单理解就是:先写x的取值范围,再写y的取值范围 2. 想要肯定坐标轴上下限的话:code plt.xlim(x_min,x_max) #x_m
相关文章
相关标签/搜索