Products
  • Wolfram|One

    The definitive Wolfram Language and notebook experience

  • Mathematica

    The original technical computing environment

  • Notebook Assistant + LLM Kit

    All-in-one AI assistance for your Wolfram experience

  • Compute Services
  • System Modeler
  • Finance Platform
  • Wolfram|Alpha Notebook Edition
  • Application Server
  • Enterprise Private Cloud
  • Wolfram Engine
  • Wolfram Player
  • Wolfram Cloud App
  • Wolfram Player App

More mobile apps

Core Technologies of Wolfram Products

  • Wolfram Language
  • Computable Data
  • Wolfram Notebooks
  • AI & Linguistic Understanding

Deployment Options

  • Wolfram Cloud
  • wolframscript
  • Wolfram Engine Community Edition
  • Wolfram LLM API
  • WSTPServer
  • Wolfram|Alpha APIs

From the Community

  • Function Repository
  • Community Paclet Repository
  • Example Repository
  • Neural Net Repository
  • Prompt Repository
  • Wolfram Demonstrations
  • Data Repository
  • Group & Organizational Licensing
  • All Products
Consulting & Solutions

We deliver solutions for the AI era—combining symbolic computation, data-driven insights and deep technical expertise

  • Data & Computational Intelligence
  • Model-Based Design
  • Algorithm Development
  • Wolfram|Alpha for Business
  • Blockchain Technology
  • Education Technology
  • Quantum Computation

Wolfram Consulting

Wolfram Solutions

  • Data Science
  • Artificial Intelligence
  • Biosciences
  • Healthcare Intelligence
  • Sustainable Energy
  • Control Systems
  • Enterprise Wolfram|Alpha
  • Blockchain Labs

More Wolfram Solutions

Wolfram Solutions For Education

  • Research Universities
  • Colleges & Teaching Universities
  • Junior & Community Colleges
  • High Schools
  • Educational Technology
  • Computer-Based Math

More Solutions for Education

  • Contact Us
Learning & Support

Get Started

  • Wolfram Language Introduction
  • Fast Intro for Programmers
  • Fast Intro for Math Students
  • Wolfram Language Documentation

More Learning

  • Highlighted Core Areas
  • Demonstrations
  • YouTube
  • Daily Study Groups
  • Wolfram Schools and Programs
  • Books

Grow Your Skills

  • Wolfram U

    Courses in computing, science, life and more

  • Community

    Learn, solve problems and share ideas.

  • Blog

    News, views and insights from Wolfram

  • Resources for

    Software Developers

Tech Support

  • Contact Us
  • Support FAQs
  • Support FAQs
  • Contact Us
Company
  • About Wolfram
  • Career Center
  • All Sites & Resources
  • Connect & Follow
  • Contact Us

Work with Us

  • Student Ambassador Initiative
  • Wolfram for Startups
  • Student Opportunities
  • Jobs Using Wolfram Language

Educational Programs for Adults

  • Summer School
  • Winter School

Educational Programs for Youth

  • Middle School Camp
  • High School Research Program
  • Computational Adventures

Read

  • Stephen Wolfram's Writings
  • Wolfram Blog
  • Wolfram Tech | Books
  • Wolfram Media
  • Complex Systems

Educational Resources

  • Wolfram MathWorld
  • Wolfram in STEM/STEAM
  • Wolfram Challenges
  • Wolfram Problem Generator

Wolfram Initiatives

  • Wolfram Science
  • Wolfram Foundation
  • History of Mathematics Project

Events

  • Stephen Wolfram Livestreams
  • Online & In-Person Events
  • Contact Us
  • Connect & Follow
