ComplexPlots

ComplexPlots provides definitions and recipes useful for making plots in the complex plane.

Code is provided for the Plots.jl and Makie.jl systems.

Curves, paths, and regions

Facilities are provided for displaying curves, paths, and regions as defined in the ComplexRegions package.

Riemann sphere

Vectors of points can be plotted on the surface of the Riemann sphere. The syntax is different for the two plotting environments.

Function visualization

Plots of complex functions can be made in the style of Wegert and Semmler using the zplot function. At each point in the complex domain, the hue is selected from a cyclic colormap using the phase of the function value, and the color value (similar to lightness) is chosen by the fractional part of the log of the function value's magnitude.

ComplexPlots.zplotFunction

zplot(f, z; coloring=artist()) zplot(f, xlims=[-4, 4], ylims=[-4, 4], n=800; coloring=artist()) Plot a complex-valued function f evaluated over the points in matrix z, or on an n×n grid over xlims×ylims in the complex plane. The method for coloring values is given by the keyword argument coloring.

zplot(z; coloring=artist()) Plot a matrix of complex values coloring according to the function given by the keyword argument coloring. It is presumed that z results from evaluation on a grid in the complex plane.

Examples

zplot(z -> (z^3 - 1) / sin(2im - z))
zplot(tanh)
zplot(tanh, coloring=artist(1.5))  # to see more magnitude contours
source
ComplexPlots.artistFunction
artist(base=exp(1), colormap=Makie.ColorSchemes.cyclic_mygbm_30_95_c78_n256)

artist(b) returns a function that maps a complex number z to a color. The hue is determined by the angle of z. The value (lightness) is determined by the fractional part of $\log_b |z|$. You can optionally specify any colormap, though a cyclic one is strongly recommended.

source