About plotting two independent Y-axis on the one plot
Subject: About plotting two independent Y-axis on the one plot
From: Przemek Klosowski
Date: Tue, 30 Apr 2013 16:50:57 -0400
On 04/30/2013 03:59 PM, Berns Buenaobra wrote:
> One of the classic problem in RC charge and discharge circuit in the
> usual freshman physics course is being able to plot the voltage rise
> with a current discharge on a single plot so that their intersection in
> time is determined.
>
> Now how does one do it with a wxplot2d() with two independent Y-axis on
> one and the same plot?
>
> Well this looks easy for a simple case of just one plot:
> R:10e3 $ C:10e-6 $ %tau:R*C; V[max]:10 $
> v(t)=V[max]*(1-(exp(-t/(R*C))));
you mean v(t):=V[max]*(1-(exp(-t/(R*C)))); right?
> wxplot2d(v(t),[t,0,0.5]);
>
> and
> i(t):=(V[max]/R)*(exp(-t/(R*C)));
> wxplot2d(i(t),[t,0,0.5]);
>
> but I got into trouble with the temptation with just writing out:
> wxplot2d([v(t),i(t)],[t,0,0.5]);
>
> which only shows the voltage rise. Easily done in MS Excel but I need
> the symbols for purposes of instruction.
>
> Any tip?
Yes, don't intersect current and voltage---you can only compare
quantities that have the same unit of measurement. For instance, this
should work:
wxplot2d([v(t)/R,i(t)],[t,0,0.5]);