0
$\begingroup$

Listplot of a function Sin[2 x] vs Cos[2 x] when x is real and when x is a random variable? what is the effect of phase in the plot?

$\endgroup$
1
  • 3
    $\begingroup$ Show us your Mathematica code, please. $\endgroup$
    – John Doty
    Apr 19, 2020 at 13:02

2 Answers 2

1
$\begingroup$
Clear["Global`*"]

SeedRandom[1234];
data = {Cos[2 #], Sin[2 #]} & /@
   RandomReal[{0, Pi}, 64];

{{ParametricPlot[
    {Cos[2 x], Sin[2 x]}, {x, 0, Pi},
    PlotRange -> {{-1.05, 1.05}, {-1.05, 1.05}}],
   ListPlot[
    Table[{Cos[2 x], Sin[2 x]}, {x, 0, Pi, Pi/64}],
    PlotRange -> {{-1.05, 1.05}, {-1.05, 1.05}},
    AspectRatio -> 1]},
  {ListPlot[data,
    PlotRange -> {{-1.05, 1.05}, {-1.05, 1.05}},
    AspectRatio -> 1],
   ListCurvePathPlot[data,
    PlotRange -> {{-1.05, 1.05}, {-1.05, 1.05}}]}} //
 Grid

enter image description here

$\endgroup$
0
$\begingroup$

ListLinePlot

table1 = Table[{Sin[2 x], Cos[2 x]}, {x, Range[0, 2 Pi, 2 Pi/16]}];

SeedRandom[1]
table2 = Table[{Sin[2 x], Cos[2 x]}, {x, RandomReal[{0, 2 Pi}, 16]}];

ListLinePlot[{table1, table2},
 PlotStyle -> {Red, Blue},
 PlotMarkers -> {Automatic, 15}, 
 AspectRatio -> 1,
 Frame -> True,
 Axes -> False,
 Epilog -> Circle[],
 PlotLegends -> {"table1", "table2"}]

enter image description here

ParametricPlot

ClearAll[rR]
rR := RandomReal[{-.5, .5}];

SeedRandom[1]
Show[ParametricPlot[{Sin[2 x], Cos[2 x]}, {x, 0, 2 Pi}, 
  PlotStyle -> Red, PlotRangePadding -> Scaled[.2]], 
 ParametricPlot[{Sin[2 (x + (rr = rR))], Cos[2 (x + rr)]}, {x, 0, 
   2 Pi}, PlotStyle -> Opacity[.7, Blue], MaxRecursion -> 0, 
  PlotPoints -> 20], ImageSize -> 400]

enter image description here

SeedRandom[1]
Show[ParametricPlot[{Sin[2 x], Cos[2 x]}, {x, 0, 2 Pi}, 
  PlotStyle -> Red, PlotRangePadding -> Scaled[.2]], 
 ParametricPlot[{Sin[2 (x + (rr = rR))], Cos[2 (x + rr)]}, {x, 0, 
   2 Pi}, PlotStyle -> Opacity[.3, Blue], MaxRecursion -> 0, 
  PlotPoints -> 1000], ImageSize -> 400]

enter image description here

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.