I'm making this demonstration that draws a parametric plot of the unit circle, while at the same time has two plots off to the side that draw the sine and cosine curves. I have this made up as an animation:
Animate[
Row@{
ParametricPlot[
{{Cos[t], Sin[t]}, {-Sin[t], Cos[t]}},
{t, 0, n},
PlotRange -> {{-1.5, 1.5}, {-1.5, 1.5}},
ImageSize -> 300,
AspectRatio -> 1,
PlotStyle -> {
{Blue, Thickness[0.025]},
{Green, Thickness[0.0125]}
},
Prolog -> {Opacity[0.5], Circle[]},
Epilog -> {
{Dotted, Line[{{Cos[n], 0}, {Cos[n], Sin[n]}}]},
{Dotted, Line[{{-Sin[n], 0}, {-Sin[n], Cos[n]}}]},
{Opacity[0.5], Line[{{0, 0}, {-Sin[n], Cos[n]}}]},
{Red, PointSize[0.025], Point[{-Sin[n], Cos[n]}]},
{Opacity[0.5], Line[{{0, 0}, {Cos[n], Sin[n]}}]},
{Red, PointSize[0.025], Point[{Cos[n], Sin[n]}]}
},
PlotLabel -> "Point on the unit circle"
],
Plot[
Sin[x],
{x, 0, n},
PlotRange -> {{0, 2 Pi}, {-1.5, 1.5}},
ImageSize -> 300,
AspectRatio -> 1,
PlotStyle -> Red,
Epilog -> {
{Blue, Thickness[0.0125], Line[{{0, 0}, {n, 0}}]},
{Dotted, Line[{{n, 0}, {n, Sin[n]}}]},
{Red, PointSize[0.025], Point[{n, Sin[n]}]}
},
PlotLabel -> "Vertical position of point"
],
Plot[
Cos[x],
{x, 0, n},
PlotRange -> {{0, 2 Pi}, {-1.5, 1.5}},
ImageSize -> 300,
AspectRatio -> 1,
PlotStyle -> Red,
Epilog -> {
{Green, Thickness[0.0125], Line[{{0, 0}, {n, 0}}]},
{Dotted, Line[{{n, 0}, {n, Cos[n]}}]},
{Red, PointSize[0.025], Point[{n, Cos[n]}]}
},
PlotLabel -> "Horizontal position of point"
]
},
{n, .0001, 2 Pi},
AnimationRunning -> False]
I want to be able to draw dotted lines between the corresponding red points on the circle and their periodic curves.
The only way I know to display several plots as one graphic is with Show
, but that would use the same origin for all three plots. Is there a way to have two of the plots retain their coordinate axes, but have their images translated to the right of the first plot?
GraphicsRow[{plot1, plot2, ... , plotN}]
or aGraphicsGrid[{{plot1,plot2},{plot3,plot4}}]
to plot side by side or in a grid. $\endgroup$Show[ GraphicsGrid[{{ Plot[x, {x, 0, 1}], Plot[x^2, {x, 0, 2}]}}] , Graphics[{Red, Line[ImageScaled /@ {{0.0, 0.0}, {1, 1}}]}] ]
$\endgroup$Row
: i.e.Animate[Row@{ParametricPlot[...], Plot[...],...,...},...]
$\endgroup$Row@
suggestion seems to be the best option at the moment. The others make the animation very choppy. Now the only problem is figuring out how to properly place the line I want. I'm trying to make the endpoints of the line be the red points on the circle and sine curve, butShow
is giving me an error. $\endgroup$