2
$\begingroup$

Here is the code for my GraphicsRow:

GraphicsRow[
  {ParametricPlot[{Sin[3 t + Pi/2], Sin[t]}, {t, 0, 2 Pi}, 
     PlotStyle -> {Brown, Thin}],
   ListLinePlot[Table[{Sin[3 t + Pi/2], Sin[t]}, {t, 0, 2 Pi, 0.1}], 
     PlotLabel -> "ListLinePlot Table", 
     AxesLabel -> {"Sin[3 t+Pi/2]", "Sin[t]"}]},
  AspectRatio -> 1, PlotRange -> {{-1, 1}, {-1, 1}}]

Here is the output picture.

enter image description here

In my code, I set the options AspectRatio -> 1, PlotRange -> {{-1, 1}, {-1, 1}}. However, neither of these is achieved. What can I do to fix it?

$\endgroup$
  • 4
    $\begingroup$ Try specifying AspectRatio and PlotRange for each plot. $\endgroup$ – Rohit Namjoshi Jan 4 at 15:37
  • $\begingroup$ @RohitNamjoshi, but when I look the documentation in Mathematica. It's actually valid to put things behind all these plots. GraphicsRow[list,spacing]. Here is an example. GraphicsRow[Table[Graphics[Disk[], ImageSize -> 10 i], {i, 1, 5}], Alignment -> Top, Frame -> All] $\endgroup$ – kile Jan 5 at 5:28
2
$\begingroup$

From GraphicsRow

If the [elements of the 1st argument] are graphics, GraphicsRow will if possible make them all the same height, preserving their individual aspect ratios.

and that is what you got in your row of plots. What you probably would happier with is this:

GraphicsRow[
  {ParametricPlot[{Sin[3 t + Pi/2], Sin[t]}, {t, 0, 2 Pi},
     PlotLabel -> "ParametricPlot\n",
     PlotStyle -> Brown,
     AxesLabel -> {"Sin[3 t+Pi/2]", "Sin[t]"}], 
   ListLinePlot[Table[{Sin[3 t + Pi/2], Sin[t]}, {t, 0, 2 Pi, 0.1}], 
     PlotLabel -> "ListLinePlot\n",
     AspectRatio -> 1,
     PlotRange -> {{-1, 1}, {-1, 1}},
     AxesLabel -> {"Sin[3 t+Pi/2]", "Sin[t]"}]},
  ImageSize -> Large]

plot_1

or this:

GraphicsRow[
  {ParametricPlot[{Sin[3 t + Pi/2], Sin[t]}, {t, 0, 2 Pi},
     PlotLabel -> "ParametricPlot:\n{Sin[3 t+Pi/2], Sin[t]}\n",
     PlotStyle -> Brown],
   ListLinePlot[Table[{Sin[3 t + Pi/2], Sin[t]}, {t, 0, 2 Pi, 0.1}], 
     PlotLabel -> "ListLinePlot: \nTable of {Sin[3 t+Pi/2], Sin[t]}\n",
     AspectRatio -> 1,
     PlotRange -> {{-1, 1}, {-1, 1}}]},
  ImageSize -> Large]

plot_2

I prefer the rendering that appears immediately above. I think it conveys the plot annotations in a way that is clearer to the viewer.

| improve this answer | |
$\endgroup$

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