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

Examples

open allclose all

Basic 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 RungeKutta 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:

Wolfram Research (2007), RegionPlot, Wolfram Language function, https://reference.wolfram.com/language/ref/RegionPlot.html (updated 2022).

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_2024_regionplot, author="Wolfram Research", title="{RegionPlot}", year="2022", howpublished="\url{https://reference.wolfram.com/language/ref/RegionPlot.html}", note=[Accessed: 21-December-2024 ]}

BibLaTeX

@online{reference.wolfram_2024_regionplot, organization={Wolfram Research}, title={RegionPlot}, year={2022}, url={https://reference.wolfram.com/language/ref/RegionPlot.html}, note=[Accessed: 21-December-2024 ]}