WOLFRAM

ComplexContourPlot[f,{z,zmin,zmax}]

generates a filled contour plot of f as a function of z.

ComplexContourPlot[{f1,f2,},{z,zmin,zmax}]

generates contour lines for f1, f2, .

ComplexContourPlot[f==g,{z,zmin,zmax}]

plots contour lines for which f=g.

ComplexContourPlot[{f1==g1,f2==g2,},{z,zmin,zmax}]

plots contour lines for each of f1g1, f2=g2, .

Details and Options

Examples

open allclose all

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

Plot a contour map of a real function of a complex variable:

Out[1]=1

Plot an equality over the complex plane:

Out[1]=1

Plot multiple functions:

Out[1]=1

Plot several equations:

Out[1]=1

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

Sampling  (6)

More points are sampled where the function changes quickly:

Out[1]=1

The white regions indicate where the function has been clipped. The plot range is selected automatically:

Out[1]=1

Use PlotRange to focus in on areas of interest:

Out[1]=1

Use PlotPoints and MaxRecursion to control adaptive sampling:

Out[1]=1

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

Out[1]=1

Use Exclusions to control whether and where to cut for discontinuities:

Out[1]=1

Labeling and Legending  (6)

Add labels for the frame and the overall plot:

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

Label the contours:

Out[1]=1

Use a color bar as a legend:

Out[1]=1

For multiple functions, use a line legend:

Out[1]=1

For multiple functions, use a line legend with placeholders:

Out[1]=1

Add a legend for implicit curves:

Out[1]=1

Presentation  (6)

Color the surface by height:

Out[1]=1

Use specific colors between contours:

Out[1]=1

Use different styles for the contours:

Out[1]=1

Explicitly set the style for contours:

Out[1]=1

Create an overlay mesh:

Out[1]=1

Use a plot theme:

Out[1]=1

Options  (138)Common values & functionality for each option

AspectRatio  (4)

By default, AspectRatio uses the same width and height:

Out[1]=1

Use numerical value to specify the height to width ratio:

Out[1]=1

AspectRatioAutomatic determines the ratio from the plot ranges:

Out[1]=1

AspectRatioFull adjusts the height and width to tightly fit inside other constructs:

Out[2]=2

Axes  (4)

By default, ComplexContourPlot uses a frame instead of axes:

Out[1]=1

Use axes instead of a frame:

Out[1]=1

Use AxesOrigin to specify where the axes intersect:

Out[1]=1

Turn each axis on individually:

Out[1]=1

AxesLabel  (3)

Axes are not labeled by default:

Out[1]=1

Place a label on the axis:

Out[1]=1

Specify axes labels:

Out[1]=1

AxesOrigin  (2)

The position of the axes is determined automatically:

Out[1]=1

Specify an explicit origin for the axes:

Out[1]=1

AxesStyle  (4)

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[1]=1

BoundaryStyle  (3)

Use a red boundary around the edges of the surface:

Out[1]=1

BoundaryStyle applies to holes cut by RegionFunction, but it does not apply to cuts made by Exclusions:

Out[1]=1

Use ExclusionsStyle instead:

Out[1]=1

ClippingStyle  (4)

Show clipped regions like the rest of the surface:

Out[1]=1

Leave clipped regions empty:

Out[1]=1

Use pink to fill the clipped regions:

Out[1]=1

Use green where the surface is clipped above and pink below:

Out[1]=1

ColorFunction  (3)

Color by scaled values of the function:

Out[1]=1

Use a named color gradient:

Out[1]=1

Make the plot red above a contour at :

Out[1]=1

ColorFunctionScaling  (1)

The ColorFunction can use scaled or unscaled coordinates:

Out[1]=1

ContourLabels  (2)

Add labels to contour lines:

Out[1]=1

Label with values in frames:

Out[1]=1

Contours  (9)

Use 10 equally spaced contours:

Out[1]=1

Use automatic contour selection:

Out[1]=1

Use at most 5 automatically selected contours:

Out[1]=1

Use specific contours:

Out[1]=1

Use specific contours with specific styles:

Out[1]=1

Use a function to generate a set of contours:

Out[1]=1

Have contours at the 40% and 80% percentile values:

Out[1]=1

The number of contours can be controlled separately if multiple functions are specified:

Out[1]=1

Specific contours can be specified for multiple functions:

Out[1]=1

ContourShading  (5)

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

Out[1]=1

Use None to only show the contour lines:

Out[1]=1

Shading is automatically suppressed if a list of functions is specified:

Out[1]=1

Shade between contours using a color function:

Out[1]=1

Use an explicit list of colors between contours:

Out[1]=1

