ComplexContourPlot

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)

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

Plot an equality over the complex plane:

Plot multiple functions:

Plot several equations:

Scope  (18)

Sampling  (6)

More points are sampled where the function changes quickly:

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

Use PlotRange to focus in on areas of interest:

Use PlotPoints and MaxRecursion to control adaptive sampling:

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

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

Labeling and Legending  (6)

Add labels for the frame and the overall plot:

Label the contours:

Use a color bar as a legend:

For multiple functions, use a line legend:

For multiple functions, use a line legend with placeholders:

Add a legend for implicit curves:

Presentation  (6)

Color the surface by height:

Use specific colors between contours:

Use different styles for the contours:

Explicitly set the style for contours:

Create an overlay mesh:

Use a plot theme:

Options  (138)

AspectRatio  (4)

By default, AspectRatio uses the same width and height:

Use numerical value to specify the height to width ratio:

AspectRatioAutomatic determines the ratio from the plot ranges:

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

Axes  (4)

By default, ComplexContourPlot 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  (3)

Axes are not labeled by default:

Place a label on the axis:

Specify axes labels:

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  (3)

Use a red boundary around the edges of the surface:

BoundaryStyle applies to holes cut by RegionFunction, but it 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 green where the surface is clipped above and pink below:

ColorFunction  (3)

Color by scaled values of the function:

Use a named color gradient:

Make the plot red above a contour at :

ColorFunctionScaling  (1)

The ColorFunction can use scaled or unscaled coordinates:

ContourLabels  (2)

Add labels to contour lines:

Label with values in frames:

Contours  (9)

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 40% and 80% percentile values:

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

Specific contours can be specified for multiple functions:

ContourShading  (5)

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

Use None to only show the contour lines:

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

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 dashed, black contour lines:

Use None to suppress contour lines:

ContourStyleNone is equivalent to ContourLinesFalse:

Alternate between red and dashed contour lines:

Use different styles for different functions:

Use different styles for different equations:

Use the same style for all of the equations:

EvaluationMonitor  (2)

Show where ContourPlot samples a function:

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

Exclusions  (6)

Exclusions are automatically displayed:

Indicate that no exclusions should be computed:

Give exclusions as an equation:

Give multiple exclusion sets:

Use conditions with the exclusion equations:

Use both automatically computed and explicit exclusions:

ExclusionsStyle  (2)

Use a red line to indicate the exclusion set:

Omit excluded points:

Frame  (4)

ComplexContourPlot uses a frame by default:

Use FrameFalse to turn off the frame:

Draw a frame on the left and right edges:

Draw a frame on the left and bottom edges:

FrameLabel  (4)

Place a label along the bottom edge of the frame:

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

Place labels on each of the edges in the frame:

Specify a style for both labels and frame tick labels:

FrameStyle  (2)

Specify a style for the frame:

Specify a style for each frame edge:

FrameTicks  (9)

Frame ticks are placed automatically by default:

Use a frame with no ticks:

Use frame ticks on the bottom edge:

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

Use All to include tick labels on all edges:

Place tick marks at the specified positions:

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

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

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

Specify a style for each frame tick:

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

FrameTicksStyle  (3)

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

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

Use a different style for each frame edge:

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 AspectRatioFull will fill the available space:

Use maximum sizes for the width and height:

Use ImageSizeFull to fill the available space in an object:

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

MaxRecursion  (1)

Refine the contours where the function 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 Re[z] and Im[z] directions:

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

MeshStyle  (2)

Use red mesh lines:

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

PerformanceGoal  (2)

Generate a higher-quality plot:

Emphasize performance, possibly at the cost of quality:

PlotLegends  (12)

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:

PlotLegendsAutomatic labels contours with placeholder values:

PlotLegends"Expressions" labels contours with the corresponding functions:

PlotLegendsAutomatic labels implicit curves with placeholder values:

PlotLegends"Expressions" uses 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  (3)

Automatically compute the vertical range:

Use all points to compute the range:

Use an explicit vertical range to emphasize features:

PlotTheme  (3)

Use a theme:

Change the color function:

Use a theme for multiple functions:

RegionFunction  (2)

Plot over an annulus:

Base the region on f:

ScalingFunctions  (5)

By default, plots have linear scales in each direction:

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

Use a reciprocal scale in the imaginary direction:

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

Use a scale defined by a function and its inverse:

Ticks  (9)

Ticks are placed automatically on each axis:

Use TicksNone to draw axes without any tick marks:

Use ticks on the axis, but not the axis:

Place tick marks at the specified positions:

Draw tick marks at the specified positions with specified labels:

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

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

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

Specify a style for each tick:

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

TicksStyle  (4)

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

Specify an overall ticks style, including the tick labels:

Specify ticks style for each of the axes:

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

Applications  (23)

Basic Applications  (7)

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

Show curves of the constant real and constant imaginary parts:

Show curves of the constant modulus and constant argument:

Curves of constant Abs[z] are concentric circles:

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

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

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

Conformal Maps  (6)

Define an affine function:

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

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

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 :

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

Visualize more complicated mappings:

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 :

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

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

Non-conformal maps do not preserve angles:

Compute the real and imaginary parts of :

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

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

Use InverseFunction to display conformal maps:

Function Growth  (1)

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

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

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

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

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

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:

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

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

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

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

Find the poles of the filter:

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

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:

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

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

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:

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:

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

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 :

Plot the upper part:

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

Plot the lower part:

Show all three together to recreate Maxwell's image:

Other Applications  (2)

Show iterations of Newton's method:

Plot the steps:

Plot the contour lines for the function:

Show them together:

Plot a family of lemniscates:

Properties & Relations  (9)

ComplexContourPlot is a special case of ContourPlot:

ComplexContourPlot automatically suppresses shading for two or more functions:

ComplexRegionPlot plots regions over the complexes:

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

Use ComplexPlot3D to use the axis for the magnitude:

Use ComplexArrayPlot for arrays of complex numbers:

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

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

ComplexStreamPlot and ComplexVectorPlot treat complex numbers as directions:

Possible Issues  (1)

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

Neat Examples  (1)

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

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.

CMS

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

BibTeX

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

BibLaTeX

@online{reference.wolfram_2024_complexcontourplot, organization={Wolfram Research}, title={ComplexContourPlot}, year={2020}, url={https://reference.wolfram.com/language/ref/ComplexContourPlot.html}, note=[Accessed: 21-November-2024 ]}