Driver FixRecommendedSound, Wi-Fi or graphics acting up? Check drivers firstFind missing or outdated drivers fast.Check DriversOctober DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsSlow PC?RecommendedPC slow today? Run a repair scan before it gets worseResolve common Windows issues and optimize system performance.Scan Now×
Skip to content
World desk7 min

Domain Coloring: How to Plot Complex Functions f(z) in Your Browser

Domain coloring turns a complex function into a colored picture: hue shows phase, brightness shows modulus, and zeros and poles appear as centers. Here is how to read it and plot your own function in a browser.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

You can plot a complex function in any modern browser by typing an expression in z into an interactive plotter. The result is a colored image of the function’s output: hue shows the phase (argument) of f(z), and brightness or value shows its modulus. Zeros and poles show up as special centers in that picture. The colors follow a convention chosen by each tool, so you need to read its legend before you interpret anything.

Why a complex function needs a colored picture

A complex number has two real parts, so a complex function f(z) takes a point of the plane and sends it to another point of the plane. The input z = x + iy has two real coordinates, and the output f(z) = u + iv has two more. A conventional graph would need four real dimensions, which a flat screen cannot show directly.

As an Amazon Associate I earn from qualifying purchases.

Domain coloring solves this by giving every input point a color determined by its output. You do not plot the output as a height. You plot the input plane and paint each point according to what the function does there. Two properties of f(z) are encoded: its argument (phase) and its modulus (size).

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

What the colors encode

Most domain-coloring plots use the same logic, though the exact palette and scaling differ from tool to tool.

#1 Best Overall
Visual feature What it represents How to read it
Hue Phase (argument) of f(z) Going once around a point, the hue cycles through the full color wheel. The direction of the cycle matters.
Brightness or value Modulus (absolute value) of f(z) Dark areas mark small |f(z)|; bright areas mark large |f(z)|. The exact mapping, linear or logarithmic, depends on the tool.
Dark center with a full hue cycle A zero of f |f| goes to zero, so the point is dark, and the phase wheel turns around it.
Bright center with a full hue cycle A pole of f |f| grows without bound, so the point is bright, and the phase wheel turns around it.
Color sign convention (one example) Sign of a real value The Interactive Mathematics domain-coloring page illustrates positive values as red and negative values as cyan. This is one illustrated convention, not a universal standard.

Because the palette is a convention, every plot should come with its legend. A picture with red at the top and cyan at the bottom means something different from a picture with a rainbow wheel, even when the underlying function is the same.

Phase portraits and enhanced portraits

A pure phase portrait colors each point only by the direction of f(z). It shows where the function rotates, but it discards how large the output is.

An enhanced portrait adds contour lines on top of the color. Typically these are level curves of the phase and of the modulus. The modulus contours show how quickly |f| changes near a zero or pole, which makes local structure easier to compare between two functions. The Interactive Mathematics text recommends enhanced portraits when the function is a general complex function rather than an analytic one, for reasons explained below.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Reading zeros, poles, and common examples

A zero of f is a point z₀ where f(z₀) = 0. A pole is a point where f is undefined and |f| blows up in a controlled way. On a plot, both appear as centers where the hue cycles, but a zero is dark and a pole is bright.

Zeros

For f(z) = z, the origin is a zero. In a phase portrait, the hue wheels around the origin, and in an enhanced portrait the modulus contours shrink toward it. For z² the origin is also a zero, but its order is two, so the phase wheels twice as fast as it does for z.

Poles

For g(z) = 1/z, the origin is a pole. The same hue cycle appears, but the centre is bright, and the modulus contours bunch up toward it rather than shrinking. At a zero and at a pole the colors meet at the exceptional point, so a quick look at the center tells you which kind of singularity you are seeing.

Rank #4

A worked rational example

Take f(z) = (z − 1)/(z² + z + 1). The numerator vanishes at z = 1, so there is a zero there. The denominator vanishes at (−1 + √3 i)/2 and (−1 − √3 i)/2, so there are two poles. You can check all three positions algebraically before you look at the image, which is the habit that makes plots useful.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Other standard test functions

  • e^z has no zeros and no poles in the finite plane. Its phase portrait shows bands of hue that repeat as the imaginary part of z changes, and it is a good test of whether a plotter handles large regions correctly.
  • sin(z) has zeros at the real multiples of π, so you should see a row of dark centers along the real axis.
  • Any expression with a logarithm needs a branch convention. The principal logarithm has a branch cut along the negative real axis, and a plot will show a visible seam there. That seam is a property of the function and its branch choice, not a rendering fault.

