AspectRatio
is an option for Graphics and related functions that specifies the ratio of height to width for a plot.
Details
- AspectRatio determines the scaling for the final image shape.
- Typical settings include:
-
Automatic determine the ratio from the actual coordinate values Full stretch graphics to fill out the enclosing region a an explicit height-to-width ratio
Examples
open allclose allBasic Examples (2)
Scope (2)
Automatic can be given to choose the ratio from the actual plot values:
Specify the height-to-width ratio of a graphic by numerical values:
Generalizations & Extensions (2)
In 3D, the aspect ratio determines the ratio of the final displayed 2D image:
Use the Automatic setting to preserve the natural 3D projection:
Properties & Relations (5)
AspectRatio determines the ratio of PlotRange, not ImageSize:
Graphics uses Automatic by default:
Plot, ListPlot, and ListLinePlot use the ratio 1/GoldenRatio by default:
Some plots, such as ParametricPlot and ArrayPlot, use Automatic by default:
Others, such as DensityPlot and ContourPlot, use the ratio 1 by default:
Possible Issues (2)
By default, ParametricPlot may yield a graphic with an extreme aspect ratio:
Use an explicit AspectRatio to get a reasonable result:
Using an explicit AspectRatio may distort shapes:
Use Automatic when shape distortion is undesirable:
Text
Wolfram Research (1988), AspectRatio, Wolfram Language function, https://reference.wolfram.com/language/ref/AspectRatio.html (updated 2007).
CMS
Wolfram Language. 1988. "AspectRatio." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2007. https://reference.wolfram.com/language/ref/AspectRatio.html.
APA
Wolfram Language. (1988). AspectRatio. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/AspectRatio.html