我有以下功能,我正在寻找的是反转 x 和 y 轴。
import numpy as np
import matplotlib.pyplot as plt
fig = plt.figure()
ax = fig.add_subplot(1, 1, 1)
major_ticks = np.arange(-2, 10+2, 1)
minor_ticks = np.arange(-2, 10+2, 0.25)
ax.set_xticks(major_ticks)
ax.set_xticks(minor_ticks, minor=True)
ax.set_yticks(major_ticks)
ax.set_yticks(minor_ticks, minor=True)
ax.grid(which='both')
ax.grid(which='minor', alpha=0.2)
ax.grid(which='major', alpha=0.5)
plt.title('Image')
plt.xlabel('Height (m)')
plt.ylabel('Length (m)')
plt.axis('equal')
function = np.array([0, 0.52, 0.92, 0.8])
plt.plot(function)
下图说明了它的外观,最好的问候。
largeQ
相关分类