WOLFRAM

Plot[f,{x,xmin,xmax}]

generates a plot of f as a function of x from xmin to xmax.

Plot[{f1,f2,},{x,xmin,xmax}]

plots several functions fi.

Plot[{,w[fi],},]

plots fi with features defined by the symbolic wrapper w.

Plot[,{x}reg]

takes the variable x to be in the geometric region reg.

Details and Options

Examples

open allclose all

Basic Examples  (5)Summary of the most common use cases

Plot a function:

Out[1]=1

Plot several functions with a legend:

Out[1]=1

Label each curve:

Out[1]=1

Fill below a curve:

Out[1]=1

Fill between two curves:

Out[2]=2

Plot multiple filled curves, automatically using transparent colors:

Out[1]=1

Scope  (33)Survey of the scope of standard use cases

Sampling  (10)

More points are sampled when the function changes quickly:

Out[1]=1

The plot range is selected automatically:

Out[1]=1

Ranges where the function becomes nonreal are excluded:

Out[1]=1

The curve is split when there are discontinuities in the function:

Out[1]=1

Use Exclusions->None to draw a connected curve:

Out[2]=2

Use PlotPoints and MaxRecursion to control adaptive sampling:

Out[1]=1

Use PlotRange to focus in on areas of interest:

Out[1]=1

The domain can be specified by a region:

Out[2]=2

Specify a domain using a MeshRegion:

Out[2]=2

Plot over an infinite domain:

Out[1]=1

Use ScalingFunctions to scale the axes:

Out[1]=1

Labeling and Legending  (11)

Label curves with Labeled:

Out[1]=1

Place the labels relative to the curves:

Out[2]=2

Label curves with PlotLabels:

Out[1]=1

Place the label near the curve at an value:

Out[1]=1

Use a scaled position:

Out[1]=1

Specify the text position relative to the point:

Out[2]=2

Label curves automatically with Callout:

Out[1]=1

Place a label with specific locations:

Out[1]=1
Out[2]=2

Include legends for each curve:

Out[1]=1

Use Legended to provide a legend for a specific curve:

Out[1]=1

Use Placed to change the legend location:

Out[2]=2

Curves usually have interactive callouts showing the coordinates when you mouse over them:

Out[1]=1

Including specific wrappers or interactions such as tooltips turns off the interactive features:

Out[2]=2

Choose from multiple interactive highlighting effects:

Out[1]=1

Use Highlighted to emphasize specific points in a plot:

Out[1]=1

Highlight multiple points:

Out[2]=2

Presentation  (12)

Multiple curves are automatically colored to be distinct:

Out[1]=1

Provide explicit styling to different curves:

Out[1]=1

Include a legend:

Out[1]=1

Add labels for the axes and overall plot:

Out[1]=1

Add labels for the curves:

Out[2]=2

Label positions along a curve:

Out[1]=1

Provide an interactive Tooltip for each curve:

Out[1]=1

Create filled plots:

Out[1]=1

Use a plot theme:

Out[1]=1

Create an overlay mesh:

Out[1]=1

Style the curve segments between mesh points:

Out[1]=1

Plot over an infinite domain with automatic ticks:

Out[1]=1

Show multiple curves in a row of separate panels:

Out[1]=1

Use a column instead of a row:

Out[2]=2

Use multiple rows or columns:

Out[3]=3

Options  (128)Common values & functionality for each option

AspectRatio  (1)

Choose the ratio of height to width from the actual plot values:

Out[1]=1

Axes  (2)

Draw no axes:

Out[1]=1

Draw the axis but no axis:

Out[1]=1

AxesLabel  (2)

Use labels based on variables specified in Plot:

Out[1]=1

Specify a label for each axis:

Out[1]=1

AxesOrigin  (2)

Determine where the axes cross automatically:

Out[1]=1

Specify the axes origin at the point :

Out[1]=1

AxesStyle  (3)

Change the style for the axes:

Out[1]=1

Specify the style of each axis:

Out[1]=1

Use different styles for the ticks and the axes:

Out[1]=1

Use different styles for the labels and the axes:

Out[2]=2

BaselinePosition  (1)

Align graphs by the axis in each plot:

Out[1]=1

ClippingStyle  (5)

Omit clipped regions of the plot:

Out[1]=1

Show the clipped regions like the rest of the curve:

Out[1]=1

Show clipped regions with red lines:

Out[1]=1

Show clipped regions as red at the bottom and thick at the top:

Out[1]=1

Show clipped regions as red and thick:

Out[1]=1

ColorFunction  (5)

Color by a scaled coordinate and scaled coordinate, respectively:

Out[1]=1

Color with a named color scheme:

Out[1]=1

Color a curve red when its absolute coordinate is above 0:

Out[1]=1

Fill with the color used for the curve:

Out[1]=1

