We cannot plot graph of a complex function $f:\mathbb {C\to C}$ as it requires $4$ dimensions.But we can show how the mapping transforms the domain plane into image plane.We can draw grid lines parallel and perpendicular to $x$-axis and see how the grid lines are modified.But often it becomes tedious task to plot these kind of diagrams.Is there any systematic procedure to draw such figures without help of any software?

For example , $z^2,z^3,\sin(z),\log(z),\exp(z)$ etc.

I want a method to visualize any given function.Is there a way out?

enter image description here

enter image description here

  • $\begingroup$ Without help of any software? $\endgroup$
    – lhf
    May 3, 2021 at 14:28
  • $\begingroup$ @lhf yes,without software would be better,but I won't mind if you suggest me some software other than wolframalpha. $\endgroup$ May 3, 2021 at 14:30
  • $\begingroup$ Very hard to do by hand. See also math.stackexchange.com/a/40308/589 and math.stackexchange.com/questions/3236021/… $\endgroup$
    – lhf
    May 3, 2021 at 14:33
  • $\begingroup$ Not an answer, but possibly of interest. $\endgroup$ May 3, 2021 at 14:46
  • 1
    $\begingroup$ The grid lines keep one of the coordinates fixed, and the other coordinate acts as the parameter of a parametric equation, which you can eliminate. E.g. $$z\to z^2\leftrightarrow\begin{cases}x=u^2-V^2,\\y=2uV\end{cases}\leftrightarrow x=\frac{y^2}{4V^2}-V^2,$$ a family of parabolas. $\endgroup$
    – user974557
    Oct 26, 2021 at 12:14

2 Answers 2


Some years ago, I have written a simple script in Python that can do it ... May be it can help you ? This just needs a (free) python distribution :

import matplotlib.pyplot as plt
import numpy as np

def func(z):
    return z**2

def plot_conformal_map(f, xmin, xmax, ymin, ymax, nb_grid, nb_points):
    xv, yv = np.meshgrid(np.linspace(xmin, xmax, nb_grid), np.linspace(ymin, ymax, nb_points))
    xv = np.transpose(xv)
    yv = np.transpose(yv)

    zv = func(xv + 1j*yv)
    uv = np.real(zv)
    vv = np.imag(zv)

    xh, yh = np.meshgrid(np.linspace(xmin, xmax, nb_points), np.linspace(ymin, ymax, nb_grid))

    zh = func(xh + 1j*yh)
    uh = np.real(zh)
    vh = np.imag(zh)

    ax = plt.subplot(121)
    for i in range(len(yv)):
        ax.plot(xv[i], yv[i], 'b-', lw=1)
        ax.plot(xh[i], yh[i], 'r-', lw=1)

    ax2 = plt.subplot(122)
    for i in range(len(vv)):
        ax2.plot(uv[i], vv[i], 'b-', lw=1)
        ax2.plot(uh[i], vh[i], 'r-', lw=1)


nb_grid = 9
nb_points = 30

xmin, xmax, ymin, ymax = -1, 1, -1, 1

plot_conformal_map(func, xmin, xmax, ymin, ymax, nb_grid, nb_points)

And the output : https://i.stack.imgur.com/j0d1j.jpg

  • $\begingroup$ This is a mathematics site, not a programming or software implementation site. $\endgroup$
    – amWhy
    May 3, 2021 at 15:11
  • $\begingroup$ You can delete my answer if needed but the author seems to be ok with any suggestion of software. Python is commonly used to plot functions. Sorry if it is not the answer expected. $\endgroup$
    – ZosoLedZep
    May 3, 2021 at 15:29
  • $\begingroup$ Comment to asker: "Without the help of software?" Response from asker: "yes,without software would be better" Not everyone in math is fluent in python. $\endgroup$
    – amWhy
    May 3, 2021 at 15:32
  • $\begingroup$ @ZosoLedZep it's ok.It helped a lot. $\endgroup$ May 3, 2021 at 15:41
  • $\begingroup$ @KishalaySarkar, glad to have been able to help you. $\endgroup$
    – ZosoLedZep
    May 3, 2021 at 15:44

Another popular way for plotting complex functions is domain coloring, which associates brightness with the modules of $f(z)$ and hue with its argument.

I recently write cplot, a Python package which makes creating these plots easy. For example, for the natural log:

enter image description here

import cplot
import numpy as np

plt = cplot.plot(np.log, (-2.0, +2.0, 400), (-2.0, +2.0, 400))

cplot's gallery has many more cool examples.


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .