Mathematica 9 is now available
THIS IS DOCUMENTATION FOR AN OBSOLETE PRODUCT.
SEE THE DOCUMENTATION CENTER FOR THE LATEST INFORMATION.
Mathematica > Visualization and Graphics > Graphics Options & Styling > Graphics Shape & Size > AspectRatio >

AspectRatio

AspectRatio
is an option for Graphics and related functions that specifies the ratio of height to width for a plot.
  • AspectRatio determines the scaling for the final image shape.
  • AspectRatio->Automatic determines the ratio of height to width from the actual coordinate values in the plot.
  • AspectRatio->Full specifies that a graphic should be stretched so as to fill out its enclosing region in a Grid or related construct.
Use numerical values to specify the height-to-width ratio:
Choose the ratio from the actual plot values:
Use numerical values to specify the height-to-width ratio:
In[1]:=
Click for copyable input
Out[1]=
 
Choose the ratio from the actual plot values:
In[1]:=
Click for copyable input
Out[1]=
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:
In 3D, the aspect ratio determines the ratio of the final displayed 2D image:
Use the Automatic setting to preserve the natural 3D projection:
AspectRatio determines the ratio of PlotRange, not ImageSize:
Graphics uses Automatic by default:
Plot, ListPlot, and ListLinePlot use the ratio GoldenRatio by default:
Some plots, such as ParametricPlot and ArrayPlot, use Automatic by default:
Others, such as DensityPlot and ContourPlot, use the ratio by default:
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:
A collection of boxes with random aspect ratios:
New in 1 | Last modified in 6
Ask a question about this page  |  Suggest an improvement  |  Leave a message for the team
Format:   HTML  |  CDF