ColorFunction has higher priority than PlotStyle for coloring the curve:

Out[1]=1

ColorFunctionScaling  (3)

No argument scaling on the left; automatic scaling on the right:

Out[1]=1

Color a curve red when its absolute coordinate is above 0:

Out[1]=1

Use hue to indicate direction and brightness to indicate amplitude:

Out[1]=1

Epilog  (2)

This inserts the graphics object in the resulting graphic:

Out[1]=1

Insert special markers to indicate whether a point belongs to the curve or not:

Out[1]=1

EvaluationMonitor  (3)

Find the list of values sampled by Plot:

Show where Plot evaluates Sin[x]:

Out[2]=2

Count how many times the function is evaluated:

Out[1]=1

Exclusions  (7)

Use automatic methods for computing exclusions, in this case for a piecewise function:

Out[1]=1

In this case, the exclusion comes from a branch cut discontinuity:

Out[1]=1

Indicate that no exclusions should be computed:

Out[1]=1

Exclude a fixed set of points:

Out[1]=1

Give a set of exclusions as an equation:

Out[1]=1

This gives two sets of exclusions:

Out[1]=1

Exclude an equation and the automatically chosen points:

Out[1]=1

ExclusionsStyle  (2)

Use dashed lines to indicate the vertical asymptotes:

Out[1]=1

Use black points to highlight the exclusions:

Out[1]=1

Filling  (7)

Use symbolic or explicit values:

Out[1]=1

By default, overlapping fills combine using opacity:

Out[1]=1

Fill between curve 1 and the axis:

Out[1]=1

Fill between curves 1 and 2:

Out[1]=1

Fill between curves 1 and 2 with a specific style:

Out[1]=1

Fill between curves 1 and with yellow:

Out[1]=1

Fill between curves 1 and 2; use yellow when 1 is below 2 and green when 1 is above 2:

Out[1]=1

FillingStyle  (4)

Use different fill colors:

Out[1]=1

Fill with opacity 0.5 orange:

Out[1]=1

Fill with red below the axis and blue above:

Out[1]=1

Use a variable filling style obtained from a ColorFunction:

Out[1]=1

ImageSize  (6)

Use named sizes such as Tiny, Small, Medium and Large:

Out[3]=3

Specify the width of the plot:

Out[1]=1

Specify the height of the plot:

Out[2]=2

Allow the width and height to be up to a certain size:

Out[1]=1

Specify the width and height for a graphic, padding with space if necessary:

Out[1]=1

Setting AspectRatioFull will fill the available space:

Out[2]=2

Use ImageSizeFull to fill the available space in an object:

Out[1]=1

Specify the image size as a fraction of the available space:

Out[1]=1

LabelingSize  (3)

Textual labels are shown at their actual sizes:

Out[8]=8

Image labels are automatically resized:

Out[1]=1

Specify a maximum size for textual labels:

Out[1]=1

Specify a maximum size for image labels:

Out[2]=2

MaxRecursion  (2)

The default sampling mesh:

Out[1]=1

Each level of MaxRecursion will subdivide the initial mesh into a finer mesh:

Out[1]=1

Mesh  (3)

Show the initial and final sampling meshes:

Out[1]=1

Use 20 mesh levels evenly spaced in the direction:

Out[1]=1

Use an explicit list of values for the mesh in the direction:

Out[1]=1

MeshFunctions  (2)

Use a mesh evenly spaced in the and directions:

Out[1]=1

Show 5 mesh levels in the direction (red) and 10 in the direction (blue):

Out[1]=1

MeshShading  (6)

Alternate red and blue segments of equal width in the direction:

Out[1]=1

Use None to remove segments:

Out[1]=1

MeshShading can be used with PlotStyle:

Out[1]=1

MeshShading has higher priority than PlotStyle for styling the curve:

Out[1]=1

Use PlotStyle for some segments by setting MeshShading to Automatic:

Out[1]=1

MeshShading can be used with ColorFunction:

Out[1]=1

MeshStyle  (4)

Color the mesh the same color as the plot:

Out[1]=1

Use a red mesh in the direction:

Out[1]=1

Use a red mesh in the direction and a blue mesh in the direction:

Out[1]=1

Use big, red mesh points in the direction:

Out[1]=1

PerformanceGoal  (2)

Generate a higher-quality plot:

Out[1]=1

Emphasize performance, possibly at the cost of quality:

Out[1]=1

PlotHighlighting  (9)

Plots have interactive coordinate callouts with the default setting PlotHighlightingAutomatic:

Out[1]=1

Use PlotHighlightingNone to disable the highlighting for the entire plot:

Out[1]=1

Use Highlighted[,None] to disable highlighting for a single curve:

Out[3]=3

Move the mouse over a curve to highlight it using arbitrary graphics directives:

Out[1]=1

