RegionPlot
RegionPlot [pred,{x,xmin,xmax},{y,ymin,ymax}]
makes a plot showing the region in which pred is True .
RegionPlot [{pred1,pred2,…},…]
plots several regions corresponding to the predi.
RegionPlot [{…,w[predi,…],…},…]
plots predi with features defined by the symbolic wrapper w.
Details and Options
- The predicate pred can be any logical combination of inequalities.
- The region plotted by RegionPlot can contain disconnected parts.
- RegionPlot treats the variable x and y as local, effectively using Block .
- RegionPlot has attribute HoldAll and evaluates pred only after assigning specific numerical values to x and y. In some cases, it may be more efficient to use Evaluate to evaluate pred symbolically first.
- The following wrappers w can be used for the predi:
- Wrappers w can be applied at multiple levels:
-
w[predi] wrap the prediw[{predi,…}] wrap a collection of prediw1[w2[…]] use nested wrappers
- Callout , Labeled and Placed can use the following positions pos:
-
Automatic automatically placed labels{x,y} position near {x,y}{pos,epos} epos in label placed at relative position pos of the region
- RegionPlot has the same options as Graphics , with the following additions and changes: [List of all options]
-
AspectRatio 1 ratio of height to width
- Typical settings for PlotLegends include:
-
None no legendAutomatic automatically determine the legend"Expressions" use f1, f2, … as the legend labels{lbl1,lbl2,…} use lbl1, lbl2, … as the legend labels
- RegionPlot initially evaluates pred at a grid of equally spaced sample points specified by PlotPoints . Then it uses an adaptive algorithm to subdivide at most MaxRecursion times, attempting to find the boundaries of all regions in which pred is True .
- You should realize that since it uses only a finite number of sample points, it is possible for RegionPlot to miss regions in which pred is True . To check your results, you should try increasing the settings for PlotPoints and MaxRecursion .
- With the default setting PlotRange->Full , RegionPlot will explicitly include the full ranges xmin to xmax and ymin to ymax for x and y.
- With Mesh->All , RegionPlot will explicitly draw mesh lines to indicate the subdivisions it used to find each region.
- RegionPlot can in general only find regions of positive measure; it cannot find regions that are just lines or points.
- The arguments supplied to functions in MeshFunctions are x, y. ColorFunction and TextureCoordinateFunction are by default supplied with scaled versions of these arguments.
- ScalingFunctions {sx,sy} scales the x axis with sx and the y axis with sy.
- Common built-in scaling functions s include:
-
"Log" log scale with automatic tick labeling"Log10" base-10 log scale with powers of 10 for ticks"SignedLog" log-like scale that includes 0 and negative numbers"Reverse" reverse the coordinate direction"Infinite" infinite scale
- RegionPlot returns Graphics [GraphicsComplex [data]].
-
AspectRatio 1 ratio of height to widthImageMargins 0. the margins to leave around the graphicPreserveImageOptions Automatic whether to preserve image options when displaying new versions of the same graphic
List of all options
Examples
open allclose allBasic Examples (5)
Plot a region defined by an inequality:
Plot a region defined by logical combinations of inequalities:
Plot disconnected regions:
Use legends:
Style the region:
Scope (19)
Sampling (5)
More points are sampled where the function changes quickly:
Areas where the function is not True are excluded:
Use PlotPoints and MaxRecursion to control adaptive sampling:
Use logical combinations of regions:
Plot over an infinite domain:
Labeling and Legending (4)
Label regions with Labeled :
Place the labels relative to the regions:
Label regions with Callout :
Callout leader is turned off when label is inside the region:
Add legends with PlotLegends :
Add legends with Legended :
Presentation (10)
Provide an explicit PlotStyle for the region:
Provide an explicit BoundaryStyle for the region boundary:
Add labels:
Use legends for multiple regions:
Use automatic legends for gradient colored regions:
Use an overlay mesh:
Style the areas between mesh lines:
Color the region with an overlay density:
Use a plot theme:
Scale the axes for a region:
Options (56)
BoundaryStyle (4)
Regions have a gray boundary:
Use None to show regions without any boundary:
Use a blue boundary:
Use a thicker dashed boundary:
ColorFunction (5)
Color regions by scaled and values:
Named color functions use the scaled direction:
Color regions according to a function of and :
ColorFunction has higher priority than PlotStyle :
ColorFunction has lower priority than MeshShading :
ColorFunctionScaling (1)
Use unscaled and coordinates for coloring the regions:
LabelingSize (2)
Textual labels are shown at their actual sizes:
Specify the size of the text:
Image labels are resized to fit in the plot:
Specify the labeling size:
MaxRecursion (1)
Refine the region where it changes quickly:
Mesh (7)
Use no mesh:
Show the initial and final sampling meshes:
Use 10 mesh lines in each direction:
Use 3 mesh lines in the direction and 6 mesh lines in the direction:
Use mesh lines at specific values:
Use different styles for different mesh lines:
Mesh lines apply to the whole region, not each component:
MeshFunctions (2)
Mesh lines in the and directions:
Mesh lines at fixed radii from the origin:
MeshShading (4)
Use None to remove regions:
Lay a checkerboard pattern over a region:
MeshShading has a higher priority than PlotStyle :
MeshShading has a higher priority than ColorFunction :
MeshStyle (2)
Use red mesh lines:
Use red mesh lines in the direction and dashed mesh lines in the direction:
PerformanceGoal (2)
Generate a higher-quality plot:
Emphasize performance, possibly at the cost of quality:
PlotLegends (8)
Use legends:
Use legends for multiple regions:
Use automatic legends for a gradient colored region:
PlotLegends automatically picks up styles:
Use functions as legend texts:
Specify legend texts:
Use Placed to change legend position:
Use SwatchLegend to change legend appearance:
PlotPoints (1)
Use more initial points to get smoother regions:
PlotRange (2)
Show the region over the full , range:
Automatically compute the , range:
PlotStyle (5)
Regions are shown in light blue:
Use None to just show the boundary of the region:
Use light orange:
Distinct colors are used for different regions:
Use transparent colors for different regions:
PlotTheme (2)
Use a theme with simple ticks and grid lines in a bright color scheme:
Change the color scheme:
ScalingFunctions (5)
By default, plots have linear scales in each direction:
Scale the x axis to go from positive to negative instead:
Use a sign-aware log scale for the y axis:
Domain that contains Infinity is scaled automatically:
Use "Reverse" scale in an infinite domain:
TextureCoordinateFunction (2)
Textures use scaled and coordinates by default:
Use unscaled coordinates:
TextureCoordinateScaling (1)
Use scaled or unscaled coordinates for textures:
Applications (8)
Find the intersection of two half-spaces:
Simple regions including a disk:
Disk annulus:
Ellipse:
Ellipse annulus:
Disk segment:
Disk segment annulus:
Illustrate set operations:
Visualize regions in the complex plane:
Identify where a function is real-valued:
Integrate over a region that contains parameters:
Visualize the regions for the three different cases:
Absolute stability regions for Euler forward:
Stability regions for Euler backward and Tustin or midpoint rules:
Stability regions for explicit Runge–Kutta rules of order 2, 3, 4, and 5:
Relative stability or order-stars regions for {0,n} Padé approximants:
Order-star regions for {n,0} Padé approximants:
Properties & Relations (9)
RegionPlot samples more points where it needs to:
Use RegionPlot3D for volumes:
Use ContourPlot and ContourPlot3D for systems of equalities:
Use ComplexRegionPlot for regions in the complex plane:
Use RegionFunction to constrain other plots:
Use ParametricPlot for plane parametric curves and regions:
Use Integrate or NIntegrate to integrate over regions:
The integration region:
Use Maximize , NMaximize , or FindMaximum to optimize over regions:
Use Reduce to get a cylindrical representation of the region:
Use FindInstance to find specific samples in regions:
Possible Issues (2)
RegionPlot will only visualize two-dimensional regions:
Use ContourPlot to visualize one-dimensional regions:
Piecewise constant functions can have two-dimensional level sets:
Neat Examples (2)
Overlay colors on a transcendental region:
Exclusive OR of five disks:
See Also
ContourPlot DensityPlot RegionPlot3D RegionFunction ParametricPlot Reduce FindInstance Boole
Function Repository: RegionInputField
Related Guides
History
Introduced in 2007 (6.0) | Updated in 2010 (8.0) ▪ 2012 (9.0) ▪ 2014 (10.0) ▪ 2019 (12.0) ▪ 2021 (13.0) ▪ 2022 (13.1)
Text
Wolfram Research (2007), RegionPlot, Wolfram Language function, https://reference.wolfram.com/language/ref/RegionPlot.html (updated 2022).
CMS
Wolfram Language. 2007. "RegionPlot." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2022. https://reference.wolfram.com/language/ref/RegionPlot.html.
APA
Wolfram Language. (2007). RegionPlot. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/RegionPlot.html
BibTeX
@misc{reference.wolfram_2025_regionplot, author="Wolfram Research", title="{RegionPlot}", year="2022", howpublished="\url{https://reference.wolfram.com/language/ref/RegionPlot.html}", note=[Accessed: 10-April-2025 ]}
BibLaTeX
@online{reference.wolfram_2025_regionplot, organization={Wolfram Research}, title={RegionPlot}, year={2022}, url={https://reference.wolfram.com/language/ref/RegionPlot.html}, note=[Accessed: 10-April-2025 ]}