ComplexPlot [f,{z,zmin,zmax}]
generates a plot of Arg [f] over the complex rectangle with corners zmin and zmax.
ComplexPlot
ComplexPlot [f,{z,zmin,zmax}]
generates a plot of Arg [f] over the complex rectangle with corners zmin and zmax.
Details and Options
- ComplexPlot uses a cyclic color function over Arg [f] to identify features such as zeros, poles and essential singularities. The color function goes from to counterclockwise around zeros, clockwise around poles and infinite cycles near essential singularities.
- ComplexPlot [pred,{z,n}] is equivalent to ComplexPlot [pred,{z,-n-nI,n+nI}].
- ComplexPlot treats the variable z as local, effectively using Block .
- ComplexPlot has attribute HoldAll and evaluates f only after assigning specific numerical values to z. In some cases, it may be more efficient to use Evaluate to evaluate f symbolically first.
- No color is applied in any regions where the corresponding f evaluates to None .
- ComplexPlot has the same options as Graphics , with the following additions and changes: [List of all options]
-
- ColorFunction->{cfunc,sfunc} uses cfunc to generate the base color and sfunc to adjust the color to highlight features.
- Possible named settings for sfunc are:
-
"MaxAbs" light shading of large values of Abs [f]"LocalMaxAbs" light shading of an upper quantile of Abs [f]"GlobalAbs" dark to light shading of small to large values of Abs [f]"QuantileAbs" dark to light shading based on quantiles of Abs [f]"CyclicArg" cyclic dark to light shading of Arg [f]None no shading
- The arguments supplied to functions in MeshFunctions and RegionFunction are , . Functions in ColorFunction are by default supplied with scaled versions of Re [z], Im [z], Abs [z], Arg [z], Re [f], Im [f], Abs [f], Arg [f].
-
ImageMargins 0. the margins to leave around the graphicPreserveImageOptions Automatic whether to preserve image options when displaying new versions of the same graphic
List of all options
Examples
open all close allBasic 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 (105)
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 AspectRatio 1:
AspectRatio Full adjusts the height and width to tightly fit inside other constructs:
Axes (3)
By default, ComplexPlot uses a frame instead of axes:
Use Axes True to draw all axes:
Turn each axis on individually:
AxesLabel (3)
No axes labels are drawn 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:
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)
Exclusions (4)
ExclusionsStyle (1)
Specify explicit styling for exclusions:
Frame (4)
ComplexPlot uses a frame by default:
Use Frame False 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 frame of a plot:
Frame labels are placed on the bottom and left frame edges by default:
Place labels on each of the edges in the frame:
Use a customized style for both labels and frame tick labels:
FrameStyle (2)
Specify the style of the frame:
Specify the style for each frame edge:
FrameTicks (8)
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 specific 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:
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 different styles for the different frame edges:
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)
If a region function is used, MaxRecursion adapts the initial mesh:
Mesh (3)
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)
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)
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:
ScalingFunctions (4)
Ticks (9)
Ticks are placed automatically in each plot:
Use Ticks None to draw axes without any tick marks:
Use ticks on the axis, but not the axis:
Place tick marks at specific positions:
Draw tick marks at the specified positions with the specified labels:
Use specific ticks on one axis and automatic ticks on the other:
Specify the lengths for ticks as a fraction on 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:
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 Mesh Automatic :
See Also
ComplexPlot3D AbsArgPlot ReImPlot ComplexListPlot AbsArg ReIm DensityPlot ParametricPlot
Function Repository: ComplexBubblePlot InsideOutsidePlot RiemannSphereComplexPlot
Related Guides
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_2025_complexplot, author="Wolfram Research", title="{ComplexPlot}", year="2021", howpublished="\url{https://reference.wolfram.com/language/ref/ComplexPlot.html}", note=[Accessed: 05-December-2025]}
BibLaTeX
@online{reference.wolfram_2025_complexplot, organization={Wolfram Research}, title={ComplexPlot}, year={2021}, url={https://reference.wolfram.com/language/ref/ComplexPlot.html}, note=[Accessed: 05-December-2025]}