Move the mouse over the curve to highlight it with a ball and label:

Out[1]=1

Use a ball and label to highlight a specific point on the curve:

Out[2]=2

Move the mouse over the curve to highlight it with a label and droplines to the axes:

Out[1]=1

Use a ball and label to highlight a specific point on the curve:

Out[2]=2

Move the mouse over the plot to highlight it with a slice showing values corresponding to the position:

Out[1]=1

Highlight the curves at a fixed value:

Out[2]=2

Move the mouse over the plot to highlight it with a slice showing values corresponding to the position:

Out[1]=1

Highlight the curves at a fixed value:

Out[2]=2

Use a component that shows the points on the curve closest to the position of the mouse cursor:

Out[1]=1

Specify the style for the points:

Out[2]=2

Use a component that shows the coordinates on the curve closest to the mouse cursor:

Out[1]=1

Use Callout options to change the appearance of the label:

Out[2]=2

Combine components to create a custom effect:

Out[1]=1

PlotLabel  (1)

Add an overall label to the plot:

Out[1]=1

PlotLabels  (5)

Specify text to label curves:

Out[1]=1

Place the labels above the curves:

Out[1]=1

Place the labels differently for each curve:

Out[2]=2

PlotLabels->"Expressions" uses functions as curve labels:

Out[1]=1

Use callouts to identify the curves:

Out[1]=1

Use None to not add a label:

Out[1]=1

PlotLayout  (2)

Place each curve in a separate panel using shared axes:

Out[2]=2

Use a row instead of a column:

Out[1]=1

Use multiple columns or rows:

Out[1]=1

Prefer full columns or rows:

Out[2]=2

PlotLegends  (7)

No legends are used by default:

Out[1]=1

Create a legend based on the functions:

Out[1]=1

Create a legend with placeholder text:

Out[1]=1

Create a legend with specific labels:

Out[1]=1

PlotLegends picks up PlotStyle values automatically:

Out[1]=1

Use Placed to position legends:

Out[1]=1

Place legends inside:

Out[2]=2

Use LineLegend to modify the appearance of the legend:

Out[1]=1

PlotPoints  (1)

Use more initial points to get a smoother curve:

Out[1]=1

PlotRange  (3)

Show the curve over the whole domain:

Out[1]=1

Show the curve only where it is real valued:

Out[1]=1

Show the curve from to over the whole domain:

Out[1]=1

PlotRangeClipping  (2)

Constrain the curve to the framed region:

Out[1]=1

Draw the curve using the whole graphical region:

Out[1]=1

PlotStyle  (6)

Use different style directives:

Out[1]=1

By default, different styles are chosen for multiple curves:

Out[1]=1

Explicitly specify the style for different curves:

Out[1]=1

PlotStyle can be combined with ColorFunction:

Out[1]=1

PlotStyle can be combined with MeshShading:

Out[1]=1

MeshStyle by default uses the same style as PlotStyle:

Out[1]=1

PlotTheme  (2)

Use a theme with simple ticks and grid lines in a bright color scheme:

Out[1]=1

Change the color scheme:

Out[1]=1

RegionFunction  (2)

Show the curve where :

Out[1]=1

Exclude the region where :

Out[1]=1

ScalingFunctions  (9)

By default, plots have linear scales in each direction:

Out[1]=1

Use a log scale in the direction:

Out[1]=1

Use a linear scale in the direction that shows smaller numbers at the top:

Out[1]=1

Use a reciprocal scale in the direction:

Out[1]=1

Use different scales in the and directions:

Out[1]=1

Reverse the axis without changing the axis:

Out[1]=1

Use a scale defined by a function and its inverse:

Out[1]=1

Positions in Ticks and GridLines are automatically scaled:

Out[1]=1

PlotRange and AxesOrigin are automatically scaled:

Out[1]=1

WorkingPrecision  (2)

Evaluate functions using machine-precision arithmetic:

Out[1]=1

Evaluate functions using arbitrary-precision arithmetic:

Out[1]=1

Applications  (19)Sample problems that can be solved with this function

Basic Applications  (3)

Compare several functions:

Out[1]=1

A function and its inverse are reflections in :

Out[1]=1

Illustrate that -Abs[x]x Sin[1/x]Abs[x] in the interval:

Out[1]=1

Highlighting Discrete Function Features  (8)

Curves are broken where a function has singularities:

Out[1]=1

Emphasize the singularities by specifying ExclusionsStyle:

Out[2]=2

Highlight the discontinuities in a function using ExclusionsStyle:

Out[1]=1

The discontinuities are automatically derived but can also be specified:

Out[2]=2

Highlight zeros of a function :

Out[1]=1

The second argument passed to MeshFunctions is :

Out[2]=2

Highlight local extrema for a function using MeshFunctions:

Out[1]=1

Local extrema are given by :

