ComplexPlot

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

generates a plot of Arg[f] over the complex rectangle with corners zmin and zmax.

Details and Options

Examples

open allclose all

Basic Examples  (3)

Plot a complex function with zeros at and poles at :

Include a legend showing how the colors vary from to :

Use color shading to highlight features of the function:

Scope  (23)

Sampling  (9)

Sharp colors are obtained by using a raster image:

Make exclusion curves smoother with PlotPoints:

Plot over an infinite domain using the standard format or a shorthand:

The default mesh shows curves of constant Abs[f] and Arg[f]:

Make the mesh smoother with PlotPoints:

It is often convenient to use a logarithm to scale the mesh for Abs[f]:

Specify values for the mesh and control the style:

Modify the mesh to show Re[f] and Im[f]:

Emphasize branch cuts with a color scheme that is discontinuous at the cut:

Presentation  (14)

Use a legend:

Incorporate a mesh:

Turn off exclusions:

Change the color function:

Turn off the default shading:

Use "CyclicLogAbs" to cyclically shade colors to give the appearance of contours of constant Abs[f]:

Use "CyclicArg" to cyclically shade colors to give the appearance of contours of constant Arg[f]:

Use "CyclicLogAbsArg" to cyclically shade colors to give the appearance of contours of constant Abs[f] and constant Arg[f]:

Use "GlobalAbs" to highlight zeros (black) and poles (white):

Use "QuantileAbs" to darken small values of Abs[f] and lighten large values of Abs[f]:

Use "MaxAbs" to lighten large values of Abs[f]:

Use "LocalMaxAbs" to lighten relatively large values of Abs[f]:

Use "CyclicReImLogAbs" to cyclically darken based on Re[f] and Im[f] and lighten cyclically based on Log[Abs[f]]:

Use "ShiftedCyclicLogAbs" to produce clear color wheels around zeros and cyclic contours based on Log[Abs[f]]:

Options  (48)

AspectRatio  (4)

Use Automatic to determine the ratio of the height to width for the plot:

Use numerical value to specify the height to width ratio:

Make the height the same as the width with AspectRatio1:

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

ClippingStyle  (3)

Clipped regions are indicated by gray by default:

Adjust the appearance of a clipped region:

Color clipped regions red at the bottom and blue at the top:

ColorFunction  (14)

Using a noncyclic color function to emphasize branch cuts:

LogGamma and Log[Gamma] have different branch cuts:

Specify a custom ColorFunction:

Color functions depend on eight arguments (Re[z], Im[z], Abs[z], Arg[z], Re[f], Im[f], Abs[f], Arg[f]):

Color functions can be shaded to highlight features of a graph like zeros, poles and saddle points. Use "CyclicLogAbs" to cyclically shade colors to give the appearance of contours of constant Abs[f] at powers of 2:

Use "CyclicArg" to cyclically shade colors to give the appearance of contours of constant Arg[f] at integer multiples of /6:

Use "CyclicLogAbsArg" shading function to combine the effects of "CyclicLogAbs" and "CyclicArg":

Shading can be applied to any ColorFunction:

Use "GlobalAbs" to highlight zeros (black) and poles (white):

Use "QuantileAbs" to lighten the image at relatively large values of Abs[f]:

Use "MaxAbs" to lighten the image at large values of Abs[f]:

Use "LocalMaxAbs" to lighten the image at relatively large values of Abs[f]:

Use "ShiftedCyclicLogAbs" to produce a color wheel around each zero and cyclic shading in Log[Abs[f]]:

Use "CyclicReImLogAbs" to darken the plot cyclically in Re[f] and Im[f] and brighten it cyclically in Log[Abs[f]]:

ColorFunctionScaling  (1)

Re[z], Im[z], Abs[z], Arg[z], Re[f], Im[f], Abs[f] and Arg[f] are scaled by default. Use ColorFunctionScaling to change it:

Exclusions  (4)

Automatically determine exclusions in the modulus of the function:

For cyclic color functions, only exclusions based on Abs[f] are shown, but for acyclic color functions, exclusions based on Arg[f] are also displayed:

Specify exclusions using equations:

Use no exclusions:

ExclusionsStyle  (1)

Specify explicit styling for exclusions:

MaxRecursion  (1)

If a region function is used, MaxRecursion adapts the initial mesh:

Mesh  (3)

Specify a uniform mesh in Abs[f] and Arg[f]:

Specify a different uniform mesh in each direction:

Explicitly specify the mesh values:

MeshFunctions  (2)

Change the MeshFunctions from {Abs,Arg} to {Re,Im}:

{TemplateBox[{Log, paclet:ref/Log}, RefLink, BaseStyle -> {InlineFormula}][TemplateBox[{Abs, paclet:ref/Abs}, RefLink, BaseStyle -> {InlineFormula}]],TemplateBox[{Arg, paclet:ref/Arg}, RefLink, BaseStyle -> {InlineFormula}]} often works well in the presence of poles:

