File Exchange

image thumbnail


version (9.04 KB) by John Barber
Display complex-valued data using domain coloring


Updated 15 Feb 2011

View License

DCOLOR uses a coloring function to map the angle and modulus of complex data to color. This technique is known as domain coloring, and is an excellent tool to explore the behavior of complex-valued functions.

DCOLOR can produce plots using either a complex matrix or a function handle as the source data. There are several built-in coloring functions as well as the option to supply a user-defined coloring function as a function handle. Additionally, the 'grid' option can create contours of the real and imaginary parts of the complex data. See the help text for details and usage examples.

The following references have more information about visualizing complex-valued functions using domain coloring, including example images:

Comments and Ratings (2)



dcolor.m is an excellent Matlab script for domain colouring.
It's user-friendly and versatile.


- Added option to return image color data as a matrix of RGB values

- Added ability to supply function handle to calculate W
- Added new coloring functions
- Added grid option
- Reduced memory usage
- Renamed from cplxpcolor.m to dcolor.m

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

Inspired by: Shaded pseudo color, Domain Coloring

Discover Live Editor

Create scripts with code, output, and formatted text in a single executable document.

Learn About Live Editor