About plotting two independent Y-axis on the one plot
Subject: About plotting two independent Y-axis on the one plot
From: Pepe Sanchez
Date: Fri, 3 May 2013 09:47:01 +0200
> Now how does one do it with a wxplot2d() with two independent Y-axis on one
> and the same plot?
HI!
Following examples in the link provided by Mario,
I think this is (more o less) what Berns is looking for
R:10e3 $ C:10e-6 $ %tau:R*C; V[max]:10 $
v(t):= V[max]*(1-(exp(-t/(R*C))));
i(t):=(V[max]/R)*(exp(-t/(R*C)));
wxdraw2d(
/* activate secondary axes */
ytics_secondary = auto,
/* red curve is plotted against primary x-axis and primary y-axis */
color = red,
key = "v(i) - secondary y-axis",
explicit(v(t),t,0,0.5),
/* blue curve is plotted against primary x-axis and secondary y-axis */
yaxis_secondary = true,
color = blue,
key = "i(t) - primary y-axis",
explicit(i(t),t,0,0.5)
) $
Best!!
Pepe
________________________________________________________________
Jose Sanchez-Marin.
Universitat de Valencia.
Spain e-mail: Jose.Sanchez at uv.es
_________________________________________________________________