Wolfram|Alpha
  • Your Account
  • User Portal
  • Wolfram Cloud
  • Products
    • Wolfram|One
    • Mathematica
    • Notebook Assistant + LLM Kit
    • Compute Services
    • System Modeler
    • Finance Platform
    • Wolfram|Alpha Notebook Edition
    • Application Server
    • Enterprise Private Cloud
    • Wolfram Engine
    • Wolfram Player
    • Wolfram Cloud App
    • Wolfram Player App

    More mobile apps

    • Core Technologies
      • Wolfram Language
      • Computable Data
      • Wolfram Notebooks
      • AI & Linguistic Understanding
    • Deployment Options
      • Wolfram Cloud
      • wolframscript
      • Wolfram Engine Community Edition
      • Wolfram LLM API
      • WSTPServer
      • Wolfram|Alpha APIs
    • From the Community
      • Function Repository
      • Community Paclet Repository
      • Example Repository
      • Neural Net Repository
      • Prompt Repository
      • Wolfram Demonstrations
      • Data Repository
    • Group & Organizational Licensing
    • All Products
  • Consulting & Solutions

    We deliver solutions for the AI era—combining symbolic computation, data-driven insights and deep technical expertise

    WolframConsulting.com

    Wolfram Solutions

    • Data Science
    • Artificial Intelligence
    • Biosciences
    • Healthcare Intelligence
    • Sustainable Energy
    • Control Systems
    • Enterprise Wolfram|Alpha
    • Blockchain Labs

    More Wolfram Solutions

    Wolfram Solutions For Education

    • Research Universities
    • Colleges & Teaching Universities
    • Junior & Community Colleges
    • High Schools
    • Educational Technology
    • Computer-Based Math

    More Solutions for Education

    • Contact Us
  • Learning & Support

    Get Started

    • Wolfram Language Introduction
    • Fast Intro for Programmers
    • Fast Intro for Math Students
    • Wolfram Language Documentation

    Grow Your Skills

    • Wolfram U

      Courses in computing, science, life and more

    • Community

      Learn, solve problems and share ideas.

    • Blog

      News, views and insights from Wolfram

    • Resources for

      Software Developers
    • Tech Support
      • Contact Us
      • Support FAQs
    • More Learning
      • Highlighted Core Areas
      • Demonstrations
      • YouTube
      • Daily Study Groups
      • Wolfram Schools and Programs
      • Books
    • Support FAQs
    • Contact Us
  • Company
    • About Wolfram
    • Career Center
    • All Sites & Resources
    • Connect & Follow
    • Contact Us

    Work with Us

    • Student Ambassador Initiative
    • Wolfram for Startups
    • Student Opportunities
    • Jobs Using Wolfram Language

    Educational Programs for Adults

    • Summer School
    • Winter School

    Educational Programs for Youth

    • Middle School Camp
    • High School Research Program
    • Computational Adventures

    Read

    • Stephen Wolfram's Writings
    • Wolfram Blog
    • Wolfram Tech | Books
    • Wolfram Media
    • Complex Systems
    • Educational Resources
      • Wolfram MathWorld
      • Wolfram in STEM/STEAM
      • Wolfram Challenges
      • Wolfram Problem Generator
    • Wolfram Initiatives
      • Wolfram Science
      • Wolfram Foundation
      • History of Mathematics Project
    • Events
      • Stephen Wolfram Livestreams
      • Online & In-Person Events
    • Contact Us
    • Connect & Follow
  • Wolfram|Alpha
  • Wolfram Cloud
  • Your Account
  • User Portal
Wolfram Language & System Documentation Center
ContourPlot
  • See Also
    • DensityPlot
    • ListContourPlot
    • RegionPlot
    • Plot3D
    • ContourPlot3D
    • SliceContourPlot3D
    • StreamPlot
    • StreamDensityPlot
    • MeshFunctions
    • ContourLabels
    • ContourShading
    • GeoGraphics
  • Related Guides
    • Function Visualization
    • Solvers over Regions
    • Statistical Visualization
  • Tech Notes
    • Density and Contour Plots
    • See Also
      • DensityPlot
      • ListContourPlot
      • RegionPlot
      • Plot3D
      • ContourPlot3D
      • SliceContourPlot3D
      • StreamPlot
      • StreamDensityPlot
      • MeshFunctions
      • ContourLabels
      • ContourShading
      • GeoGraphics
    • Related Guides
      • Function Visualization
      • Solvers over Regions
      • Statistical Visualization
    • Tech Notes
      • Density and Contour Plots

ContourPlot[f,{x,xmin,xmax},{y,ymin,ymax}]

generates a contour plot of f as a function of x and y.

ContourPlot[f==g,{x,xmin,xmax},{y,ymin,ymax}]

plots contour lines for which f=g.

ContourPlot[{f1==g1,f2==g2,…},{x,xmin,xmax},{y,ymin,ymax}]

plots several contour lines.

ContourPlot[…,{x,y}∈reg]

takes the variables {x,y} to be in the geometric region reg.

