PlotRangePadding

PlotRangePadding
is an option for graphics functions that specifies how much further axes etc. should extend beyond the range of coordinates specified by PlotRange.

DetailsDetails

  • PlotRangePadding can be used for both two- and three-dimensional graphics.
  • The settings can be of the following forms:
  • pthe same padding in all directions
    {px,py,}different padding in different directions
    {{pxL,pxR},}different padding on left and right, etc.
  • For each direction the following forms can be used:
  • Automatican automatic amount of padding
    ss coordinate units
    Scaled[s]a fraction s of the plot
    Noneno padding
  • If PlotRange includes all points in a plot, then PlotRangePadding->Scaled[s] yields a plot that covers a fraction 1-2s of the whole plotting area.
  • PlotRangePadding->Automatic adds a total of 4% for PlotRange settings All, Full, and Automatic. For explicit settings, it adds no padding.
  • Any padding specified by ImagePadding is added outside padding specified by PlotRangePadding.

ExamplesExamplesopen allclose all

Basic Examples  (3)Basic Examples  (3)

By default, 2% of padding is added to the plot range in each direction:

In[1]:=
Click for copyable input
Out[1]=
In[2]:=
Click for copyable input
Out[2]=

No padding added:

In[1]:=
Click for copyable input
Out[1]=
In[2]:=
Click for copyable input
Out[2]=

Include 1 coordinate unit of padding on all sides:

In[1]:=
Click for copyable input
Out[1]=
In[2]:=
Click for copyable input
Out[2]=
Introduced in 2007
(6.0)