MeshShading  (1)

Alternate color with black and white:

MeshStyle  (2)

Use a white mesh in the Re direction and a black mesh in the Im direction:

Use a thick red mesh in the Abs direction and a thick blue mesh in the Arg direction:

PlotLegends  (2)

The Automatic legend shows the association between color and phase. The grayscale part of the legend indicates how the colors are shaded:

Cyclic shading is also reflected in the legend:

PlotPoints  (2)

Use more points to smooth out a nonrectangular boundary:

Use more points to smooth out a mesh:

PlotRange  (2)

Use PlotRange to control the dimensions of the domain:

Use PlotRange to control the range of values of Abs[f]:

PlotTheme  (1)

Modify the appearance with a theme:

RegionFunction  (3)

Use RegionFunction to adapt the shape of the region:

Use RegionFunction to remove zeros and poles:

Shape the region based on Arg[z] or Arg[f]:

WorkingPrecision  (2)

Evaluate functions using machine-precision arithmetic:

Evaluate functions using arbitrary-precision arithmetic:

Applications  (28)

Basic Applications  (7)

Make a phase portrait of a complex function . Points in the complex plane are colored (by default) by their argument, and that information is recorded in an optional legend.

The color function proceeds counterclockwise around zeros of a function:

At a multiple zero, the colors cycle around the zero multiple times:

At a pole, the colors cycle around the point in the reverse direction:

At an essential singularity, the colors cycle infinitely often:

At a saddle point z0 of , and . Use "CyclicLogAbs" to highlight a saddle point that occurs at a power of 2:

Or use a mesh to highlight a saddle point:

The following plot shows multiple features of the Joukowski transformation. There are simple zeros at since the colors converge at those points and cycle around the points from blue to green to red in the counterclockwise direction, consistent with the legend. Similarly, there is a simple pole at where the colors converge but cycle clockwise. There is also a saddle point at and the branch cuts occur at the red-blue boundary:

The following plot shows a function with simple zeros at , a double pole at and a saddle point at :

Other Applications  (21)

General  (8)

Plot complex functions of a complex variable:

Visualize features of a complex function of a complex variable. The following plot indicates a triple zero at , simple zeros , a simple pole at , a double pole at and an essential singularity at :

Examine roots of unity:

See the five simple real roots of in [-1,1]:

Plots of partial sums of the geometric series suggest that the infinite series diverges for TemplateBox[{z}, Abs]<=1.

Visualize Möbius transformations:

Plot IIR filters:

Plot a complex function along with its Pólya field:

Special functions  (5)

Plot special functions:

A visual reminder that Log[z2]2Log[z] for Re[z]>0, but not for Re[z]<0:

Visually compare a plot of a complex function with its asymptotic approximations:

Observe the Hurwitz zeta function TemplateBox[{s, a}, HurwitzZeta] with over finite and infinite domains:

Observe the digamma function over finite and infinite domains:

Analytic functions  (3)

A conformal map preserves angles:

Use a mesh to illustrate a conformal map and the breakdown at where the derivative vanishes:

Compare the enhanced phase portraits of analytic and nonanalytic functions:

Physics  (4)

Plot the field lines (black) and the potential lines (white) for two point charges of equal but opposite charge at :

Plot the complex potential and streamlines for an ideal fluid flow exterior to a corner:

Plot the complex potential and streamlines for an ideal fluid flow around a cylinder:

Plot the complex potential and streamlines for ideal fluid flow around an elliptical cylinder with fluid speed and angle of attack :

Transforms  (1)

Plot Fourier and Laplace transforms:

Properties & Relations  (8)

ComplexPlot is a special case of DensityPlot:

Use ComplexPlot3D to use the axis for the magnitude:

Use ComplexArrayPlot for arrays of complex numbers:

The appearance may be different from ComplexPlot depending on how the data is arranged:

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

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

ComplexContourPlot plots curves over the complexes:

ComplexRegionPlot plots regions over the complexes:

ComplexStreamPlot and ComplexVectorPlot treat complex numbers as directions:

Possible Issues  (2)

ComplexPlot does not do adaptive sampling:

Meshes may bunch up near a pole or singular point with MeshAutomatic:

Wolfram Research (2019), ComplexPlot, Wolfram Language function, https://reference.wolfram.com/language/ref/ComplexPlot.html (updated 2021).

Text

Wolfram Research (2019), ComplexPlot, Wolfram Language function, https://reference.wolfram.com/language/ref/ComplexPlot.html (updated 2021).

CMS

Wolfram Language. 2019. "ComplexPlot." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2021. https://reference.wolfram.com/language/ref/ComplexPlot.html.

APA

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

BibTeX

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

BibLaTeX

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