File Exchange

image thumbnail

Phase Plots of Complex Functions

version (18 KB) by Elias Wegert
Routines for creating color representations of complex functions (phase plots)


Updated 16 Jan 2014

View License

The ZIP-file provides several routines for creating color representations of complex (in particular analytic and meromorphic) functions.

Basically the argument (phase) of the function is encoded by a circular (hsv) color scheme and displayed directly on the domain of the function. The phase plot depicts clearly the location of zeros, poles, saddle points (zeros of the derivative), and essential singularities. Several modifications of the color scheme allow to incorporate additional information, like the modulus of the function.

The user must provide a field (matrix) of complex numbers z which covers the domain (typically a rectangle, a disk or an annulus) of the function, and a field of the same size with the corresponding values w=f(z). Then call


to create a phase plot of f on the domain of z. Try PPDemo to see a number of examples with different color options.

Version 2.3 comes with a graphical user interface (by Frank Martin) which allows easy control of color options (including coloring according to the NIST standard) and other parameters.

The screenshot shows a phase plot of a so-called atomic singular inner function, which has five essential singularities sitting at the fifth roots of unity.

For further information and a gallery of phase plots visit

Cite As

Elias Wegert (2020). Phase Plots of Complex Functions (, MATLAB Central File Exchange. Retrieved .

Comments and Ratings (7)

Fah Am


Outstanding and a good educational tool. Thanks.


Reg Shoe

Fan D.Chen

This code (PhasePlot(z,w);)is perfect, I have to say, thank you


added graphical user interface, extended Demo, improved color options, included color schemes conformal to the NIST standard

MATLAB Release Compatibility
Created with R2011b
Compatible with any release
Platform Compatibility
Windows macOS Linux

Inspired: Complex Function Explorer