Details and Options
Details and Options Details and Options
Examples  
Basic Examples  
Scope  
Sampling  
Presentation  
Options  
AspectRatio  
Axes  
AxesLabel  
Show More Show More
AxesOrigin  
AxesStyle  
BoundaryStyle  
ClippingStyle  
ColorFunction  
ColorFunctionScaling  
ContourLabels  
ContourLines  
Contours  
ContourShading  
ContourStyle  
EvaluationMonitor  
Exclusions  
ExclusionsStyle  
ImageSize  
MaxRecursion  
Mesh  
MeshFunctions  
MeshStyle  
PerformanceGoal  
PlotInteractivity  
PlotLayout  
PlotLegends  
PlotPoints  
PlotRange  
PlotTheme  
RegionFunction  
ScalingFunctions  
WorkingPrecision  
Applications  
Properties & Relations  
Possible Issues  
Neat Examples  
See Also
Tech Notes
Related Guides
History
Cite this Page
BUILT-IN SYMBOL
  • See Also
    • DensityPlot
    • ListContourPlot
    • RegionPlot
    • Plot3D
    • ContourPlot3D
    • SliceContourPlot3D
    • StreamPlot
    • StreamDensityPlot
    • MeshFunctions
    • ContourLabels
    • ContourShading
    • GeoGraphics
  • Related Guides
    • Function Visualization
    • Solvers over Regions
    • Statistical Visualization
  • Tech Notes
    • Density and Contour Plots
    • See Also
      • DensityPlot
      • ListContourPlot
      • RegionPlot
      • Plot3D
      • ContourPlot3D
      • SliceContourPlot3D
      • StreamPlot
      • StreamDensityPlot
      • MeshFunctions
      • ContourLabels
      • ContourShading
      • GeoGraphics
    • Related Guides
      • Function Visualization
      • Solvers over Regions
      • Statistical Visualization
    • Tech Notes
      • Density and Contour Plots

ContourPlot

ContourPlot[f,{x,xmin,xmax},{y,ymin,ymax}]

generates a contour plot of f as a function of x and y.

ContourPlot[f==g,{x,xmin,xmax},{y,ymin,ymax}]

plots contour lines for which f=g.

ContourPlot[{f1==g1,f2==g2,…},{x,xmin,xmax},{y,ymin,ymax}]

plots several contour lines.

ContourPlot[…,{x,y}∈reg]

takes the variables {x,y} to be in the geometric region reg.

