Library
Note: ComplexToys reexports the exports of GLMakie.
Public Interface
ComplexToys.checkerplot — Functioncheckerplot(
f :: "Complex -> Complex",
limits = (-1, 1, -1, 1);
pixels = (480, 480),
real = false,
imag = false,
rect = false,
angle = false,
abs = false,
polar = false,
box = nothing,
hicontrast = false,
kwargs...
)Takes a complex function and produces a checker plot as an interactive GLMakie plot.
Arguments
fis the complex function to plot.limitsare the limits of the rectangle to plot, in the format(minRe, maxRe, minIm, maxIm), if one or two numbers are provided instead they are take symmetric along the real and imaginary axis.
Keyword Arguments
pixelsis the size of the output in pixels, respectively, the number of pixels along the real and imaginary axis, taking the same for both if only one number is provided. If either is:auto, the viewport resolution is used.
If none of the below options are set, the plot defaults to rect = true.
realplots black and white stripes orthogonal to the real axis at a rate of one stripe per unit increase. If set to a number this will be used as width instead.imagplots black and white stripes orthogonal to the imaginary axis at a rate of one stripe per unit increase. If set to a number this will be used as width instead.rectis a shortcut forreal = trueandimag = true.angleplots black and white stripes orthogonal to the phase angle at a rate of eight stripes per full rotation. Can be set to an integer to specify a different rate.absplots black and white stripes at a rate of one stripe per unit increase of the natural logarithm of the magnitude. If set to a number this is used as the base of the logarithm. When set to a function, unit increases of its output are used instead.polaris a shortcut forangle = trueandabs = true. Can also be set to the basis to use forabs, then a suitable rate foranglewill be selected.boxif set to(a, b, s)shades the area where the output is within the boxaandbin the colorswhen set to(f, s)the colored domain is defined byf(w) == true. Can also be a list of multiple boxes.hicontrastuses black and white instead of the softer defaults.
Remaining keyword arguments are passed to the plotting backend.
ComplexToys.checkerplot! — Functioncheckerplot(
f :: "Complex -> Complex",
limits = (-1, 1, -1, 1);
pixels = (480, 480),
real = false,
imag = false,
rect = false,
angle = false,
abs = false,
polar = false,
box = nothing,
hicontrast = false,
kwargs...
)Takes a complex function and produces a checker plot as an interactive GLMakie plot.
Arguments
fis the complex function to plot.limitsare the limits of the rectangle to plot, in the format(minRe, maxRe, minIm, maxIm), if one or two numbers are provided instead they are take symmetric along the real and imaginary axis.
Keyword Arguments
pixelsis the size of the output in pixels, respectively, the number of pixels along the real and imaginary axis, taking the same for both if only one number is provided. If either is:auto, the viewport resolution is used.
If none of the below options are set, the plot defaults to rect = true.
realplots black and white stripes orthogonal to the real axis at a rate of one stripe per unit increase. If set to a number this will be used as width instead.imagplots black and white stripes orthogonal to the imaginary axis at a rate of one stripe per unit increase. If set to a number this will be used as width instead.rectis a shortcut forreal = trueandimag = true.angleplots black and white stripes orthogonal to the phase angle at a rate of eight stripes per full rotation. Can be set to an integer to specify a different rate.absplots black and white stripes at a rate of one stripe per unit increase of the natural logarithm of the magnitude. If set to a number this is used as the base of the logarithm. When set to a function, unit increases of its output are used instead.polaris a shortcut forangle = trueandabs = true. Can also be set to the basis to use forabs, then a suitable rate foranglewill be selected.boxif set to(a, b, s)shades the area where the output is within the boxaandbin the colorswhen set to(f, s)the colored domain is defined byf(w) == true. Can also be a list of multiple boxes.hicontrastuses black and white instead of the softer defaults.
Remaining keyword arguments are passed to the plotting backend.
ComplexToys.domaincolor — Functiondomaincolor(
f :: "Complex -> Complex",
limits = (-1, 1, -1, 1);
pixels = (480, 480),
abs = false,
grid = false,
color = true,
all = false,
box = nothing,
kwargs...
)Takes a complex function and produces its domain coloring plot as an interactive GLMakie plot.
Red corresponds to phase $0$, yellow to $\frac{\pi}{3}$, green to $\frac{2\pi}{3}$, cyan to $\pi$, blue to $\frac{4\pi}{3}$, and magenta to $\frac{5\pi}{3}$.
Arguments
fis the complex function to plot.limitsare the limits of the rectangle to plot, in the format(minRe, maxRe, minIm, maxIm), if one or two numbers are provided instead they are take symmetric along the real and imaginary axis.
Keyword Arguments
pixelsis the size of the output in pixels, respectively, the number of pixels along the real and imaginary axis, taking the same for both if only one number is provided. If either is:auto, the viewport resolution is used.abstoggles the plotting of the natural logarithm of the magnitude as lightness ramps between level curves. If set to a number, this will be used as base of the logarithm instead, if set toInf, zero magnitude will be colored black and poles white. Further granular control can be achieved by passing a named tuple with any of the parametersbase,transform, oralpha.basechanges the base of the logarithm, as before.transformis the function applied to the magnitude (m -> log(base, m)by default), andalphachanges the rate at which zeros and poles are colored and impliesbase = Inf.gridplots points with integer real or imaginary part as black dots. More complicated arguments can be passed as a named tuple in a similar fashion tocheckerplot.colortoggles coloring of the phase angle. Can also be set to either the name of, or aColorScheme, or a functionθ -> Color. If set to:printa desaturated version of the default is used.allis a shortcut forabs = true,grid = true, andcolor = true.boxif set to(a, b, s)shades the area where the output is within the boxaandbin the colorswhen set to(f, s)the colored domain is defined byf(w) == true. Can also be a list of multiple boxes.
Remaining keyword arguments are passed to the plotting backend.
ComplexToys.domaincolor! — Functiondomaincolor(
f :: "Complex -> Complex",
limits = (-1, 1, -1, 1);
pixels = (480, 480),
abs = false,
grid = false,
color = true,
all = false,
box = nothing,
kwargs...
)Takes a complex function and produces its domain coloring plot as an interactive GLMakie plot.
Red corresponds to phase $0$, yellow to $\frac{\pi}{3}$, green to $\frac{2\pi}{3}$, cyan to $\pi$, blue to $\frac{4\pi}{3}$, and magenta to $\frac{5\pi}{3}$.
Arguments
fis the complex function to plot.limitsare the limits of the rectangle to plot, in the format(minRe, maxRe, minIm, maxIm), if one or two numbers are provided instead they are take symmetric along the real and imaginary axis.
Keyword Arguments
pixelsis the size of the output in pixels, respectively, the number of pixels along the real and imaginary axis, taking the same for both if only one number is provided. If either is:auto, the viewport resolution is used.abstoggles the plotting of the natural logarithm of the magnitude as lightness ramps between level curves. If set to a number, this will be used as base of the logarithm instead, if set toInf, zero magnitude will be colored black and poles white. Further granular control can be achieved by passing a named tuple with any of the parametersbase,transform, oralpha.basechanges the base of the logarithm, as before.transformis the function applied to the magnitude (m -> log(base, m)by default), andalphachanges the rate at which zeros and poles are colored and impliesbase = Inf.gridplots points with integer real or imaginary part as black dots. More complicated arguments can be passed as a named tuple in a similar fashion tocheckerplot.colortoggles coloring of the phase angle. Can also be set to either the name of, or aColorScheme, or a functionθ -> Color. If set to:printa desaturated version of the default is used.allis a shortcut forabs = true,grid = true, andcolor = true.boxif set to(a, b, s)shades the area where the output is within the boxaandbin the colorswhen set to(f, s)the colored domain is defined byf(w) == true. Can also be a list of multiple boxes.
Remaining keyword arguments are passed to the plotting backend.
ComplexToys.modularsurface — Functionmodularsurface(
f :: "Complex -> Complex",
limits = (-1,1,-1,1);
log = false,
mmax = 10,
mmin = log ? -mmax : 0,
cut = false,
nodes = (480, 480),
abs = false,
grid = false,
color = true,
all = false,
box = nothing,
kwargs...
)Takes a complex function and produces its modular surface plot.
Red corresponds to phase $0$, yellow to $\frac{\pi}{3}$, green to $\frac{2\pi}{3}$, cyan to $\pi$, blue to $\frac{4\pi}{3}$, and magenta to $\frac{5\pi}{3}$.
Arguments
fis the complex function to plot.limitsare the limits of the rectangle to plot, in the format(minRe, maxRe, minIm, maxIm), if one or two numbers are provided instead they are take symmetric along the real and imaginary axis.
Keyword Arguments
logplot the magnitude using a logarithmic scale.mmaxsets an upper cut off point for the magnitude.mminsets a lower cut off point for the magnitude.cuttoggles the behaviour when the maximum is reached. If true the surface is cut, leaving a flat spot which can be shaded. Else the surface is allowed to render outside of the axis limits.nodesis the number of grid points to compute in, respectively, the real and imaginary axis, taking the same for both if only one number is provided.abstoggles the plotting of the natural logarithm of the magnitude as lightness ramps between level curves. If set to a number, this will be used as base of the logarithm instead, if set toInf, zero magnitude will be colored black and poles white. Further granular control can be achieved by passing a named tuple with any of the parametersbase,transform, oralpha.basechanges the base of the logarithm, as before.transformis the function applied to the magnitude (m -> log(base, m)by default), andalphachanges the rate at which zeros and poles are colored and impliesbase = Inf.gridplots points with integer real or imaginary part as black dots. More complicated arguments can be passed as a named tuple in a similar fashion tocheckerplot.colortoggles coloring of the phase angle. Can also be set to either the name of, or aColorScheme, or a functionθ -> Color. If set to:printa desaturated version of the default is used.allis a shortcut forabs = true,grid = true, andcolor = true.boxif set to(a, b, s)shades the area where the output is within the boxaandbin the colorswhen set to(f, s)the colored domain is defined byf(w) == true. Can also be a list of multiple boxes.
Remaining keyword arguments are passed to the plotting backend.
ComplexToys.pdphaseplot — Functionpdphaseplot(
f :: "Complex -> Complex",
limits = (-1, 1, -1, 1);
pixels = (480, 480),
real = false,
imag = false,
rect = false,
angle = false,
abs = false,
polar = false,
box = nothing,
kwargs...
)Takes a complex valued function and produces a phase plot using ColorCET's CBC1 cyclic color map for protanopic and deuteranopic viewers as an interactive GLMakie plot.
Yellow corresponds to phase $0$, white to $\frac{\pi}{2}$, blue to $\pi$, and black to $\frac{3\pi}{2}$.
Arguments
fis the complex function to plot.limitsare the limits of the rectangle to plot, in the format(minRe, maxRe, minIm, maxIm), if one or two numbers are provided instead they are take symmetric along the real and imaginary axis.
Keyword Arguments
pixelsis the size of the output in pixels, respectively, the number of pixels along the real and imaginary axis, taking the same for both if only one number is provided. If either is:auto, the viewport resolution is used.realplots black to white ramps orthogonal to the real axis at a rate of one ramp per unit increase. If set to a number this will be used as width instead.imagplots black to white ramps orthogonal to the imaginary axis at a rate of one ramp per unit increase. If set to a number this will be used as width instead.rectis a shortcut forreal = trueandimag = true.angleplots black to white ramps orthogonal to the phase angle at a rate of eight ramps per full rotation. Can be set to an integer to specify a different rate.absplots black to white ramps at a rate of one ramp per unit increase of the natural logarithm of the magnitude. If set to a number this is used as the base of the logarithm. When set to a function, unit increases of its output are used instead.polaris a shortcut forangle = trueandabs = true. Can also be set to the basis to use forabs, then a suitable rate foranglewill be selected.boxif set to(a, b, s)shades the area where the output is within the boxaandbin the colorswhen set to(f, s)the colored domain is defined byf(w) == true. Can also be a list of multiple boxes.
Remaining keyword arguments are passed to the plotting backend.
ComplexToys.pdphaseplot! — Functionpdphaseplot(
f :: "Complex -> Complex",
limits = (-1, 1, -1, 1);
pixels = (480, 480),
real = false,
imag = false,
rect = false,
angle = false,
abs = false,
polar = false,
box = nothing,
kwargs...
)Takes a complex valued function and produces a phase plot using ColorCET's CBC1 cyclic color map for protanopic and deuteranopic viewers as an interactive GLMakie plot.
Yellow corresponds to phase $0$, white to $\frac{\pi}{2}$, blue to $\pi$, and black to $\frac{3\pi}{2}$.
Arguments
fis the complex function to plot.limitsare the limits of the rectangle to plot, in the format(minRe, maxRe, minIm, maxIm), if one or two numbers are provided instead they are take symmetric along the real and imaginary axis.
Keyword Arguments
pixelsis the size of the output in pixels, respectively, the number of pixels along the real and imaginary axis, taking the same for both if only one number is provided. If either is:auto, the viewport resolution is used.realplots black to white ramps orthogonal to the real axis at a rate of one ramp per unit increase. If set to a number this will be used as width instead.imagplots black to white ramps orthogonal to the imaginary axis at a rate of one ramp per unit increase. If set to a number this will be used as width instead.rectis a shortcut forreal = trueandimag = true.angleplots black to white ramps orthogonal to the phase angle at a rate of eight ramps per full rotation. Can be set to an integer to specify a different rate.absplots black to white ramps at a rate of one ramp per unit increase of the natural logarithm of the magnitude. If set to a number this is used as the base of the logarithm. When set to a function, unit increases of its output are used instead.polaris a shortcut forangle = trueandabs = true. Can also be set to the basis to use forabs, then a suitable rate foranglewill be selected.boxif set to(a, b, s)shades the area where the output is within the boxaandbin the colorswhen set to(f, s)the colored domain is defined byf(w) == true. Can also be a list of multiple boxes.
Remaining keyword arguments are passed to the plotting backend.
ComplexToys.riemannlog — Methodriemannlog(;
nodes = (120, 120),
kwargs...
)Plots the Riemann surface of $log(z)$, with the bottom plane mapped to the input, the height being equal to the imaginary part of the output and the color corresponding to the real part of the output.
The keyword argument nodes is the number of grid points to use in respectively the radius and a single rotation of the input. If only one number is provided it is used for both.
Remaining keyword arguments are passed to the plotting backend.
ComplexToys.riemannpow — Functionriemannpow(
k = 1//2;
nodes = (120, 120),
maxrotations = 10,
kwargs...
)Plots the Riemann surface of $z^k$, where k is the exponent, with the bottom plane mapped to the input, the height being equal to the real part of the output and the color corresponding to the imaginary part of the output. The routine attempts to plot all branches.
The keyword argument nodes is the number of grid points to use in respectively the radius and a single rotation of the input. If only one number is provided it is used for both.
The automatically selected number of rotations is limited by the keyword maxrotations.
Remaining keyword arguments are passed to the plotting backend.
ComplexToys.riemannsphere — Functionriemannsphere(
f :: "Complex -> Complex",
center = 1.7071 - 1.7071im;
nodes = 720,
abs = false,
grid = false,
color = true,
all = false,
box = nothing,
kwargs...
)Takes a complex function and produces a mesh plot of its Riemann sphere.
Red corresponds to phase $0$, yellow to $\frac{\pi}{3}$, green to $\frac{2\pi}{3}$, cyan to $\pi$, blue to $\frac{4\pi}{3}$, and magenta to $\frac{5\pi}{3}$.
Arguments
fis the complex function to plot.centeris the complex number the sphere should initially be centered at, defaults to $1.7071 - 1.7071i$.
Keyword Arguments
nodesis the tessellation level of the sphere.abstoggles the plotting of the natural logarithm of the magnitude as lightness ramps between level curves. If set to a number, this will be used as base of the logarithm instead, if set toInf, zero magnitude will be colored black and poles white. Further granular control can be achieved by passing a named tuple with any of the parametersbase,transform, oralpha.basechanges the base of the logarithm, as before.transformis the function applied to the magnitude (m -> log(base, m)by default), andalphachanges the rate at which zeros and poles are colored and impliesbase = Inf.gridplots points with integer real or imaginary part as black dots. More complicated arguments can be passed as a named tuple in a similar fashion tocheckerplot.colortoggles coloring of the phase angle. Can also be set to either the name of, or aColorScheme, or a functionθ -> Color. If set to:printa desaturated version of the default is used.allis a shortcut forabs = true,grid = true, andcolor = true.boxif set to(a, b, s)shades the area where the output is within the boxaandbin the colorswhen set to(f, s)the colored domain is defined byf(w) == true. Can also be a list of multiple boxes.
Remaining keyword arguments are passed to the plotting backend.
ComplexToys.sawplot — Functionsawplot(
f :: "Complex -> Complex",
limits = (-1, 1, -1, 1);
pixels = (480, 480),
real = false,
imag = false,
rect = false,
angle = false,
abs = false,
polar = false,
color = false,
box = nothing,
kwargs...
)Takes a complex function and produces a saw plot as an interactive GLMakie plot.
Arguments
fis the complex function to plot.limitsare the limits of the rectangle to plot, in the format(minRe, maxRe, minIm, maxIm), if one or two numbers are provided instead they are take symmetric along the real and imaginary axis.
Keyword Arguments
pixelsis the size of the output in pixels, respectively, the number of pixels along the real and imaginary axis, taking the same for both if only one number is provided. If either is:auto, the viewport resolution is used.
If none of the below options are set, the plot defaults to rect = true.
realplots black to white ramps orthogonal to the real axis at a rate of one ramp per unit increase. If set to a number this will be used as width instead.imagplots black to white ramps orthogonal to the imaginary axis at a rate of one ramp per unit increase. If set to a number this will be used as width instead.rectis a shortcut forreal = trueandimag = true.angleplots black to white ramps orthogonal to the phase angle at a rate of eight ramps per full rotation. Can be set to an integer to specify a different rate.absplots black to white ramps at a rate of one ramp per unit increase of the natural logarithm of the magnitude. If set to a number this is used as the base of the logarithm. When set to a function, unit increases of its output are used instead.polaris a shortcut forangle = trueandabs = true. Can also be set to the basis to use forabs, then a suitable rate foranglewill be selected.colortoggles coloring of the phase angle. Can also be set to either the name of, or aColorScheme, or a functionθ -> Color. If set to:printa desaturated version of the default is used.boxif set to(a, b, s)shades the area where the output is within the boxaandbin the colorswhen set to(f, s)the colored domain is defined byf(w) == true. Can also be a list of multiple boxes.
Remaining keyword arguments are passed to the plotting backend.
ComplexToys.sawplot! — Functionsawplot(
f :: "Complex -> Complex",
limits = (-1, 1, -1, 1);
pixels = (480, 480),
real = false,
imag = false,
rect = false,
angle = false,
abs = false,
polar = false,
color = false,
box = nothing,
kwargs...
)Takes a complex function and produces a saw plot as an interactive GLMakie plot.
Arguments
fis the complex function to plot.limitsare the limits of the rectangle to plot, in the format(minRe, maxRe, minIm, maxIm), if one or two numbers are provided instead they are take symmetric along the real and imaginary axis.
Keyword Arguments
pixelsis the size of the output in pixels, respectively, the number of pixels along the real and imaginary axis, taking the same for both if only one number is provided. If either is:auto, the viewport resolution is used.
If none of the below options are set, the plot defaults to rect = true.
realplots black to white ramps orthogonal to the real axis at a rate of one ramp per unit increase. If set to a number this will be used as width instead.imagplots black to white ramps orthogonal to the imaginary axis at a rate of one ramp per unit increase. If set to a number this will be used as width instead.rectis a shortcut forreal = trueandimag = true.angleplots black to white ramps orthogonal to the phase angle at a rate of eight ramps per full rotation. Can be set to an integer to specify a different rate.absplots black to white ramps at a rate of one ramp per unit increase of the natural logarithm of the magnitude. If set to a number this is used as the base of the logarithm. When set to a function, unit increases of its output are used instead.polaris a shortcut forangle = trueandabs = true. Can also be set to the basis to use forabs, then a suitable rate foranglewill be selected.colortoggles coloring of the phase angle. Can also be set to either the name of, or aColorScheme, or a functionθ -> Color. If set to:printa desaturated version of the default is used.boxif set to(a, b, s)shades the area where the output is within the boxaandbin the colorswhen set to(f, s)the colored domain is defined byf(w) == true. Can also be a list of multiple boxes.
Remaining keyword arguments are passed to the plotting backend.
ComplexToys.tphaseplot — Functiontphaseplot(
f :: "Complex -> Complex",
limits = (-1, 1, -1, 1);
pixels = (480, 480),
real = false,
imag = false,
rect = false,
angle = false,
abs = false,
polar = false,
box = nothing,
kwargs...
)Takes a complex valued function and produces a phase plot using ColorCET's CBTC1 cyclic color map for titranopic viewers as an interactive GLMakie plot.
Red corresponds to phase $0$, white to $\frac{\pi}{2}$, cyan to $\pi$, and black to $\frac{3\pi}{2}$.
Arguments
fis the complex function to plot.limitsare the limits of the rectangle to plot, in the format(minRe, maxRe, minIm, maxIm), if one or two numbers are provided instead they are take symmetric along the real and imaginary axis.
Keyword Arguments
pixelsis the size of the output in pixels, respectively, the number of pixels along the real and imaginary axis, taking the same for both if only one number is provided. If either is:auto, the viewport resolution is used.realplots black to white ramps orthogonal to the real axis at a rate of one ramp per unit increase. If set to a number this will be used as width instead.imagplots black to white ramps orthogonal to the imaginary axis at a rate of one ramp per unit increase. If set to a number this will be used as width instead.rectis a shortcut forreal = trueandimag = true.angleplots black to white ramps orthogonal to the phase angle at a rate of eight ramps per full rotation. Can be set to an integer to specify a different rate.absplots black to white ramps at a rate of one ramp per unit increase of the natural logarithm of the magnitude. If set to a number this is used as the base of the logarithm. When set to a function, unit increases of its output are used instead.polaris a shortcut forangle = trueandabs = true. Can also be set to the basis to use forabs, then a suitable rate foranglewill be selected.boxif set to(a, b, s)shades the area where the output is within the boxaandbin the colorswhen set to(f, s)the colored domain is defined byf(w) == true. Can also be a list of multiple boxes.
Remaining keyword arguments are passed to the plotting backend.
ComplexToys.tphaseplot! — Functiontphaseplot(
f :: "Complex -> Complex",
limits = (-1, 1, -1, 1);
pixels = (480, 480),
real = false,
imag = false,
rect = false,
angle = false,
abs = false,
polar = false,
box = nothing,
kwargs...
)Takes a complex valued function and produces a phase plot using ColorCET's CBTC1 cyclic color map for titranopic viewers as an interactive GLMakie plot.
Red corresponds to phase $0$, white to $\frac{\pi}{2}$, cyan to $\pi$, and black to $\frac{3\pi}{2}$.
Arguments
fis the complex function to plot.limitsare the limits of the rectangle to plot, in the format(minRe, maxRe, minIm, maxIm), if one or two numbers are provided instead they are take symmetric along the real and imaginary axis.
Keyword Arguments
pixelsis the size of the output in pixels, respectively, the number of pixels along the real and imaginary axis, taking the same for both if only one number is provided. If either is:auto, the viewport resolution is used.realplots black to white ramps orthogonal to the real axis at a rate of one ramp per unit increase. If set to a number this will be used as width instead.imagplots black to white ramps orthogonal to the imaginary axis at a rate of one ramp per unit increase. If set to a number this will be used as width instead.rectis a shortcut forreal = trueandimag = true.angleplots black to white ramps orthogonal to the phase angle at a rate of eight ramps per full rotation. Can be set to an integer to specify a different rate.absplots black to white ramps at a rate of one ramp per unit increase of the natural logarithm of the magnitude. If set to a number this is used as the base of the logarithm. When set to a function, unit increases of its output are used instead.polaris a shortcut forangle = trueandabs = true. Can also be set to the basis to use forabs, then a suitable rate foranglewill be selected.boxif set to(a, b, s)shades the area where the output is within the boxaandbin the colorswhen set to(f, s)the colored domain is defined byf(w) == true. Can also be a list of multiple boxes.
Remaining keyword arguments are passed to the plotting backend.
Package Internals
ComplexToys.shadedplot — FunctionComplexToys.shadedplot(
f :: "Complex -> Complex",
shader :: "Complex -> Color",
limits = (-1, 1, -1, 1),
pixels = (480, 480);
kwargs...
)Takes a complex function and a shader and produces a GLMakie plot with auto updating.
Arguments
fis the complex function to plot.shaderis the shader function to compute a pixel.limitsare the initial limits of the plot, in the format(minRe, maxRe, minIm, maxIm), if one or two numbers are provided instead they are take symmetric along the real and imaginary axis.pixelsis the size of the output in pixels, respectively, the number of pixels along the real and imaginary axis, taking the same for both if only one number is provided. If either is:auto, the viewport resolution is used.
Keyword arguments are passed to GLMakie.
ComplexToys.shadedplot! — FunctionComplexToys.shadedplot(
f :: "Complex -> Complex",
shader :: "Complex -> Color",
limits = (-1, 1, -1, 1),
pixels = (480, 480);
kwargs...
)Takes a complex function and a shader and produces a GLMakie plot with auto updating.
Arguments
fis the complex function to plot.shaderis the shader function to compute a pixel.limitsare the initial limits of the plot, in the format(minRe, maxRe, minIm, maxIm), if one or two numbers are provided instead they are take symmetric along the real and imaginary axis.pixelsis the size of the output in pixels, respectively, the number of pixels along the real and imaginary axis, taking the same for both if only one number is provided. If either is:auto, the viewport resolution is used.
Keyword arguments are passed to GLMakie.
ComplexToys.@shadedplot — MacroComplexToys.@shadedplot(
basename,
shaderkwargs,
shader
)Macro emitting implementations of fname and fname! in a similar fashion to the other plotting routines in this library, see for instance domaincolor.
shaderkwargs is a named tuple setting keyword arguments used in the expression shader. The result of shader should be a function Complex -> Color and is used to shade the resulting plot.
See the source for examples.