37,719
社区成员
发帖
与我相关
我的任务
分享
import matplotlib.pyplot as plt
plt.figure()
ax1 = plt.subplot(121)
ax2 = plt.subplot(122)
xlist = [1,2,3,4,5]
ylist = [10,20,30,40,50]
plt.sca(ax1)
plt.title("Test X Label")
plt.xlabel("X")
plt.ylabel("Y")
plot1, = plt.plot(xlist,ylist,'ro')
plt.show()
import matplotlib.pyplot as plt
plt.figure()
ax1 = plt.subplot(121)
ax2 = plt.subplot(122)
xlist = [1,2,3,4,5]
ylist = [10,20,30,40,50]
plt.sca(ax1)
plt.title("Test X Label")
plt.xlabel("X")
plt.ylabel("Y")
plot1, = plt.plot(xlist,ylist,'ro')
plt.gca().invert_xaxis()
plt.show()