Details and Options

  • ContourPlot is also known as an isoline, isocurve, level set or sublevel set.
  • When given a function f, ContourPlot constructs contour curves corresponding to the level sets where f[x,y] has constant values d1, d2, etc. By default, the regions between the curves are shaded to more easily identify regions whose values are between di and di+1.
  • It visualizes the areas .
  • When given equations f==g, ContourPlot shows the curves of {x,y} that satisfy the equation. No shading of regions is done; the curves from multiple equations can intersect each other in arbitrary ways for which shading is meaningless. It visualizes the set .
  • At positions where f does not evaluate to a real number, holes are left so that the background to the contour plot shows through.
  • ContourPlot treats the variables x and y as local, effectively using Block.
  • ContourPlot has attribute HoldAll, and evaluates the fi and gi only after assigning specific numerical values to x and y.
  • In some cases, it may be more efficient to use Evaluate to evaluate the fi and gi symbolically before specific numerical values are assigned to x and y.
  • The plot is left blank in any regions where f evaluates to None.
  • ContourPlot has the same options as Graphics, with the following additions and changes: [List of all options]
  • AspectRatio 1ratio of height to width
    BoundaryStyle Nonehow to draw RegionFunction boundaries
    BoxRatiosAutomaticeffective 3D bounding-box ratios
    ClippingStyle Nonehow to draw values clipped by PlotRange
    ColorFunction Automatichow to color regions between contour lines
    ColorFunctionScaling Truewhether to scale the argument to ColorFunction
    ContourLabels Automatichow to label contour levels
    Contours Automatichow many or what contours to use
    ContourShading Automatichow to shade regions between contours
    ContourStyle Automaticthe style for contour lines
    EvaluationMonitor Noneexpression to evaluate at every function evaluation
    Exclusions Automaticx,y curves to exclude
    ExclusionsStyle Nonewhat to draw at excluded curves
    FrameTruewhether to put a frame around the plot
    FrameTicksAutomaticframe tick marks
    LightingAngleNoneeffective angle of the simulated light source
    MaxRecursion Automaticthe maximum number of recursive subdivisions allowed
    Mesh Nonehow many mesh lines in each direction to draw
    MeshFunctions {}how to determine the placement of mesh lines
    MeshStyle Automaticthe style for mesh lines
    MethodAutomaticthe method to use for refining contours
    PerformanceGoal $PerformanceGoalaspects of performance to try to optimize
    PlotInteractivity $PlotInteractivitywhether to allow interactive elements
    PlotLayout Automatichow to position contours
    PlotLegends Nonelegends for contour regions
    PlotPoints Automaticthe initial number of sample points in each direction
    PlotRange {Full,Full,Automatic}the range of f or other values to include
    PlotRangeClippingTruewhether to clip at the plot range
    PlotRangePaddingAutomatichow much to pad the range of values
    PlotTheme $PlotThemeoverall theme for the plot
    RegionFunction (True&)how to determine whether a point should be included
    ScalingFunctions Nonehow to scale individual coordinates
    WorkingPrecision MachinePrecisionthe precision used in internal computations
  • Typical settings for PlotLegends include:
  • Noneno legend
    Automaticautomatically determine legend
    Placed[lspec,…]specify placement for legend
  • With the default setting ContourShading->Automatic, shading is used for ContourPlot[f,…] but not for ContourPlot[f==g,…].
  • ContourPlot[{f1==g1,f2==g2,…},…] superimposes the contour lines associated with all of the equalities fi==gi.
  • ColorData["DefaultPlotColors"] gives the default sequence of colors used by ContourStyle when plotting sets of equations.
  • In determining how to color regions between contour levels, ContourPlot looks first at any explicit setting given for ContourShading, then at the setting for ColorFunction.
  • ColorData["DefaultPlotColors"] gives the default sequence of colors used by ContourStyle.
  • ContourPlot initially evaluates f at a grid of equally spaced sample points specified by PlotPoints. Then it uses an adaptive algorithm to subdivide at most MaxRecursion times to generate smooth contours.
  • You should realize that since it uses only a finite number of sample points, it is possible for ContourPlot to miss features of your functions. To check your results, you should try increasing the settings for PlotPoints and MaxRecursion.
  • With some settings for PerformanceGoal, other specific option settings may be overridden.
  • The arguments supplied to functions in MeshFunctions and RegionFunction are x, y, f.
  • ColorFunction is supplied with a single argument, given by default by the average of the scaled values of f for each pair of successive contour levels.
  • With the default settings Exclusions->Automatic and ExclusionsStyle->None, ContourPlot breaks continuity in its sampling at any discontinuity curve it detects. The discontinuity is immediately visible only if it jumps out of a particular contour level.
  • Possible settings for ScalingFunctions include:
  • sfscale the f values
    {sx,sy}scale x and y axes
    {sx,sy,sf}scale x and y axes and f values
  • Possible settings for PlotLayout that show each input in a separate plot panel include:
  • "Column"use separate contours in a column of panels
    "Row"use separate contours in a row of panels
    {"Column",k},{"Row",k}use k columns or rows
    {"Column",UpTo[k]},{"Row",UpTo[k]}use at most k columns or rows
  • With a setting other than LightingAngle->None, ContourPlot includes simulated lighting based on height values determined by BoxRatios.
  • ContourPlot returns Graphics[GraphicsComplex[data]].
  • List of all options
  • Highlight options with settings specific to ContourPlot
  • AlignmentPointCenterthe default point in the graphic to align with
    AspectRatio1ratio of height to width
    AxesFalsewhether to draw axes
    AxesLabelNoneaxes labels
    AxesOriginAutomaticwhere axes should cross
    AxesStyle{}style specifications for the axes
    BackgroundNonebackground color for the plot
    BaselinePositionAutomatichow to align with a surrounding text baseline
    BaseStyle{}base style specifications for the graphic
    BoundaryStyleNonehow to draw RegionFunction boundaries
    BoxRatiosAutomaticeffective 3D bounding-box ratios
    ClippingStyleNonehow to draw values clipped by PlotRange
    ColorFunctionAutomatichow to color regions between contour lines
    ColorFunctionScalingTruewhether to scale the argument to ColorFunction
    ContentSelectableAutomaticwhether to allow contents to be selected
    ContourLabelsAutomatichow to label contour levels
    ContoursAutomatichow many or what contours to use
    ContourShadingAutomatichow to shade regions between contours
    ContourStyleAutomaticthe style for contour lines
    CoordinatesToolOptionsAutomaticdetailed behavior of the coordinates tool
    Epilog{}primitives rendered after the main plot
    EvaluationMonitorNoneexpression to evaluate at every function evaluation
    ExclusionsAutomaticx,y curves to exclude
    ExclusionsStyleNonewhat to draw at excluded curves
    FormatTypeTraditionalFormthe default format type for text
    FrameTruewhether to put a frame around the plot
    FrameLabelNoneframe labels
    FrameStyle{}style specifications for the frame
    FrameTicksAutomaticframe tick marks
    FrameTicksStyle{}style specifications for frame ticks
    GridLinesNonegrid lines to draw
    GridLinesStyle{}style specifications for grid lines
    ImageMargins0.the margins to leave around the graphic
    ImagePaddingAllwhat extra padding to allow for labels etc.
    ImageSizeAutomaticthe absolute size at which to render the graphic
    LabelStyle{}style specifications for labels
    LightingAngleNoneeffective angle of the simulated light source
    MaxRecursionAutomaticthe maximum number of recursive subdivisions allowed
    MeshNonehow many mesh lines in each direction to draw
    MeshFunctions{}how to determine the placement of mesh lines
    MeshStyleAutomaticthe style for mesh lines
    MethodAutomaticthe method to use for refining contours
    PerformanceGoal$PerformanceGoalaspects of performance to try to optimize
    PlotInteractivity$PlotInteractivitywhether to allow interactive elements
    PlotLabelNonean overall label for the plot
    PlotLayoutAutomatichow to position contours
    PlotLegendsNonelegends for contour regions
    PlotPointsAutomaticthe initial number of sample points in each direction
    PlotRange{Full,Full,Automatic}the range of f or other values to include
    PlotRangeClippingTruewhether to clip at the plot range
    PlotRangePaddingAutomatichow much to pad the range of values
    PlotRegionAutomaticthe final display region to be filled
    PlotTheme$PlotThemeoverall theme for the plot
    PreserveImageOptionsAutomaticwhether to preserve image options when displaying new versions of the same graphic
    Prolog{}primitives rendered before the main plot
    RegionFunction(True&)how to determine whether a point should be included
    RotateLabelTruewhether to rotate y labels on the frame
    ScalingFunctionsNonehow to scale individual coordinates
    TicksAutomaticaxes ticks
    TicksStyle{}style specifications for axes ticks
    WorkingPrecisionMachinePrecisionthe precision used in internal computations