ContourStyle  (7)

The default contour style is a partially transparent line:

Out[1]=1

Use dashed, opaque contour lines:

Out[1]=1

Use None to suppress contour lines:

Out[1]=1

ContourStyleNone is equivalent to ContourLinesFalse:

Out[2]=2

Alternate between red and dashed contour lines:

Out[1]=1

Use different styles for different functions:

Out[1]=1

Use different styles for different equations:

Out[1]=1

Use the same style for all of the equations:

Out[1]=1

EvaluationMonitor  (2)

Show where ContourPlot samples a function:

Out[1]=1

Count how many times Arg[ArcTan[z]] is evaluated:

Out[1]=1

Exclusions  (6)

Exclusions are automatically displayed:

Out[1]=1

Indicate that no exclusions should be computed:

Out[1]=1

Give exclusions as an equation:

Out[1]=1

Give multiple exclusion sets:

Out[1]=1

Use conditions with the exclusion equations:

Out[1]=1

Use both automatically computed and explicit exclusions:

Out[1]=1

ExclusionsStyle  (2)

Use a red line to indicate the exclusion set:

Out[1]=1

Omit excluded points:

Out[1]=1

Frame  (4)

ComplexContourPlot uses a frame by default:

Out[1]=1

Use FrameFalse to turn off the frame:

Out[1]=1

Draw a frame on the left and right edges:

Out[1]=1

Draw a frame on the left and bottom edges:

Out[1]=1

FrameLabel  (4)

Place a label along the bottom edge of the frame:

Out[1]=1

Frame labels are placed on the bottom and left frame edges by default:

Out[1]=1

Place labels on each of the edges in the frame:

Out[1]=1

Specify a style for both labels and frame tick labels:

Out[1]=1

FrameStyle  (2)

Specify a style for the frame:

Out[1]=1

Specify a style for each frame edge:

Out[1]=1

FrameTicks  (9)

Frame ticks are placed automatically by default:

Out[1]=1

Use a frame with no ticks:

Out[1]=1

Use frame ticks on the bottom edge:

Out[1]=1

By default, the top and right edges have tick marks but no tick labels:

Out[1]=1

Use All to include tick labels on all edges:

Out[2]=2

Place tick marks at the specified positions:

Out[1]=1

Draw frame tick marks at the specified positions with specific labels:

Out[1]=1

Specify the lengths for tick marks as a fraction of the graphics size:

Out[1]=1

Use different sizes in the positive and negative directions for each tick mark:

Out[2]=2

Specify a style for each frame tick:

Out[1]=1

Construct a function that places frame ticks at the midpoint and extremes of the frame edge:

Out[2]=2

FrameTicksStyle  (3)

By default, the frame ticks and frame tick labels use the same styles as the frame:

Out[1]=1

Specify an overall style for the ticks, including the labels:

Out[1]=1

Use a different style for each frame edge:

Out[1]=1

ImageSize  (7)

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

Out[1]=1

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 maximum sizes for the width and height:

Out[1]=1

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

MaxRecursion  (1)

Refine the contours where the function changes quickly:

Out[1]=1

Mesh  (2)

Show the initial and final sampling meshes:

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

Use 5 mesh levels in each direction:

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

MeshFunctions  (2)

Use mesh lines in the Re[z] and Im[z] directions:

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

Use mesh levels in the Abs[z] and Arg[z] directions:

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

MeshStyle  (2)

Use red mesh lines:

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

Use red mesh lines in the Re[z] direction and thick mesh lines in the Im[z] direction:

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

PerformanceGoal  (2)

Generate a higher-quality plot:

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

Emphasize performance, possibly at the cost of quality:

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

PlotLegends  (12)

Show a legend for the contour regions:

Out[1]=1

Legends depend on the contours:

Out[1]=1

Show a label for each contour:

Out[1]=1

Show a continuous color scale:

Out[1]=1

PlotLegends automatically matches the color function:

Out[1]=1

PlotLegendsAutomatic labels contours with placeholder values:

Out[1]=1

PlotLegends"Expressions" labels contours with the corresponding functions:

Out[1]=1

PlotLegendsAutomatic labels implicit curves with placeholder values:

Out[1]=1

PlotLegends"Expressions" uses the actual equations:

Out[1]=1

Specify a list of labels for the legend:

Out[1]=1

Use Placed to change the legend position:

Out[1]=1

Use BarLegend to change the legend appearance:

Out[1]=1

PlotPoints  (1)

Use more initial points to get smoother contours:

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

PlotRange  (3)

Automatically compute the vertical range:

Out[1]=1

Use all points to compute the range:

Out[1]=1

Use an explicit vertical range to emphasize features:

Out[1]=1

PlotTheme  (3)

Use a theme:

Out[1]=1

Change the color function:

Out[1]=1

Use a theme for multiple functions:

Out[1]=1

RegionFunction  (2)

Plot over an annulus:

Out[1]=1

Base the region on f:

Out[1]=1

ScalingFunctions  (5)

By default, plots have linear scales in each direction:

Out[1]=1

Use a log scale in the both the real and imaginary directions:

Out[1]=1

Use a reciprocal scale in the imaginary direction:

Out[1]=1

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

Out[1]=1

Use a scale defined by a function and its inverse:

Out[1]=1

Ticks  (9)

Ticks are placed automatically on each axis:

Out[1]=1

Use TicksNone to draw axes without any tick marks:

Out[1]=1

Use ticks on the axis, but not the axis:

Out[1]=1

Place tick marks at the specified positions:

Out[1]=1

Draw tick marks at the specified positions with specified labels:

Out[1]=1

Use specific ticks on one axis and automatic ticks on the other:

Out[1]=1

Specify the lengths for ticks as a fraction of graphics size:

Out[1]=1

Use different sizes in the positive and negative directions for each tick:

Out[2]=2

Specify a style for each tick:

Out[1]=1

Construct a function that places ticks at the midpoint and extremes of the axis:

Out[2]=2

TicksStyle  (4)

By default, the ticks and tick labels use the same styles as the axis:

Out[1]=1

Specify an overall ticks style, including the tick labels:

Out[1]=1

Specify ticks style for each of the axes:

Out[1]=1

Use a different style for the tick labels and tick marks:

Out[1]=1

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

Basic Applications  (7)

For a given complex function, plot curves of the constant real part:

Out[1]=1

Show curves of the constant real and constant imaginary parts:

Out[1]=1

Show curves of the constant modulus and constant argument:

Out[1]=1

Curves of constant Abs[z] are concentric circles:

Out[1]=1

Setting Abs[z]==1 gives a specific circle:

Out[1]=1

Curves of constant Arg[z] are (half) lines that begin at the origin:

Out[1]=1

Setting Arg[z]== produces a specific (half) line:

Out[1]=1

Conformal Maps  (6)

Define an affine function:

The real and imaginary parts of are lines with slope 1 and , respectively:

Out[2]=2

Compare lines of constant real and constant imaginary parts in the and planes:

Out[3]=3

The reciprocal function maps circles centered at the origin to circles centered at the origin and lines through the origin to lines through the origin, but Abs[w] grows larger near :

Out[2]=2

Linear fractional transformations map circles and lines to circles and lines:

Out[2]=2
Out[3]=3

Visualize more complicated mappings:

Out[2]=2
Out[3]=3

For a conformal map , curves that are orthogonal at their intersections in the plane are also orthogonal at the corresponding intersections in the plane:

Compute the real and imaginary parts of :

Out[2]=2

Verify that the gradients of the real and imaginary parts of are orthogonal by verifying that their dot product is zero:

Out[3]=3

Visually verify that the contours are orthogonal at points of intersection:

Out[4]=4

Non-conformal maps do not preserve angles:

Compute the real and imaginary parts of :

Out[6]=6

Verify that the gradients of the real and imaginary parts of are not orthogonal by verifying that their dot product is not zero:

Out[7]=7

Visually verify that the contours are not orthogonal at points of intersection:

Out[8]=8

Use InverseFunction to display conformal maps:

Out[2]=2

Function Growth  (1)

The real and imaginary parts of grow exponentially in the direction:

Out[1]=1

Observe rapid growth in both plots where the contours are closer together:

Out[2]=2

The modulus of also grows exponentially in the vertical direction, but the argument does not:

Out[3]=3

Note that the contours are closer together on the left for large Abs[y], but not on the right:

Out[4]=4

Increasing the number of contours emphasizes the regions where Abs[Sin[z]] grows more rapidly:

Out[5]=5

Filter and Transfer Functions  (4)

The differential equation for a certain harmonic oscillator with viscous damping is y''+γ y'+y=f(t), where γ is the damping coefficient and f(t) is an applied force. The transfer function is the reciprocal of the Laplace transform of y:

Out[1]=1

Define a transfer function for an underdamped (γ=0.2) harmonic oscillator:

Out[2]=2

Use a Bode plot to see the gain (Abs) and phase (Arg in degrees) along the imaginary axis:

Out[3]=3

Use ComplexContourPlot to plot the transfer function over a subset of the -plane and note the rapid change of both sets of contours near :

Out[4]=4

A second-order Butterworth filter model with cutoff frequency at :

Out[1]=1