Out[3]=3

Highlight the local maximums and minimums of a function :

Out[2]=2

The local maximums are the points where and :

Out[3]=3

Similarly the local minimums are given by and :

Out[4]=4

Highlight the non-negative and non-positive parts of a function :

Out[2]=2

Using the Filling specification allows this to be readily achieved:

Out[3]=3

Highlight the segments where the function is increasing or decreasing:

Out[2]=2

A function is increasing when :

Out[4]=4

A function is decreasing when :

Out[6]=6

Show them together and add a legend:

Out[7]=7

Highlight the parts where a function is convex or concave:

Out[2]=2

A function is convex when :

Out[4]=4

A function is concave when :

Out[6]=6

Show them together with a legend:

Out[7]=7

Highlighting Continuous Function Features  (1)

Use color to overlay the derivative of function on top of the curve for :

Out[2]=2

By rescaling the derivative to be between 0 and 1, you can easily map to a color:

Out[4]=4
Out[5]=5

From ColorData you can get a variety of color scales:

Out[6]=6

The derivative can now be overlaid as color on top of the curve using ColorFunction:

Out[8]=8

Using Filling emphasizes the color more:

Out[9]=9

Epigraph and Hypograph of a Function  (2)

The epigraph of a function is given by . You can visualize the epigraph by using Filling:

Out[1]=1

The hypograph of a function is given by . You can visualize the hypograph by using Filling:

Out[1]=1

Complex-Valued Functions  (3)

Plot the real and imaginary parts of a complex-valued function of a real variable:

Out[1]=1

Plot the magnitude and phase of a complex-valued function of a real variable:

Out[1]=1

Plot the magnitude and color based on the phase of the function:

Out[1]=1
Out[2]=2

Add filling and a color legend that provides a separate axis for the phase:

Out[3]=3

Equation Solutions  (2)

The general solution to a differential equation:

Out[1]=1

Plot two particular solutions:

Out[2]=2

Plot a family of solutions:

Out[3]=3

The general solution to an algebraic equation:

Out[1]=1

Plot a family of solutions:

Out[2]=2

Properties & Relations  (9)Properties of the function, and connections to other functions

Plot samples more points where it needs to:

Out[1]=1

Plot is a special case of ParametricPlot for curves:

Out[1]=1

Use ParametricPlot for parametric curves and regions:

Out[1]=1

Use ContourPlot and RegionPlot for implicit curves and regions:

Out[1]=1

Use LogPlot, LogLinearPlot, and LogLogPlot for logarithmic plots:

Out[1]=1

Use ListPlot and ListLinePlot for data:

Out[1]=1

AbsArgPlot is a special case of Plot:

Out[1]=1

ReImPlot is a special case of Plot:

Out[1]=1

Use Plot3D and ParametricPlot3D for function and parametric surfaces:

Out[1]=1
Out[2]=2

Neat Examples  (1)Surprising or curious use cases

Eigenfunctions in a potential well:

Out[2]=2
Wolfram Research (1988), Plot, Wolfram Language function, https://reference.wolfram.com/language/ref/Plot.html (updated 2023).
Wolfram Research (1988), Plot, Wolfram Language function, https://reference.wolfram.com/language/ref/Plot.html (updated 2023).

Text

Wolfram Research (1988), Plot, Wolfram Language function, https://reference.wolfram.com/language/ref/Plot.html (updated 2023).

Wolfram Research (1988), Plot, Wolfram Language function, https://reference.wolfram.com/language/ref/Plot.html (updated 2023).

CMS

Wolfram Language. 1988. "Plot." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2023. https://reference.wolfram.com/language/ref/Plot.html.

Wolfram Language. 1988. "Plot." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2023. https://reference.wolfram.com/language/ref/Plot.html.

APA

Wolfram Language. (1988). Plot. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/Plot.html

Wolfram Language. (1988). Plot. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/Plot.html

BibTeX

@misc{reference.wolfram_2025_plot, author="Wolfram Research", title="{Plot}", year="2023", howpublished="\url{https://reference.wolfram.com/language/ref/Plot.html}", note=[Accessed: 26-April-2025 ]}

@misc{reference.wolfram_2025_plot, author="Wolfram Research", title="{Plot}", year="2023", howpublished="\url{https://reference.wolfram.com/language/ref/Plot.html}", note=[Accessed: 26-April-2025 ]}

BibLaTeX

@online{reference.wolfram_2025_plot, organization={Wolfram Research}, title={Plot}, year={2023}, url={https://reference.wolfram.com/language/ref/Plot.html}, note=[Accessed: 26-April-2025 ]}

@online{reference.wolfram_2025_plot, organization={Wolfram Research}, title={Plot}, year={2023}, url={https://reference.wolfram.com/language/ref/Plot.html}, note=[Accessed: 26-April-2025 ]}