Examples

open all close all

Basic Examples  (4)

Plot the contours of a function:

Plot an equation:

Plot several equations:

Show a legend for the contours:

Scope  (22)

Sampling  (11)

More points are sampled where the function changes quickly:

The plot range is selected automatically:

Areas where the function becomes nonreal are excluded:

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

Use PlotPoints and MaxRecursion to control adaptive sampling:

Use PlotRange to focus in on areas of interest:

Use Exclusions to remove curves or split the resulting surface:

Use RegionFunction to restrict the surface to a region given by inequalities:

The domain may be specified by a region:

The domain may be specified by a MeshRegion:

Plot over an infinite domain:

Presentation  (11)

Add labels:

Color the surface by height:

Label the contours:

Use a color bar as a legend:

Add a legend for implicit curves:

Use specific colors between contours:

Use different styles for the contours:

Show multiple implicit curves, with styles chosen automatically:

Explicitly set the style for contours:

Create an overlay mesh:

Use a theme with emphasized contour style, simple ticks, and a legend:

Use a theme with simple ticks and legends in a bold color scheme:

Show multiple functions as densities in separate panels:

Use a column instead of a row:

Options  (112)

AspectRatio  (4)

By default, ContourPlot uses the same width and height:

Use numerical value to specify the height to width ratio:

AspectRatioAutomatic determines the ratio from the plot ranges:

AspectRatioFull adjusts the height and width to tightly fit inside other constructs:

Axes  (4)

By default, ContourPlot uses a frame instead of axes:

Use axes instead of a frame:

Use AxesOrigin to specify where the axes intersect:

Turn each axis on individually:

AxesLabel  (4)

No axes labels are drawn by default:

Place a label on the axis:

Specify axes labels:

Use labels based on variables specified in ContourPlot:

AxesOrigin  (2)

The position of the axes is determined automatically:

Specify an explicit origin for the axes:

AxesStyle  (4)

Change the style for the axes:

Specify the style of each axis:

Use different styles for the ticks and the axes:

Use different styles for the labels and the axes:

BoundaryStyle  (5)

Use a black boundary around the edges of the surface:

Use a red boundary around the edges of the surface:

Use a thick red boundary around the edges of the surface:

BoundaryStyle applies to holes cut by RegionFunction:

BoundaryStyle does not apply to cuts made by Exclusions:

Use ExclusionsStyle instead:

ClippingStyle  (4)

Show clipped regions like the rest of the surface:

Leave clipped regions empty:

Use pink to fill the clipped regions:

Use light red where the surface is clipped above and pink below:

ColorFunction  (3)

Color by scaled coordinate:

Named color gradients color in the direction:

Make everything red above a contour at :

ColorFunctionScaling  (1)

Color with blue if contour values are negative, and with red otherwise:

ContourLabels  (2)

Add labels to contour lines:

Label with values in frames:

ContourLines  (1)

ContourLines is superseded by ContourStyle:

Contours  (7)

Use 10 equally spaced contours:

Use automatic contour selection:

Use at most 5 automatically selected contours:

Use specific contours:

Use specific contours with specific styles:

Use a function to generate a set of contours:

Have contours at the 10% and 90% percentile values:

ContourShading  (4)

The automatic shading is darker at low values and lighter at high values:

Use None to only show the contour lines:

Shade between contours using a color function:

Use an explicit list of colors between contours:

ContourStyle  (7)

The default contour style is a partially transparent line:

Use opaque contour lines:

Use None to not show contour lines:

Alternate between red and dashed contour lines:

Use dashed red contour lines:

Use different styles for different equations:

Use dashed red lines for all the equations:

EvaluationMonitor  (2)

Show where ContourPlot samples a function:

Count how many times is evaluated:

Exclusions  (6)

This uses automatic methods to compute exclusions:

Indicate that no exclusions should be computed:

Give exclusions as an equation:

Give multiple exclusion sets:

Use a condition with the exclusion equation:

Use both automatically computed and explicit exclusions:

ExclusionsStyle  (2)

Use a red line to indicate the exclusion set:

Omit excluded points:

ImageSize  (7)

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

Specify the width of the plot:

Specify the height of the plot:

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

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

Setting AspectRatioFull will fill the available space:

Use maximum sizes for the width and height:

Use ImageSizeFull to fill the available space in an object:

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

MaxRecursion  (1)

Refine the surface where it changes quickly:

Mesh  (2)

Show the initial and final sampling meshes:

Use 5 mesh levels in each direction:

MeshFunctions  (2)

Use mesh lines in the and directions:

Use mesh levels corresponding to fixed distances from the origin:

MeshStyle  (2)

Use red mesh lines:

Use red mesh lines in the direction and thick mesh lines in the direction:

PerformanceGoal  (2)

Generate a higher-quality plot:

Emphasize performance, possibly at the cost of quality:

PlotInteractivity  (2)

By default, contours are interactively labeled with tooltips:

Disable the interactive features:

PlotLayout  (2)

Place each function in a separate panel using shared axes:

Use a row instead of a column:

Use multiple columns or rows:

Prefer full columns or rows:

PlotLegends  (8)

Show a legend for the contour regions:

Legends depend on the contours:

Show a label for each contour:

Show a continuous color scale:

PlotLegends automatically matches the color function:

PlotLegends->Automatic labels implicit curves with placeholder values:

Use PlotLegends->"Expressions" to use the actual equations:

Specify a list of labels for the legend:

Use Placed to change the legend position:

Use BarLegend to change the legend appearance:

PlotPoints  (1)

Use more initial points to get smoother contours:

PlotRange  (5)

Automatically compute the range:

Use all points to compute the range:

Show the surface over the full , range:

Automatically compute the , range:

Use an explicit range to emphasize features:

PlotTheme  (1)

Use a theme with simple ticks and a legend:

Change the color function:

RegionFunction  (4)

Plot over an annulus region in and :

Regions do not have to be connected:

Use any logical combination of conditions:

Limit an elliptic curve to the unit disk:

ScalingFunctions  (9)

By default, plots have linear scales in each direction:

Use a log scale in the direction:

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

Use a reciprocal scale in the direction:

Use different scales in the and directions:

Reverse the axis without changing the axis:

Use a scale defined by a function and its inverse:

Positions in Ticks and GridLines are automatically scaled:

PlotRange is automatically scaled:

WorkingPrecision  (2)

Evaluate functions using machine-precision arithmetic:

