Python-Matplotlib 15 坐标轴范围

 

EG1

import numpy as np
import matplotlib.pyplot as plt

y = np.arange(1, 5)
plt.plot(y, y + 2, label='Normal')
plt.plot(y, y + 3, label='Fast')
plt.plot(y, y + 4, label='Faster')

print(plt.axis()) #(0.84999999999999998, 4.1500000000000004, 2.75, 8.25)
plt.xlim([2,4])
plt.ylim([4,8])
plt.axis([2,4,4,8]) # xmin, xmax, ymin, ymax
plt.show()

  Python-Matplotlib 15 坐标轴范围

相关文章:

  • 2022-01-17
  • 2021-09-10
  • 2021-06-13
  • 2021-11-11
  • 2022-12-23
  • 2021-12-11
  • 2021-09-16
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-11-11
  • 2022-12-23
  • 2021-11-08
  • 2021-11-19
  • 2022-01-21
相关资源
相似解决方案