第一种方法:
import numpy as np
import matplotlib.pyplot as plt
x=np.arange(-10,11,1)
plt.plot(x,x2)
plt.axis([-10,10,0,100])#分别对应调整x轴的最小值最大值和y轴的最小值最大值
plt.show()
malplotlib坐标轴范围
第二种方法:
import numpy as np
import matplotlib.pyplot as plt
x=np.arange(-10,11,1)
plt.plot(x,x
2)
plt.xlim([-10,10])
plt.ylim([0,100])
plt.show()
malplotlib坐标轴范围

相关文章:

  • 2021-08-20
  • 2021-11-14
  • 2021-08-28
  • 2022-12-23
  • 2021-05-19
猜你喜欢
  • 2022-12-23
  • 2021-12-11
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-06
  • 2021-12-16
相关资源
相似解决方案