Evaluate functions using arbitrary-precision arithmetic:

Applications  (6)

Simple shapes, including a line:

Circle:

Ellipse:

Parabola:

Hyperbola:

Plot an elliptic curve:

Plot a sum of 5 sine waves in random directions:

Find the minimum of a function in a region:

Show the steps taken to the minimum:

Have contours at the 10% and 90% percentile values:

An electrostatic potential built from a collection of point charges at positions :

Charge colors, using green for negative and orange for positive:

Two charges, and :

Three charges, , , and :

Properties & Relations  (6)

ContourPlot samples more points where it needs to:

Use ListContourPlot for plotting data:

Use Plot3D and DensityPlot for surfaces and densities:

Use Plot for univariate functions:

Use ParametricPlot for plane parametric curves and regions:

Use ContourPlot3D and RegionPlot3D for implicit surfaces and regions:

Possible Issues  (2)

Automatically avoid jumps that are detected as zero crossings:

Contours for functions where are always poorly detected:

Giving a value in between allows for easy contouring:

Neat Examples  (3)

A polynomial with zeros at the lattice points :

Random contour plots:

The inverse trigonometric functions:

See Also

DensityPlot  ListContourPlot  RegionPlot  Plot3D  ContourPlot3D  SliceContourPlot3D  StreamPlot  StreamDensityPlot  MeshFunctions  ContourLabels  ContourShading  GeoGraphics

Function Repository: SectionContourPlot

Tech Notes

    ▪
  • Density and Contour Plots

Related Guides

    ▪
  • Function Visualization
  • ▪
  • Solvers over Regions
  • ▪
  • Statistical Visualization

History

Introduced in 1988 (1.0) | Updated in 2007 (6.0) ▪ 2008 (7.0) ▪ 2012 (9.0) ▪ 2014 (10.0) ▪ 2016 (11.0) ▪ 2017 (11.1) ▪ 2021 (13.0) ▪ 2025 (14.3)

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

Text

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

CMS

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

APA

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

BibTeX

@misc{reference.wolfram_2025_contourplot, author="Wolfram Research", title="{ContourPlot}", year="2025", howpublished="\url{https://reference.wolfram.com/language/ref/ContourPlot.html}", note=[Accessed: 04-February-2026]}

BibLaTeX

@online{reference.wolfram_2025_contourplot, organization={Wolfram Research}, title={ContourPlot}, year={2025}, url={https://reference.wolfram.com/language/ref/ContourPlot.html}, note=[Accessed: 04-February-2026]}

Top
Introduction for Programmers
Introductory Book
Wolfram Function Repository | Wolfram Data Repository | Wolfram Data Drop | Wolfram Language Products
Top
  • Products
  • Wolfram|One
  • Mathematica
  • Notebook Assistant + LLM Kit
  • Compute Services
  • System Modeler

  • Wolfram|Alpha Notebook Edition
  • Wolfram|Alpha Pro
  • Mobile Apps

  • Wolfram Engine
  • Wolfram Player

  • Volume & Site Licensing
  • Server Deployment Options
  • Consulting
  • Wolfram Consulting
  • Repositories
  • Data Repository
  • Function Repository
  • Community Paclet Repository
  • Neural Net Repository
  • Prompt Repository

  • Wolfram Language Example Repository
  • Notebook Archive
  • Wolfram GitHub
  • Learning
  • Wolfram U
  • Wolfram Language Documentation
  • Webinars & Training
  • Educational Programs

  • Wolfram Language Introduction
  • Fast Introduction for Programmers
  • Fast Introduction for Math Students
  • Books

  • Wolfram Community
  • Wolfram Blog
  • Public Resources
  • Wolfram|Alpha
  • Wolfram Problem Generator
  • Wolfram Challenges

  • Computer-Based Math
  • Computational Thinking
  • Computational Adventures

  • Demonstrations Project
  • Wolfram Data Drop
  • MathWorld
  • Wolfram Science
  • Wolfram Media Publishing
  • Customer Resources
  • Store
  • Product Downloads
  • User Portal
  • Your Account
  • Organization Access

  • Support FAQ
  • Contact Support
  • Company
  • About Wolfram
  • Careers
  • Contact
  • Events
Wolfram Community Wolfram Blog
Legal & Privacy Policy
WolframAlpha.com | WolframCloud.com
© 2026 Wolfram
© 2026 Wolfram | Legal & Privacy Policy |
English