How to plot a complex function in the browser

  1. Choose a plotter that documents its expression syntax, function list and rendering approach. Two examples are the Complex Function Plotter by jcponce (documented in its GitHub README) and the Complex Function Visualizer page.
  2. Enter your expression in z using the tool’s own syntax. Start with a simple test such as z or 1/z so you can confirm the color legend against a known answer. Check how the tool writes powers, complex constants and imaginary units, because these vary.
  3. Set the plotted region so that the singularities you expect fall inside the window. A window that is too small hides zeros and poles near its edge; one that is too large makes each zero look small.
  4. Read the legend before you read the picture: which hue is phase 0, whether brightness is linear or logarithmic in |f|, and whether a contour overlay is active.
  5. Locate candidate zeros and poles, then confirm them with algebra. For a rational function, factor the numerator and denominator.
  6. Check branch cuts and domain exclusions for any logarithm, root, or power with a non-integer exponent. Note them on the plot so that a reader does not mistake them for features of the function.
  7. If the plot is slow or patchy, lower the resolution or reduce the region. Then try another tool, since the rendering method changes the performance you get.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Comparing browser plotters

The three tools below are documented differently. The table reports only what each source states; where a source is silent, the cell says so.

Tool and source Rendering approach Expression and functions Contours and controls
Complex Function Plotter (jcponce, GitHub README) WebGL. Expressions are parsed with PEG.js and transformed into WebGL-compatible code placed in a shader template. Trigonometric and hyperbolic functions, conjugate, modulus, powers, logarithm, exponential, real and imaginary parts, gamma, zeta, and Joukowsky. Syntax support belongs to this tool alone. Documentation says it can show modulus and phase level curves to visualize zeros and singularities.
Complex Function Visualizer (browser page) Not stated in the page documentation. Arbitrary expressions in z; documented examples include z², 1/z, e^z, ln(z), cos(z), and zeta(z). Accepts time-dependent functions using t, which allows animation of a parameter. Phase and magnitude are encoded as hue and value.
LK Forge article (2026) A 2D canvas that evaluates complex arithmetic and paints a sampled image. No WebGL is used. Rational and principal-logarithm examples are discussed; a full function list is not stated in the article. Not stated in the article.

The LK Forge article reports its own evaluator benchmark, which the publisher measured in a browser: about 3.4 million evaluations per second, and 200,000 evaluations of its rational-function example in 58 ms on a single thread. These are the author’s figures for that implementation, reported in 2026. They do not establish how any other plotter or device performs.

What to check before you choose a tool

  • The supported functions and the exact expression syntax.
  • Whether phase and modulus contours, or an adjustable color mapping, are available.
  • Responsiveness on your own device, since rendering method and hardware both matter.
  • Animation or parameter controls, such as a time variable.
  • Whether the tool documents branch conventions and singularity behavior.

When the picture misleads

A color plot is an aid to intuition, and it has limits that matter for mathematical conclusions.

Non-analytic functions

The Interactive Mathematics text notes that without constraints such as continuity or differentiability, the set of points sharing a phase can be arbitrary. For analytic functions, a pure phase portrait almost uniquely determines the function. For general functions it does not: the same text gives an analytic and a non-analytic example that share the same phase away from their zeros and poles. A phase-only image therefore cannot tell you that a function is analytic. Use enhanced portraits, or verify analyticity algebraically, when that distinction matters.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Resolution

At finite resolution a plot can miss a zero or pole that is narrow or lies between sampled points. A dark or bright center is strong evidence of a singularity, but its absence at one resolution is not proof that none exists.

Domains and branches

Logs, roots and fractional powers are multivalued. A plot shows one branch, and the seams it displays depend on that choice. State the plotted region, the palette, the magnitude mapping, and every branch cut or excluded domain next to the image.

Quick Recap

Bestseller No. 1
SaleBestseller No. 4
Complex Analysis (Undergraduate Texts in Mathematics)
Complex Analysis (Undergraduate Texts in Mathematics)
Used Book in Good Condition
$46.00
SaleBestseller No. 5

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
Outdated Drivers Are Slowing You DownFree scan - exact matches
Windows Errors? Fix Them Before They SpreadFree repair scan

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.