Anonymous
public text v1 · immutableimport matplotlib.pyplot as plt
x1 = range(1,10,1)
y1 = []
for x in x1:
y1.append(5*x)
x2 = range(100,200,1)
y2 = []
for x in x2:
y2.append(5*x+30)
fig = plt.figure()
ax1 = fig.add_subplot(111)
ax1.plot(x1,y1,'b--')
ax2 = ax1.twiny()
ax3 = ax2.twinx()
ax3.plot(x2,y2,'go')
ax1.set_xlabel('xValue')
ax1.set_ylabel('yValue')
ax2.set_xlabel('myXValue')
ax3.set_ylabel('myYValue')
plt.show()