Find the poles of the filter:

Out[2]=2

Plot the magnitude of the filter and observe that the poles of the filter lie on the unit circle at equally spaced angles of :

Out[3]=3

The contour that coincides with the imaginary axis shows that is an all-pass filter that does not change the magnitude of the signal for any frequency, but it does change the phase:

Out[1]=1

An algebraic analysis confirms that the gain is 1 for all values of :

Out[2]=2

Show a root-locus diagram with a plot of the magnitude of the transfer function:

Out[1]=1

Physics Applications  (3)

Define a complex function that is analytic for all nonzero in the complex plane:

Verify that the real and imaginary parts of are harmonic:

Out[2]=2
Out[3]=3

The functions and are the velocity potential and stream function for an ideal fluid flow. Plot the equipotential curves and the streamlines for ideal fluid flow over a cylinder:

Out[4]=4

Graph the streamlines for a complex potential for ideal fluid flow for flow in a channel through a slit at the origin:

Out[1]=1

Recreate a famous image (Fig. XII) from A Treatise on Electricity and Magnetism by James Clerk, 1873. Maxwell showing equipotential surfaces for two semi-infinite planes that form a capacitor:

This requires different branches of the inverse of :

Out[2]=2

Plot the upper part:

Out[3]=3

Plot the middle part, taking care to match the contours in the upper part:

Out[4]=4

Plot the lower part:

Out[5]=5

Show all three together to recreate Maxwell's image:

Out[6]=6

Other Applications  (2)

Show iterations of Newton's method:

Plot the steps:

Plot the contour lines for the function:

Show them together:

Out[5]=5

Plot a family of lemniscates:

Out[1]=1

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

ComplexContourPlot is a special case of ContourPlot:

Out[1]=1

ComplexContourPlot automatically suppresses shading for two or more functions:

Out[1]=1

ComplexRegionPlot plots regions over the complexes:

Out[1]=1

ComplexPlot shows the argument and magnitude of a function using color:

Out[1]=1

Use ComplexPlot3D to use the axis for the magnitude:

Out[1]=1

Use ComplexArrayPlot for arrays of complex numbers:

Out[1]=1

Use ReImPlot and AbsArgPlot to plot complex values over the real numbers:

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

Use ComplexListPlot to show the location of complex numbers in the plane:

Out[1]=1

ComplexStreamPlot and ComplexVectorPlot treat complex numbers as directions:

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

Possible Issues  (1)Common pitfalls and unexpected behavior

Since Arg[f] cannot exceed , ComplexContourPlot will usually not render branch cuts:

Out[1]=1

Neat Examples  (1)Surprising or curious use cases

Plot the region where Abs[f]==Arg[f]:

Out[1]=1
Wolfram Research (2020), ComplexContourPlot, Wolfram Language function, https://reference.wolfram.com/language/ref/ComplexContourPlot.html.
Wolfram Research (2020), ComplexContourPlot, Wolfram Language function, https://reference.wolfram.com/language/ref/ComplexContourPlot.html.

Text

Wolfram Research (2020), ComplexContourPlot, Wolfram Language function, https://reference.wolfram.com/language/ref/ComplexContourPlot.html.

Wolfram Research (2020), ComplexContourPlot, Wolfram Language function, https://reference.wolfram.com/language/ref/ComplexContourPlot.html.

CMS

Wolfram Language. 2020. "ComplexContourPlot." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/ComplexContourPlot.html.

Wolfram Language. 2020. "ComplexContourPlot." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/ComplexContourPlot.html.

APA

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

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

BibTeX

@misc{reference.wolfram_2025_complexcontourplot, author="Wolfram Research", title="{ComplexContourPlot}", year="2020", howpublished="\url{https://reference.wolfram.com/language/ref/ComplexContourPlot.html}", note=[Accessed: 19-June-2025 ]}

@misc{reference.wolfram_2025_complexcontourplot, author="Wolfram Research", title="{ComplexContourPlot}", year="2020", howpublished="\url{https://reference.wolfram.com/language/ref/ComplexContourPlot.html}", note=[Accessed: 19-June-2025 ]}

BibLaTeX

@online{reference.wolfram_2025_complexcontourplot, organization={Wolfram Research}, title={ComplexContourPlot}, year={2020}, url={https://reference.wolfram.com/language/ref/ComplexContourPlot.html}, note=[Accessed: 19-June-2025 ]}

@online{reference.wolfram_2025_complexcontourplot, organization={Wolfram Research}, title={ComplexContourPlot}, year={2020}, url={https://reference.wolfram.com/language/ref/ComplexContourPlot.html}, note=[Accessed: 19-June-2025 ]}