在参考文献中,它们被描述为:
axis('equal') changes limits of x or y axis so that equal increments of x and y have the same length; a circle is circular.:
axis('scaled') achieves the same result by changing the dimensions of the plot box instead of the axis data limits.:
但我不理解“通过改变绘图框的尺寸”这一部分。 所以我直接比较
import numpy as np
import matplotlib.pyplot as plt
plt.close('all')
x = np.array(np.linspace(-np.pi, np.pi))
y = np.sin(x)
ax1 = plt.subplot(2, 1, 1)
ax1 = plt.plot(x, y)
plt.axis('scaled')
ax1 = plt.subplot(2, 1, 2)
plt.plot(x, y)
plt.axis('equal')
与plt.axis('scaled')一起绘制时,只有一个细微的差别,即宽度较短。
我怎么才能更好地知道区别呢?
目前没有回答
相关问题 更多 >
编程相关推荐