python绘图库matplotlib 设置坐标轴范围

  • 同时设置x和y坐标:plt.axis([xmin, xmax, ymin, ymax])
  • 只设置x坐标:plt.xlim([xmin, xmax])
  • 只设置y坐标:plt.ylim([ymin, ymax])

你可能感兴趣的:(python,参考用法,python)