How do I extract the AspectRatio from a plot? (For example for the PlotRange, I can use PlotRange[plot]. The same does not work for the AspectRatio.)

I would be happy to extend this question into how to extract various options and attributes of plots. See for example also this question/answer about extracting viewpoints.


1 Answer 1


For example:

p1 = Plot[Sin[x], {x, 0, π}]
AbsoluteOptions[p1, AspectRatio]

{AspectRatio -> 0.618034}

If this number looks familiar, it is because the default AspectRatio is 1/GoldenRatio // N.

  • 1
    $\begingroup$ ctrl-shift-e converts any graphic into its raw expression where you can look up a wide range of values, copy them, use them in options, etc. $\endgroup$
    – Rogo
    Apr 30, 2023 at 18:18

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