ComplexPlot3D

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

generates a 3D plot of Abs[f] colored by 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  (22)

Sampling  (8)

Sharp colors are generated by using a raster:

Plot over an infinite domain:

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

In the presence of poles, it is often convenient to use a logarithm to scale Abs[f]:

In the presence of poles, it may also be 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 specific values for 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:

Use a scaling function:

Change the ColorFunction:

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

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

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

Use the "GlobalAbs" shading function 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  (62)

BoundaryStyle  (3)

Use a black boundary around the edges of the surface:

Use a thick, black boundary around the edges of the surface:

Note that BoundaryStyle applies to holes cut by RegionFunction, but not to holes cut by Exclusions:

BoxRatios  (2)

Automatic uses the natural scale from PlotRange:

Use BoxRatios to specify the relative dimensions of the bounding box for the plot:

ClippingStyle  (2)

Clipped regions use different surface colors by default:

Do not draw clipped regions:

ColorFunction  (14)

Use 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 "CylicLogAbsArg" 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:

ExclusionStyle  (1)

Style exclusions with a thick, dashed, black line and the surface in between transparent:

Filling  (2)

Fill to the bottom:

Filling occurs along the region cut by RegionFunction:

FillingStyle  (3)

Fill to the bottom with a specified style:

Fill to the plane Abs[f]=1 with red below and blue above:

Fill to the plane Abs[f]=1 from below only:

MaxRecursion  (2)

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

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

Mesh  (2)

Specify a uniform mesh for Abs and Arg:

Specify values for the mesh:

MeshFunctions  (2)

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

{TemplateBox[{Log, paclet:ref/Log}, RefLink, BaseStyle -> {InlineFormula}][TemplateBox[{Abs, paclet:ref/Abs}, RefLink, BaseStyle -> {InlineFormula}][f]],TemplateBox[{Arg, paclet:ref/Arg}, RefLink, BaseStyle -> {InlineFormula}][f]} often works well with poles:

MeshShading  (2)

Alternate color with black and white:

Shade the mesh to highlight Abs[f]:

MeshStyle  (2)

Use a white mesh in the Abs[f] direction and a black mesh in the Arg[f] direction:

Use a red mesh in the Abs[f] direction and a blue mesh in the Arg[f] direction:

NormalsFunction  (2)

Normals are automatically calculated. Use None to get flat shading for all of the polygons:

Make the effective normals to the surface vary locally:

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 or an exclusion:

Use more points to smooth out a mesh:

PlotRange  (3)

Automatically compute the range for Abs[f]:

Specify the range for Abs[f]:

Specify the dimensions of the domain of f and range of Abs[f]:

PlotStyle  (1)

PlotStyle can be used to modify the colors:

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]:

ScalingFunctions  (4)

Use a log scale in the direction of Abs[f]:

Effectively swap zeros and poles by using a reciprocal scale in the direction of Abs[f]:

Use a combination of scaling functions. Reverse Re[f], leave Im[f] intact and reciprocate Abs[f]:

Use logarithmic scaling in all three directions:

WorkingPrecision  (2)

Evaluate functions using machine-precision arithmetic:

Evaluate functions using arbitrary-precision arithmetic:

Applications  (26)

Basic Applications  (10)

For a complex function , plot Abs[f] over the complex plane. Points on the surface are colored (by default) by Arg[f], and that information is recorded in an optional legend.

When viewed from above, 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:

Use PlotRange to control the height of the graph near a pole:

Using a logarithmic scaling function for functions with poles may produce a more visually appealing plot:

Using ScalingFunctions"Reciprocal" effectively swaps zeros and poles in terms of height, but the colors remain unchanged:

At a saddle point 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 , which is evident from the height of the graph and the fact that 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 height is infinite and 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  (16)

Classic  (2)

Reproduce the famous complex plot by Janhke and Emde (Tables of Functions with Formulas and Curves, 4th ed., Dover, 1945):

Produce a 3D version of the famous complex plot by Janhke and Emde (Tables of Functions with Formulas and Curves, 4th ed., Dover, 1945):

General  (6)

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 and a double pole at :

Examine roots of unity:

See the five 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:

Special functions  (2)

Plot special functions:

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

Analytic functions  (2)

A conformal map preserves angles:

Compare the enhanced phase portraits of analytic and nonanalytic functions:

Physics  (2)

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

Plot a complex fluid velocity potential with corresponding streamlines for flow external to a corner:

Transforms  (2)

Plot Fourier transforms:

Plot Laplace transforms:

Properties & Relations  (8)

ComplexPlot3D is a special case of Plot3D:

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

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:

ComplexContourPlot plots curves over the complexes:

ComplexRegionPlot plots regions over the complexes:

ComplexStreamPlot and ComplexVectorPlot treat complex numbers as directions:

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

Text

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

CMS

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

APA

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

BibTeX

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

BibLaTeX

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