# -*- coding:utf-8 -*-
# 根据需求调整坐标轴的范围
import matplotlib.pyplot as plt
import numpy as np
x = np.arange(-10,11,1)
plt.plot(x,x*x)
print(x)
print(plt.axis())
# plt.show()
plt.axis([-6,5,0,40])
plt.show()
调整坐标轴范围
最新推荐文章于 2024-07-04 16:52:41 发布