For some reason this question is tough for me to explain, but here goes. I have a set of data say (x,y1,y2) that I would like to plot. I need it to be one plot, not two plot one being (x,y1) and the other being (x,y2). Instead I want it so i can plot it at once and then have the left axis be for (y1) and the right axis be for (y2).
Currently I am stuck at plotting two separate plots and having to scale the axis to match each other, yet it still isn't working too well. Below I put my code that plots, the set of data is mesaBV=x...mesaMv=y1...mesaAge=y2
Is anyone familiar with answering this question? Thanks!!
Edit:
host = host_subplot(111, axes_class=AA.Axes)
par1 = host.twinx()
par1.set_yscale('log')
host.grid(True)
host.set_xlabel("B-V")
host.set_ylabel("Mv")
par1.set_ylabel("Age")
p1, = host.plot(mesaBV, mesaMv, label="Mv",marker="o")
p2, = par1.plot(mesaBV, mesaAge, label="Age",marker="o")
host.set_yticks(np.linspace(host.get_ybound()[0], host.get_ybound()[1], 10))
par1.set_yticks(np.linspace(par1.get_ybound()[0], par1.get_ybound()[1], 10))
host.axis["left"].label.set_color(p1.get_color())
par1.axis["right"].label.set_color(p2.get_color())
plt.draw()
plt.show()