This is documentation for Mathematica 8, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.1)

PlotRange

PlotRange
is an option for graphics functions that specifies what range of coordinates to include in a plot.
  • PlotRange can be used for both two- and three-dimensional graphics.
  • The following settings can be used:
Allall points are included
Automaticoutlying points are dropped
Fullinclude full range of original data
maxexplicit limit for each function (see below)
{min,max}explicit limits for y (2D), z (3D) or array values
{{xmin,xmax},{ymin,ymax}}explicit limits for x and y
{{xmin,xmax},{ymin,ymax},{zmin,zmax}}explicit limits for x, y and z (3D)
  • When no explicit limits are given for a particular coordinate, a setting of Automatic is assumed.
  • With the Automatic setting, the distribution of coordinate values is found, and any points sufficiently far out in the distribution are dropped. Such points are often produced as a result of singularities in functions being plotted.
  • Any explicit limit or pair can be replaced by a specification such as All or Automatic.
  • A setting such as {min, Automatic} gives a particular minimum value for a coordinate, with a maximum value to be determined automatically.
  • If a particular minimum or maximum is specified as {Automatic, } this means that the range should in effect be cut off beyond a fraction of points in the plot. When smooth curves or surfaces are plotted, the measure of points is based on projected length or area.
  • The setting Full can be used in Plot and related functions to specify that a range determined by the original input to the plotting function should be used. »
  • Plot[f, {x, xmin, xmax}, PlotRange->Full] specifies that the full range should be used, even if no actual values of f are plotted in part of that range.
Graphics{{-s,s},{-s,s}}
Graphics3D{{-s,s},{-s,s},{-s,s}}
Plot{Full,{-s,s}}
ListPlot and ListLinePlot {Full,{0,s}}
ParametricPlot and RegionPlot {{-s,s},{-s,s}}
ContourPlot and ListContourPlot{Full,Full,{-s,s}}
DensityPlot and ListDensityPlot{Full,Full,{-s,s}}
ArrayPlot{Full,Full,{0,s}}
Plot3D and ListPlot3D{Full,Full,{-s,s}}
ListSurfacePlot3D{{-s,s},{-s,s},{-s,s}}
ParametricPlot3D and RegionPlot3D{{-s,s},{-s,s},{-s,s}}
ContourPlot3D and ListContourPlot3D{Full,Full,Full,{-s,s}}
Automatically drops outlying points:
Explicitly choose and ranges:
Explicitly choose a range:
Choose the range to show all the existing points:
Use the full , range:
Automatically drops outlying points:
In[1]:=
Click for copyable input
Out[1]=
 
Explicitly choose and ranges:
In[1]:=
Click for copyable input
Out[1]=
Explicitly choose a range:
In[2]:=
Click for copyable input
Out[2]=
 
Choose the range to show all the existing points:
In[1]:=
Click for copyable input
Out[1]=
Use the full , range:
In[2]:=
Click for copyable input
Out[2]=
Normally, plot functions drop outlying points, which is equivalent to PlotRange->Automatic:
PlotRange->All shows all of the points:
PlotRange for Graphics and Graphics3D is All, by default:
Drop outlying points, by setting PlotRange->Automatic:
Use PlotRange->All to include all points:
Use PlotRange->Full to include all the points and the original domain:
An explicit range can be given in each direction by :
One value of the explicit range can be a symbol such as All or Automatic:
The interpretation of PlotRange->max depends on the function:
Any valid range specification can be given to each direction:
Specify the fraction of points below and above the plot range limits:
Include 80% of points according to their values:
Plot the CDF of the normal distribution with , :
Exclude the values above and below 20%:
Show the values above 40%:
Use ClippingStyle to style the region clipped by PlotRange:
In ordinary graphics, objects can extend beyond the plot range:
Use PlotRangeClipping->True to clip objects to the range:
Normally, plot functions clip objects to the range:
By default, 2% of padding is added to the plot range in each direction:
Prevent padding by setting PlotRangePadding to None:
Include 1 coordinate unit of padding on all sides:
No padding is added if the plot range is explicit:
Scaled coordinates are given by fractions of the plot range:
An elementary function with pole singularities:
A function with a curve singularity:
A function with random poles:
New in 1 | Last modified in 6