JLPlotFunctions

jplot.spad line 1 [edit on github]

low level plotting functions using the Plots package for Julia.

jlBar!: (JLFloat64Vector, JLFloat64Vector) -> Void

jlBar!(x,y) draws a bar plot of y vs x on the existing graph object. Example (Shifted Gaussian Distribution):

vx := jlRange(-3.0..3.0, 25);
vz := map(x +-> (t := x pretend DoubleFloat; coerce(0.5*exp(-(t-1.0)^2/2.0))@JF64), vx);
jlBar!(vx, vz)
jlBar: (JLFloat64Vector, JLFloat64Vector) -> Void

jlBar(x,y) draws a bar plot of y vs x. Example (Standard Normal Distribution):

vx := jlRange(-3.0..3.0, 25);
vy := map(x +-> (t := x pretend DoubleFloat; coerce(exp(-t^2/2.0))@JF64), vx);
jlBar(vx, vy)
jlClosePlots: (Void)

jlClosePlots() closes all plot windows. Example:

jlClosePlots()
jlContour!: ((DoubleFloat, DoubleFloat) -> DoubleFloat, Segment Float, Segment Float) -> Void

jlContour!(f, a..b, c..d) adds the contour plot of z = f(x,y) as x ranges from min(a, b) to max(a, b) and y ranges from min(c, d) to max(c, d) on the existing graph object. Example (Hyperbolic Paraboloid Contours):

g := (u : DoubleFloat, v : DoubleFloat) : DoubleFloat +-> u^2 - v^2;
jlContour!(g, -2.0..2.0, -2.0..2.0)
jlContour!: ((DoubleFloat, DoubleFloat) -> DoubleFloat, Segment Float, Segment Float, PositiveInteger) -> Void

jlContour!(f, a..b, c..d, n) adds the contour plot using an n by n grid. Example (Double-well Potential Contours):

g := (u : DoubleFloat, v : DoubleFloat) : DoubleFloat +-> (u^2 - 1.0)^2 + v^2;
jlContour!(g, -2.0..2.0, -2.0..2.0, 50)
jlContour!: ((DoubleFloat, DoubleFloat) -> DoubleFloat, Segment Float, Segment Float, PositiveInteger, String) -> Void

jlContour!(f, a..b, c..d, n, title) adds the contour plot with title using an n by n grid. Example (Interference Pattern Contours):

g := (u : DoubleFloat, v : DoubleFloat) : DoubleFloat +-> cos(2.0*u) + cos(2.0*v);
jlContour!(g, -3.0..3.0, -3.0..3.0, 50, "Interference Pattern Contours (50x50)")
jlContour!: ((DoubleFloat, DoubleFloat) -> DoubleFloat, Segment Float, Segment Float, String) -> Void

jlContour!(f, a..b, c..d, title) adds the contour plot with title. Example (Gaussian Peak Contours):

g := (u : DoubleFloat, v : DoubleFloat) : DoubleFloat +-> exp(-u^2 - v^2);
jlContour!(g, -2.0..2.0, -2.0..2.0, "Gaussian Peak Contours")
jlContour!: (JLFloat64Vector, JLFloat64Vector, JLFloat64Matrix) -> Void

jlContour!(x,y,mat) draws the contour plot of surface mat on the existing graph object. Example:

xGrid := jlRange(-3.0..3.0, 40); yGrid := jlRange(-3.0..3.0, 40);
zMat := qnew(40, 40)$JF64MAT;
jlContour!(xGrid, yGrid, zMat)
jlContour: ((DoubleFloat, DoubleFloat) -> DoubleFloat, Segment Float, Segment Float) -> Void

jlContour(f, a..b, c..d) draws the contour plot of z = f(x,y) as x ranges from min(a, b) to max(a, b) and y ranges from min(c, d) to max(c, d). Example (Rosenbrock Banana Contours):

f := (u : DoubleFloat, v : DoubleFloat) : DoubleFloat +-> (1.0 - u)^2 + 10.0*(v - u^2)^2;
jlContour(f, -2.0..2.0, -1.0..3.0)
jlContour: ((DoubleFloat, DoubleFloat) -> DoubleFloat, Segment Float, Segment Float, PositiveInteger) -> Void

jlContour(f, a..b, c..d, n) draws the contour plot using an n by n grid. Example (Concentric Circular Waves):

f := (u : DoubleFloat, v : DoubleFloat) : DoubleFloat +-> cos(u^2 + v^2);
jlContour(f, -3.0..3.0, -3.0..3.0, 50)
jlContour: ((DoubleFloat, DoubleFloat) -> DoubleFloat, Segment Float, Segment Float, PositiveInteger, String) -> Void

jlContour(f, a..b, c..d, n, title) draws the contour plot with title using an n by n grid. Example (Orthogonal Hyperbolic Contours):

f := (u : DoubleFloat, v : DoubleFloat) : DoubleFloat +-> u*v;
jlContour(f, -2.0..2.0, -2.0..2.0, 50, "Hyperbolic Contours (50x50)")
jlContour: ((DoubleFloat, DoubleFloat) -> DoubleFloat, Segment Float, Segment Float, String) -> Void

jlContour(f, a..b, c..d, title) draws the contour plot with title. Example (Monkey Saddle Contours):

f := (u : DoubleFloat, v : DoubleFloat) : DoubleFloat +-> u^3 - 3.0*u*v^2;
jlContour(f, -2.0..2.0, -2.0..2.0, "Monkey Saddle Contours")
jlContour: (JLFloat64Vector, JLFloat64Vector, JLFloat64Matrix) -> Void

jlContour(x,y,mat) draws the contour plot of surface mat. Example:

xGrid := jlRange(-3.0..3.0, 40); yGrid := jlRange(-3.0..3.0, 40);
zMat := qnew(40, 40)$JF64MAT;
jlContour(xGrid, yGrid, zMat)
jlContourf!: ((DoubleFloat, DoubleFloat) -> DoubleFloat, Segment Float, Segment Float) -> Void

jlContourf!(f, a..b, c..d) adds the filled contour plot of z = f(x,y) as x ranges from min(a, b) to max(a, b) and y ranges from min(c, d) to max(c, d) on the existing graph object. Fill area between contours. Example (Saddle Surface Filled Contours):

g := (u : DoubleFloat, v : DoubleFloat) : DoubleFloat +-> u^2 - v^2;
jlContourf!(g, -2.0..2.0, -2.0..2.0)
jlContourf!: ((DoubleFloat, DoubleFloat) -> DoubleFloat, Segment Float, Segment Float, PositiveInteger) -> Void

jlContourf!(f, a..b, c..d, n) adds the filled contour plot using an n by n grid. Example (Monkey Saddle Filled Contours):

g := (u : DoubleFloat, v : DoubleFloat) : DoubleFloat +-> u^3 - 3.0*u*v^2;
jlContourf!(g, -2.0..2.0, -2.0..2.0, 50)
jlContourf!: ((DoubleFloat, DoubleFloat) -> DoubleFloat, Segment Float, Segment Float, PositiveInteger, String) -> Void

jlContourf!(f, a..b, c..d, n, title) adds the filled contour plot with title using an n by n grid. Example (Checkerboard Standing Wave):

g := (u : DoubleFloat, v : DoubleFloat) : DoubleFloat +-> sin(2.0*u)*sin(2.0*v);
jlContourf!(g, -3.0..3.0, -3.0..3.0, 50, "Checkerboard Standing Wave (50x50)")
jlContourf!: ((DoubleFloat, DoubleFloat) -> DoubleFloat, Segment Float, Segment Float, String) -> Void

jlContourf!(f, a..b, c..d, title) adds the filled contour plot with title. Example (Dipole Peaks Filled Contours):

g := (u : DoubleFloat, v : DoubleFloat) : DoubleFloat +-> exp(-(u-1.0)^2 - v^2) - exp(-(u+1.0)^2 - v^2);
jlContourf!(g, -3.0..3.0, -2.0..2.0, "Dipole Peaks Filled Contours")
jlContourf!: (JLFloat64Vector, JLFloat64Vector, JLFloat64Matrix) -> Void

jlContourf!(x,y,mat) draws the contour plot of surface mat on the existing graph object. Fill area between contours. Example:

xGrid := jlRange(-3.0..3.0, 40); yGrid := jlRange(-3.0..3.0, 40);
zMat := qnew(40, 40)$JF64MAT;
jlContourf!(xGrid, yGrid, zMat)
jlContourf: ((DoubleFloat, DoubleFloat) -> DoubleFloat, Segment Float, Segment Float) -> Void

jlContourf(f, a..b, c..d) draws the filled contour plot of z = f(x,y) as x ranges from min(a, b) to max(a, b) and y ranges from min(c, d) to max(c, d). Fill area between contours. Example (2D Mexican Hat Filled Contours):

f := (u : DoubleFloat, v : DoubleFloat) : DoubleFloat +-> (1.0 - (u^2 + v^2)/2.0)*exp(-(u^2 + v^2)/2.0);
jlContourf(f, -3.0..3.0, -3.0..3.0)
jlContourf: ((DoubleFloat, DoubleFloat) -> DoubleFloat, Segment Float, Segment Float, PositiveInteger) -> Void

jlContourf(f, a..b, c..d, n) draws the filled contour plot using an n by n grid. Example (Rosenbrock Valley Filled Contours):

f := (u : DoubleFloat, v : DoubleFloat) : DoubleFloat +-> (1.0 - u)^2 + 10.0*(v - u^2)^2;
jlContourf(f, -2.0..2.0, -1.0..3.0, 50)
jlContourf: ((DoubleFloat, DoubleFloat) -> DoubleFloat, Segment Float, Segment Float, PositiveInteger, String) -> Void

jlContourf(f, a..b, c..d, n, title) draws the filled contour plot with title using an n by n grid. Example (Wave Interference):

f := (u : DoubleFloat, v : DoubleFloat) : DoubleFloat +-> sin(u) + cos(v);
jlContourf(f, -4.0..4.0, -4.0..4.0, 50, "Wave Interference (50x50)")
jlContourf: ((DoubleFloat, DoubleFloat) -> DoubleFloat, Segment Float, Segment Float, String) -> Void

jlContourf(f, a..b, c..d, title) draws the filled contour plot with title. Example (Concentric Circular Waves):

f := (u : DoubleFloat, v : DoubleFloat) : DoubleFloat +-> cos(u^2 + v^2);
jlContourf(f, -3.0..3.0, -3.0..3.0, "Concentric Waves")
jlContourf: (JLFloat64Vector, JLFloat64Vector, JLFloat64Matrix) -> Void

jlContourf(x,y,mat) draws the contour plot of surface mat. Fill area between contours. Example:

xGrid := jlRange(-3.0..3.0, 40); yGrid := jlRange(-3.0..3.0, 40);
zMat := qnew(40, 40)$JF64MAT;
jlContourf(xGrid, yGrid, zMat)
jlCurves!: (JLFloat64Vector, JLFloat64Vector) -> Void

jlCurves!(x,y) draws a Bezier plot curve from (x.1,y.1) to (x.end,y.end) with control points (x.2,y.2),…, (x.end-1,y.end-1) and draws it on the existing graph object. Example:

vx := jlRange(-\%\ :code:`pi`\ ..\%\ :code:`pi`\ , 100);
vz := map(x +-> coerce(cos(x pretend DoubleFloat))@JF64, vx);
jlCurves!(vx, vz)
jlCurves: (JLFloat64Vector, JLFloat64Vector) -> Void

jlCurves(x,y) draws a Bezier plot curve from (x.1,y.1) to (x.end,y.end) with control points (x.2,y.2),…, (x.end-1,y.end-1) and draws it. Example:

vx := jlRange(-\%\ :code:`pi`\ ..\%\ :code:`pi`\ , 100);
vy := map(x +-> coerce(sin(x pretend DoubleFloat))@JF64, vx);
jlCurves(vx, vy)
jlDensity!: JLFloat64Vector -> Void

jlDensity!(x) draws a line plot of a kernel density estimate of x on the existing graph object. Example:

vx := jlRange(-\%\ :code:`pi`\ ..\%\ :code:`pi`\ , 100);
vz := map(x +-> coerce(cos(x pretend DoubleFloat))@JF64, vx);
jlDensity!(vz)
jlDensity: JLFloat64Vector -> Void

jlDensity(x) draws a line plot of a kernel density estimate of x. Example:

vx := jlRange(-\%\ :code:`pi`\ ..\%\ :code:`pi`\ , 100);
vy := map(x +-> coerce(sin(x pretend DoubleFloat))@JF64, vx);
jlDensity(vy)
jlHeatmap!: ((DoubleFloat, DoubleFloat) -> DoubleFloat, Segment Float, Segment Float) -> Void

jlHeatmap!(f, a..b, c..d) adds a 2D heatmap on the existing plot. Example (Saddle Heatmap):

g := (u : DoubleFloat, v : DoubleFloat) : DoubleFloat +-> u^2 - v^2;
jlHeatmap!(g, -2.0..2.0, -2.0..2.0)
jlHeatmap!: ((DoubleFloat, DoubleFloat) -> DoubleFloat, Segment Float, Segment Float, PositiveInteger) -> Void

jlHeatmap!(f, a..b, c..d, n) adds a 2D heatmap using an n by n grid. Example (Monkey Saddle Heatmap):

g := (u : DoubleFloat, v : DoubleFloat) : DoubleFloat +-> u^3 - 3.0*u*v^2;
jlHeatmap!(g, -2.0..2.0, -2.0..2.0, 60)
jlHeatmap!: ((DoubleFloat, DoubleFloat) -> DoubleFloat, Segment Float, Segment Float, PositiveInteger, String) -> Void

jlHeatmap!(f, a..b, c..d, n, title) adds a 2D heatmap with title using an n by n grid. Example (Interference Pattern Heatmap):

g := (u : DoubleFloat, v : DoubleFloat) : DoubleFloat +-> cos(2.0*u)*cos(2.0*v);
jlHeatmap!(g, -3.0..3.0, -3.0..3.0, 60, "Interference Pattern Heatmap (60x60)")
jlHeatmap!: ((DoubleFloat, DoubleFloat) -> DoubleFloat, Segment Float, Segment Float, String) -> Void

jlHeatmap!(f, a..b, c..d, title) adds a 2D heatmap with title. Example (Mexican Hat Heatmap):

g := (u : DoubleFloat, v : DoubleFloat) : DoubleFloat +-> (1.0 - (u^2 + v^2)/2.0)*exp(-(u^2 + v^2)/2.0);
jlHeatmap!(g, -3.0..3.0, -3.0..3.0, "Mexican Hat Heatmap")
jlHeatmap!: (JLFloat64Vector, JLFloat64Vector, JLFloat64Matrix) -> Void

jlHeatmap!(x, y, mat) adds a heatmap of surface mat on existing graphic. Example:

xGrid := jlRange(-3.0..3.0, 40); yGrid := jlRange(-3.0..3.0, 40);
zMat := qnew(40, 40)$JF64MAT;
jlHeatmap!(xGrid, yGrid, zMat)
jlHeatmap: ((DoubleFloat, DoubleFloat) -> DoubleFloat, Segment Float, Segment Float) -> Void

jlHeatmap(f, a..b, c..d) draws a 2D heatmap of f(x, y). Example (Dipole Twin Peaks Heatmap):

f := (u : DoubleFloat, v : DoubleFloat) : DoubleFloat +-> exp(-(u-1.0)^2 - v^2) - exp(-(u+1.0)^2 - v^2);
jlHeatmap(f, -3.0..3.0, -2.0..2.0)
jlHeatmap: ((DoubleFloat, DoubleFloat) -> DoubleFloat, Segment Float, Segment Float, PositiveInteger) -> Void

jlHeatmap(f, a..b, c..d, n) draws a 2D heatmap of f(x, y) using an n by n grid. Example (Concentric Waves Heatmap):

f := (u : DoubleFloat, v : DoubleFloat) : DoubleFloat +-> sin(u^2 + v^2);
jlHeatmap(f, -3.0..3.0, -3.0..3.0, 60)
jlHeatmap: ((DoubleFloat, DoubleFloat) -> DoubleFloat, Segment Float, Segment Float, PositiveInteger, String) -> Void

jlHeatmap(f, a..b, c..d, n, title) draws a 2D heatmap with title using an n by n grid. Example (Sombrero Heatmap):

f := (u : DoubleFloat, v : DoubleFloat) : DoubleFloat +-> exp(-(u^2 + v^2)/4.0)*cos(sqrt(u^2 + v^2));
jlHeatmap(f, -5.0..5.0, -5.0..5.0, 60, "Sombrero Heatmap (60x60)")
jlHeatmap: ((DoubleFloat, DoubleFloat) -> DoubleFloat, Segment Float, Segment Float, String) -> Void

jlHeatmap(f, a..b, c..d, title) draws a 2D heatmap with title. Example (Rosenbrock Valley Heatmap):

f := (u : DoubleFloat, v : DoubleFloat) : DoubleFloat +-> (1.0 - u)^2 + 10.0*(v - u^2)^2;
jlHeatmap(f, -2.0..2.0, -1.0..3.0, "Rosenbrock Valley Heatmap")
jlHeatmap: (JLFloat64Vector, JLFloat64Vector, JLFloat64Matrix) -> Void

jlHeatmap(x, y, mat) draws a heatmap of surface mat. Example:

xGrid := jlRange(-3.0..3.0, 40); yGrid := jlRange(-3.0..3.0, 40);
zMat := qnew(40, 40)$JF64MAT;
jlHeatmap(xGrid, yGrid, zMat)
jlImplicitPlot: ((DoubleFloat, DoubleFloat) -> DoubleFloat, Segment Float, Segment Float) -> Void

jlImplicitPlot(f, a..b, c..d) draws the 2D implicit curve f(x, y) = 0. Example (Folium of Descartes):

f := (u : DoubleFloat, v : DoubleFloat) : DoubleFloat +-> u^3 + v^3 - 3.0*u*v;
jlImplicitPlot(f, -3.0..3.0, -3.0..3.0)
jlImplicitPlot: ((DoubleFloat, DoubleFloat) -> DoubleFloat, Segment Float, Segment Float, PositiveInteger) -> Void

jlImplicitPlot(f, a..b, c..d, n) draws the 2D implicit curve f(x, y) = 0 using an n by n grid. Example (Lemniscate of Bernoulli):

f := (u : DoubleFloat, v : DoubleFloat) : DoubleFloat +-> (u^2 + v^2)^2 - 2.0*(u^2 - v^2);
jlImplicitPlot(f, -2.0..2.0, -2.0..2.0, 70)
jlImplicitPlot: ((DoubleFloat, DoubleFloat) -> DoubleFloat, Segment Float, Segment Float, PositiveInteger, String) -> Void

jlImplicitPlot(f, a..b, c..d, n, title) draws the 2D implicit curve with title using an n by n grid. Example (Heart Curve):

f := (u : DoubleFloat, v : DoubleFloat) : DoubleFloat +-> (u^2 + v^2 - 1.0)^3 - u^2 * v^3;
jlImplicitPlot(f, -1.5..1.5, -1.5..1.5, 80, "Heart Curve (80x80)")
jlImplicitPlot: ((DoubleFloat, DoubleFloat) -> DoubleFloat, Segment Float, Segment Float, String) -> Void

jlImplicitPlot(f, a..b, c..d, title) draws the 2D implicit curve with title. Example (Cassini Oval):

f := (u : DoubleFloat, v : DoubleFloat) : DoubleFloat +-> (u^2 + v^2)^2 - 2.0*(u^2 - v^2) - 0.5;
jlImplicitPlot(f, -2.0..2.0, -2.0..2.0, "Cassini Oval")
jlParametricPlot!: (DoubleFloat -> DoubleFloat, DoubleFloat -> DoubleFloat, DoubleFloat -> DoubleFloat, Segment Float) -> Void

jlParametricPlot!(fx, fy, fz, a..b) adds the 3D space curve on existing plot. Example (Conical Helix):

f := (t : DoubleFloat) : DoubleFloat +-> t*cos(2.0*t);
g := (t : DoubleFloat) : DoubleFloat +-> t*sin(2.0*t);
h := (t : DoubleFloat) : DoubleFloat +-> t;
jlParametricPlot!(f, g, h, 0.0..12.57)
jlParametricPlot!: (DoubleFloat -> DoubleFloat, DoubleFloat -> DoubleFloat, DoubleFloat -> DoubleFloat, Segment Float, PositiveInteger) -> Void

jlParametricPlot!(fx, fy, fz, a..b, n) adds the 3D space curve using n points. Example (Twisted Cubic Curve):

f := (t : DoubleFloat) : DoubleFloat +-> t;
g := (t : DoubleFloat) : DoubleFloat +-> t^2;
h := (t : DoubleFloat) : DoubleFloat +-> t^3;
jlParametricPlot!(f, g, h, -1.5..1.5, 100)
jlParametricPlot!: (DoubleFloat -> DoubleFloat, DoubleFloat -> DoubleFloat, DoubleFloat -> DoubleFloat, Segment Float, PositiveInteger, String) -> Void

jlParametricPlot!(fx, fy, fz, a..b, n, title) adds the 3D space curve with title using n points. Example (3D Lissajous Knot):

f := (t : DoubleFloat) : DoubleFloat +-> cos(2.0*t);
g := (t : DoubleFloat) : DoubleFloat +-> sin(3.0*t);
h := (t : DoubleFloat) : DoubleFloat +-> cos(5.0*t);
jlParametricPlot!(f, g, h, 0.0..6.283, 250, "3D Lissajous Knot (250 pts)")
jlParametricPlot!: (DoubleFloat -> DoubleFloat, DoubleFloat -> DoubleFloat, DoubleFloat -> DoubleFloat, Segment Float, String) -> Void

jlParametricPlot!(fx, fy, fz, a..b, title) adds the 3D space curve with title. Example (Baseball Seam Curve):

f := (t : DoubleFloat) : DoubleFloat +-> sin(t) + 0.4*sin(3.0*t);
g := (t : DoubleFloat) : DoubleFloat +-> cos(t) - 0.4*cos(3.0*t);
h := (t : DoubleFloat) : DoubleFloat +-> 0.8*sin(2.0*t);
jlParametricPlot!(f, g, h, 0.0..6.283, "Baseball Seam Curve")
jlParametricPlot!: (DoubleFloat -> DoubleFloat, DoubleFloat -> DoubleFloat, Segment Float) -> Void

jlParametricPlot!(fx, fy, a..b) adds the 2D parametric curve on existing plot. Example (Unit Circle):

f := (t : DoubleFloat) : DoubleFloat +-> cos(t);
g := (t : DoubleFloat) : DoubleFloat +-> sin(t);
jlParametricPlot!(f, g, 0.0..6.283)
jlParametricPlot!: (DoubleFloat -> DoubleFloat, DoubleFloat -> DoubleFloat, Segment Float, PositiveInteger) -> Void

jlParametricPlot!(fx, fy, a..b, n) adds the 2D parametric curve using n points. Example (Lemniscate of Gerono):

f := (t : DoubleFloat) : DoubleFloat +-> sin(t);
g := (t : DoubleFloat) : DoubleFloat +-> sin(t)*cos(t);
jlParametricPlot!(f, g, 0.0..6.283, 150)
jlParametricPlot!: (DoubleFloat -> DoubleFloat, DoubleFloat -> DoubleFloat, Segment Float, PositiveInteger, String) -> Void

jlParametricPlot!(fx, fy, a..b, n, title) adds the 2D parametric curve with title using n points. Example (Lissajous 5:6 Curve):

f := (t : DoubleFloat) : DoubleFloat +-> sin(5.0*t);
g := (t : DoubleFloat) : DoubleFloat +-> sin(6.0*t);
jlParametricPlot!(f, g, 0.0..6.283, 300, "Lissajous 5:6 (300 pts)")
jlParametricPlot!: (DoubleFloat -> DoubleFloat, DoubleFloat -> DoubleFloat, Segment Float, String) -> Void

jlParametricPlot!(fx, fy, a..b, title) adds the 2D parametric curve with title. Example (Logarithmic Spiral):

f := (t : DoubleFloat) : DoubleFloat +-> exp(t/10.0)*cos(t);
g := (t : DoubleFloat) : DoubleFloat +-> exp(t/10.0)*sin(t);
jlParametricPlot!(f, g, 0.0..18.85, "Logarithmic Spiral")
jlParametricPlot: (DoubleFloat -> DoubleFloat, DoubleFloat -> DoubleFloat, DoubleFloat -> DoubleFloat, Segment Float) -> Void

jlParametricPlot(fx, fy, fz, a..b) draws the 3D space curve (fx(t), fy(t), fz(t)). Example (Circular Helix):

f := (t : DoubleFloat) : DoubleFloat +-> cos(t);
g := (t : DoubleFloat) : DoubleFloat +-> sin(t);
h := (t : DoubleFloat) : DoubleFloat +-> t / 5.0;
jlParametricPlot(f, g, h, 0.0..18.85)
jlParametricPlot: (DoubleFloat -> DoubleFloat, DoubleFloat -> DoubleFloat, DoubleFloat -> DoubleFloat, Segment Float, PositiveInteger) -> Void

jlParametricPlot(fx, fy, fz, a..b, n) draws the 3D space curve using n points. Example (Trefoil Knot):

f := (t : DoubleFloat) : DoubleFloat +-> sin(t) + 2.0*sin(2.0*t);
g := (t : DoubleFloat) : DoubleFloat +-> cos(t) - 2.0*cos(2.0*t);
h := (t : DoubleFloat) : DoubleFloat +-> -sin(3.0*t);
jlParametricPlot(f, g, h, 0.0..6.283, 200)
jlParametricPlot: (DoubleFloat -> DoubleFloat, DoubleFloat -> DoubleFloat, DoubleFloat -> DoubleFloat, Segment Float, PositiveInteger, String) -> Void

jlParametricPlot(fx, fy, fz, a..b, n, title) draws the 3D space curve with title using n points. Example (Toroidal Spiral Knot):

f := (t : DoubleFloat) : DoubleFloat +-> (2.0 + cos(10.0*t))*cos(t);
g := (t : DoubleFloat) : DoubleFloat +-> (2.0 + cos(10.0*t))*sin(t);
h := (t : DoubleFloat) : DoubleFloat +-> sin(10.0*t);
jlParametricPlot(f, g, h, 0.0..6.283, 300, "Toroidal Spiral Knot (300 pts)")
jlParametricPlot: (DoubleFloat -> DoubleFloat, DoubleFloat -> DoubleFloat, DoubleFloat -> DoubleFloat, Segment Float, String) -> Void

jlParametricPlot(fx, fy, fz, a..b, title) draws the 3D space curve with title. Example (Viviani’s Curve):

f := (t : DoubleFloat) : DoubleFloat +-> 1.0 + cos(t);
g := (t : DoubleFloat) : DoubleFloat +-> sin(t);
h := (t : DoubleFloat) : DoubleFloat +-> 2.0*sin(t/2.0);
jlParametricPlot(f, g, h, -6.283..6.283, "Viviani's Curve")
jlParametricPlot: (DoubleFloat -> DoubleFloat, DoubleFloat -> DoubleFloat, Segment Float) -> Void

jlParametricPlot(fx, fy, a..b) draws the 2D parametric curve (fx(t), fy(t)). Example (Astroid Curve):

f := (t : DoubleFloat) : DoubleFloat +-> cos(t)^3;
g := (t : DoubleFloat) : DoubleFloat +-> sin(t)^3;
jlParametricPlot(f, g, 0.0..6.283)
jlParametricPlot: (DoubleFloat -> DoubleFloat, DoubleFloat -> DoubleFloat, Segment Float, PositiveInteger) -> Void

jlParametricPlot(fx, fy, a..b, n) draws the 2D parametric curve using n points. Example (Lissajous 3:4 Curve):

f := (t : DoubleFloat) : DoubleFloat +-> sin(3.0*t);
g := (t : DoubleFloat) : DoubleFloat +-> sin(4.0*t);
jlParametricPlot(f, g, 0.0..6.283, 200)
jlParametricPlot: (DoubleFloat -> DoubleFloat, DoubleFloat -> DoubleFloat, Segment Float, PositiveInteger, String) -> Void

jlParametricPlot(fx, fy, a..b, n, title) draws the 2D parametric curve with title using n points. Example (Trefoil Knot Projection):

f := (t : DoubleFloat) : DoubleFloat +-> sin(t) + 2.0*sin(2.0*t);
g := (t : DoubleFloat) : DoubleFloat +-> cos(t) - 2.0*cos(2.0*t);
jlParametricPlot(f, g, 0.0..6.283, 200, "Trefoil Projection (200 pts)")
jlParametricPlot: (DoubleFloat -> DoubleFloat, DoubleFloat -> DoubleFloat, Segment Float, String) -> Void

jlParametricPlot(fx, fy, a..b, title) draws the 2D parametric curve with title. Example (Deltoid Curve):

f := (t : DoubleFloat) : DoubleFloat +-> 2.0*cos(t) + cos(2.0*t);
g := (t : DoubleFloat) : DoubleFloat +-> 2.0*sin(t) - sin(2.0*t);
jlParametricPlot(f, g, 0.0..6.283, "Deltoid Curve")
jlPlot!: ((DoubleFloat, DoubleFloat) -> DoubleFloat, Segment Float, Segment Float) -> Void

jlPlot!(f, a..b, c..d) adds the graph of z = f(x, y) as x ranges from min(a, b) to max(a, b) and y ranges from min(c, d) to max(c, d) on the existing graph object. Example (Inverted Gaussian Potential):

g := (u : DoubleFloat, v : DoubleFloat) : DoubleFloat +-> -exp(-(u^2 + v^2)/2.0);
jlPlot!(g, -3.0..3.0, -3.0..3.0)
jlPlot!: ((DoubleFloat, DoubleFloat) -> DoubleFloat, Segment Float, Segment Float, PositiveInteger) -> Void

jlPlot!(f, a..b, c..d, n) adds the graph of z = f(x, y) using an n by n grid. Example (Elliptic Paraboloid Bowl):

g := (u : DoubleFloat, v : DoubleFloat) : DoubleFloat +-> (u^2 + v^2)/4.0;
jlPlot!(g, -2.0..2.0, -2.0..2.0, 40)
jlPlot!: ((DoubleFloat, DoubleFloat) -> DoubleFloat, Segment Float, Segment Float, PositiveInteger, String) -> Void

jlPlot!(f, a..b, c..d, n, title) adds the graph of z = f(x, y) with title using an n by n grid. Example (Chladni Standing Wave):

g := (u : DoubleFloat, v : DoubleFloat) : DoubleFloat +-> sin(u)*sin(v);
jlPlot!(g, -4.0..4.0, -4.0..4.0, 40, "Chladni Standing Wave (40x40)")
jlPlot!: ((DoubleFloat, DoubleFloat) -> DoubleFloat, Segment Float, Segment Float, String) -> Void

jlPlot!(f, a..b, c..d, title) adds the graph of z = f(x, y) with title. Example (Egg Carton Surface):

g := (u : DoubleFloat, v : DoubleFloat) : DoubleFloat +-> cos(u) + cos(v);
jlPlot!(g, -5.0..5.0, -5.0..5.0, "Egg Carton Surface")
jlPlot!: (DoubleFloat -> DoubleFloat, Segment Float) -> Void

jlPlot!(f, a..b) adds the graph of y = f(x) as x ranges from min(a, b) to max(a, b) to the existing graph object. Example (Damped Sine Wave):

g := (t : DoubleFloat) : DoubleFloat +-> exp(-t/5.0)*sin(2.0*t);
jlPlot!(g, 0.0..20.0)
jlPlot!: (DoubleFloat -> DoubleFloat, Segment Float, PositiveInteger) -> Void

jlPlot!(f, a..b, n) adds the graph of y = f(x) using n points. Example (Exponential Decay Envelope):

g := (t : DoubleFloat) : DoubleFloat +-> exp(-t/5.0);
jlPlot!(g, 0.0..20.0, 100)
jlPlot!: (DoubleFloat -> DoubleFloat, Segment Float, PositiveInteger, String) -> Void

jlPlot!(f, a..b, n, title) adds the graph of y = f(x) with title using n points. Example (Modulated Sinc):

g := (t : DoubleFloat) : DoubleFloat +-> sin(3.0*t)/(1.0 + t^2);
jlPlot!(g, -6.0..6.0, 150, "Modulated Sinc (150 pts)")
jlPlot!: (DoubleFloat -> DoubleFloat, Segment Float, String) -> Void

jlPlot!(f, a..b, title) adds the graph of y = f(x) with title. Example (Gaussian Bell Curve):

g := (t : DoubleFloat) : DoubleFloat +-> exp(-t^2/2.0);
jlPlot!(g, -4.0..4.0, "Gaussian Bell Curve")
jlPlot!: (JLFloat64Vector, JLFloat64Vector) -> Void

jlPlot!(x,y) draws a plot using elements of x and y on the existing graph object. Example:

vx := jlRange(-\%\ :code:`pi`\ ..\%\ :code:`pi`\ , 100);
vz := map(x +-> coerce(cos(x pretend DoubleFloat))@JF64, vx);
jlPlot!(vx, vz)
jlPlot!: (JLFloat64Vector, JLFloat64Vector, JLFloat64Vector) -> Void

jlPlot!(x,y,z) draws a plot using elements of x, y and z on the existing graph object. Example:

vx := jlRange(-\%\ :code:`pi`\ ..\%\ :code:`pi`\ , 100);
vy := map(x +-> coerce(sin(x pretend DoubleFloat))@JF64, vx);
vz := map(x +-> coerce(cos(x pretend DoubleFloat))@JF64, vx);
jlPlot!(vx, vz, vy)
jlPlot3dPoints: () -> PositiveInteger

jlPlot3dPoints() returns the default number of grid points per axis used for 3D surface, wireframe and contour plots. Example:

jlPlot3dPoints()
jlPlot: ((DoubleFloat, DoubleFloat) -> DoubleFloat, Segment Float, Segment Float) -> Void

jlPlot(f, a..b, c..d) draws the graph of z = f(x, y) as x ranges from min(a, b) to max(a, b) and y ranges from min(c, d) to max(c, d). Example (Hyperbolic Paraboloid / Saddle):

f := (u : DoubleFloat, v : DoubleFloat) : DoubleFloat +-> u^2 - v^2;
jlPlot(f, -2.0..2.0, -2.0..2.0)
jlPlot: ((DoubleFloat, DoubleFloat) -> DoubleFloat, Segment Float, Segment Float, PositiveInteger) -> Void

jlPlot(f, a..b, c..d, n) draws the graph of z = f(x, y) using an n by n grid. Example (Monkey Saddle):

f := (u : DoubleFloat, v : DoubleFloat) : DoubleFloat +-> u^3 - 3.0*u*v^2;
jlPlot(f, -2.0..2.0, -2.0..2.0, 40)
jlPlot: ((DoubleFloat, DoubleFloat) -> DoubleFloat, Segment Float, Segment Float, PositiveInteger, String) -> Void

jlPlot(f, a..b, c..d, n, title) draws the graph of z = f(x, y) with title using an n by n grid. Example (Concentric Circular Waves):

f := (u : DoubleFloat, v : DoubleFloat) : DoubleFloat +-> cos(u^2 + v^2);
jlPlot(f, -3.0..3.0, -3.0..3.0, 40, "Concentric Circular Waves (40x40)")
jlPlot: ((DoubleFloat, DoubleFloat) -> DoubleFloat, Segment Float, Segment Float, String) -> Void

jlPlot(f, a..b, c..d, title) draws the graph of z = f(x, y) with title. Example (Bivariate Gaussian Bell):

f := (u : DoubleFloat, v : DoubleFloat) : DoubleFloat +-> exp(-(u^2 + v^2)/2.0);
jlPlot(f, -3.0..3.0, -3.0..3.0, "Bivariate Gaussian Bell")
jlPlot: (DoubleFloat -> DoubleFloat, Segment Float) -> Void

jlPlot(f, a..b) draws the graph of y = f(x) as x ranges from min(a, b) to max(a, b). Example (Witch of Agnesi):

f := (t : DoubleFloat) : DoubleFloat +-> 8.0/(t^2 + 4.0);
jlPlot(f, -5.0..5.0)
jlPlot: (DoubleFloat -> DoubleFloat, Segment Float, PositiveInteger) -> Void

jlPlot(f, a..b, n) draws the graph of y = f(x) using n points. Example (Runge’s Function):

f := (t : DoubleFloat) : DoubleFloat +-> 1.0/(1.0 + 25.0*t^2);
jlPlot(f, -1.0..1.0, 100)
jlPlot: (DoubleFloat -> DoubleFloat, Segment Float, PositiveInteger, String) -> Void

jlPlot(f, a..b, n, title) draws the graph of y = f(x) with title using n points. Example (Damped Harmonic Oscillator):

f := (t : DoubleFloat) : DoubleFloat +-> exp(-t/5.0)*cos(2.0*t);
jlPlot(f, 0.0..20.0, 200, "Damped Oscillator (200 pts)")
jlPlot: (DoubleFloat -> DoubleFloat, Segment Float, String) -> Void

jlPlot(f, a..b, title) draws the graph of y = f(x) with title. Example (Mexican Hat Wavelet):

f := (t : DoubleFloat) : DoubleFloat +-> (1.0 - t^2)*exp(-t^2/2.0);
jlPlot(f, -4.0..4.0, "Mexican Hat Wavelet")
jlPlot: (JLFloat64Vector, JLFloat64Vector) -> Void

jlPlot(x,y) draws a plot using elements of x and y. Example:

vx := jlRange(-\%\ :code:`pi`\ ..\%\ :code:`pi`\ , 100);
vy := map(x +-> coerce(sin(x pretend DoubleFloat))@JF64, vx);
jlPlot(vx, vy)
jlPlot: (JLFloat64Vector, JLFloat64Vector, JLFloat64Vector) -> Void

jlPlot(x,y,z) draws a plot using elements of x, y and z. Example:

vx := jlRange(-\%\ :code:`pi`\ ..\%\ :code:`pi`\ , 100);
vy := map(x +-> coerce(sin(x pretend DoubleFloat))@JF64, vx);
vz := map(x +-> coerce(cos(x pretend DoubleFloat))@JF64, vx);
jlPlot(vx, vy, vz)
jlPlotColorMap!: String -> Void

jlPlotColorMap!(palette) sets the color palette / colormap (e.g. “viridis”, “plasma”, “inferno”, “turbo”, “coolwarm”, “cividis”). Example:

jlPlotColorMap!("plasma")
jlPlotColorMap!("viridis")
jlPlotDpi!: PositiveInteger -> Void

jlPlotDpi!(dpi) sets the figure rendering resolution in DPI (dots per inch). Example:

jlPlotDpi!(150)
jlPlotGrid!: Boolean -> Void

jlPlotGrid!(flag) enables or disables grid lines on the plot. Example:

jlPlotGrid!(false)
jlPlotGrid!(true)
jlPlotLegend!: String -> Void

jlPlotLegend!(pos) sets the legend position (“topleft”, “topright”, “bottomleft”, “bottomright”, “outertopright”, “none”, “false”). Example:

jlPlotLegend!("bottomright")
jlPlotLegend!("topleft")
jlPlotLegend!("none")
jlPlotPoints: () -> PositiveInteger

jlPlotPoints() returns the default number of points used for 1D and 2D curves. Example:

jlPlotPoints()
jlPlotSize!: (PositiveInteger, PositiveInteger) -> Void

jlPlotSize!(w, h) sets the plot window dimensions in pixels (width, height). Example:

jlPlotSize!(800, 600)
jlPlotTitle!: String -> Void

jlPlotTitle!(title) draws title as plot title in the current plot. Example:

jlPlotTitle!("Exhaustive jlFriCAS Plotting Verification")
jlPlotTitle! "sin(x)"

if you have the LaTeXStrings Julia package

jlPlotTitle! jlLatex latex sin(x)

For simple expressions title will automatically be enclosed between $. So use:

jlPlotTitle! jlLatex "sin(x)"

For normal text and equations insert dollar signs $ as needed.

jlPlotTitle! jlLatex "Plot: $sin(x)$"
jlPlotXlabel!: String -> Void

jlPlotXlabel!(str) sets x label. See jlPlotTitle for more informations on the different supported formats. Example:

jlPlotXlabel!("X Axis")
jlPlotXlims!: (DoubleFloat, DoubleFloat) -> Void

jlPlotXlims!(x1,x2) sets x plot limits. Example:

jlPlotXlims!(-4.0, 4.0)
jlPlotXlims!: (Float, Float) -> Void

jlPlotXlims!(x1,x2) sets x plot limits. Example:

jlPlotXlims!(-4.0::Float, 4.0::Float)
jlPlotXlims!: (JLFloat64, JLFloat64) -> Void

jlPlotXlims!(x1,x2) sets x plot limits. Example:

jlPlotXlims!(-4.0@JF64, 4.0@JF64)
jlPlotXlims!: Segment Float -> Void

jlPlotXlims!(range) sets x plot limits. Example:

jlPlotXlims!(-4.0..4.0)
jlPlotXscale!: String -> Void

jlPlotXscale!(scale) sets the x-axis scale (“identity”, “log10”, “log2”, “ln”). Example:

jlPlotXscale!("identity")
jlPlotYlabel!: String -> Void

jlPlotYlabel!(str) sets y label. See jlPlotTitle for more informations on the different supported formats. Example:

jlPlotYlabel!("Y Axis")
jlPlotYlims!: (DoubleFloat, DoubleFloat) -> Void

jlPlotYlims!(y1,y2) sets y plot limits. Example:

jlPlotYlims!(-4.0, 4.0)
jlPlotYlims!: (Float, Float) -> Void

jlPlotYlims!(y1,y2) sets y plot limits. Example:

jlPlotYlims!(-4.0::Float, 4.0::Float)
jlPlotYlims!: (JLFloat64, JLFloat64) -> Void

jlPlotYlims!(y1,y2) sets y plot limits. Example:

jlPlotYlims!(-4.0@JF64, 4.0@JF64)
jlPlotYlims!: Segment Float -> Void

jlPlotYlims!(range) sets y plot limits. Example:

jlPlotYlims!(-4.0..4.0)
jlPlotYscale!: String -> Void

jlPlotYscale!(scale) sets the y-axis scale (“identity”, “log10”, “log2”, “ln”). Example:

jlPlotYscale!("identity")
jlPlotZlabel!: String -> Void

jlPlotZlabel!(str) sets z label. See jlPlotTitle for more informations on the different supported formats. Example:

jlPlotZlabel!("Z Axis")
jlPlotZlims!: (DoubleFloat, DoubleFloat) -> Void

jlPlotZlims!(z1,z2) sets z plot limits. Example:

jlPlotZlims!(-2.0, 2.0)
jlPlotZlims!: (Float, Float) -> Void

jlPlotZlims!(z1,z2) sets z plot limits. Example:

jlPlotZlims!(-2.0::Float, 2.0::Float)
jlPlotZlims!: (JLFloat64, JLFloat64) -> Void

jlPlotZlims!(z1,z2) sets z plot limits. Example:

jlPlotZlims!(-2.0@JF64, 2.0@JF64)
jlPlotZlims!: Segment Float -> Void

jlPlotZlims!(range) sets z plot limits. Example:

jlPlotZlims!(-2.0..2.0)
jlPolar!: (DoubleFloat -> DoubleFloat, Segment Float) -> Void

jlPolar!(f, a..b) adds the polar curve on existing plot. Example (Dimpled Limaçon):

g := (t : DoubleFloat) : DoubleFloat +-> 2.0 + cos(t);
jlPolar!(g, 0.0..6.283)
jlPolar!: (DoubleFloat -> DoubleFloat, Segment Float, PositiveInteger) -> Void

jlPolar!(f, a..b, n) adds the polar curve using n points. Example (Archimedean Spiral):

g := (t : DoubleFloat) : DoubleFloat +-> t / 2.0;
jlPolar!(g, 0.0..18.85, 200)
jlPolar!: (DoubleFloat -> DoubleFloat, Segment Float, PositiveInteger, String) -> Void

jlPolar!(f, a..b, n, title) adds the polar curve with title using n points. Example (Logarithmic Spiral):

g := (t : DoubleFloat) : DoubleFloat +-> exp(t / 8.0);
jlPolar!(g, 0.0..18.85, 250, "Logarithmic Spiral (250 pts)")
jlPolar!: (DoubleFloat -> DoubleFloat, Segment Float, String) -> Void

jlPolar!(f, a..b, title) adds the polar curve with title. Example (3-Petal Rose / Trifolium):

g := (t : DoubleFloat) : DoubleFloat +-> sin(3.0*t);
jlPolar!(g, 0.0..3.142, "3-Petal Rose")
jlPolar: (DoubleFloat -> DoubleFloat, Segment Float) -> Void

jlPolar(f, a..b) draws the polar curve r = f(theta). Example (Cardioid):

f := (t : DoubleFloat) : DoubleFloat +-> 1.0 + cos(t);
jlPolar(f, 0.0..6.283)
jlPolar: (DoubleFloat -> DoubleFloat, Segment Float, PositiveInteger) -> Void

jlPolar(f, a..b, n) draws the polar curve r = f(theta) using n points. Example (4-Petal Rose / Rhodonea):

f := (t : DoubleFloat) : DoubleFloat +-> cos(2.0*t);
jlPolar(f, 0.0..6.283, 160)
jlPolar: (DoubleFloat -> DoubleFloat, Segment Float, PositiveInteger, String) -> Void

jlPolar(f, a..b, n, title) draws the polar curve with title using n points. Example (8-Petal Rose):

f := (t : DoubleFloat) : DoubleFloat +-> cos(4.0*t);
jlPolar(f, 0.0..6.283, 200, "8-Petal Rose (200 pts)")
jlPolar: (DoubleFloat -> DoubleFloat, Segment Float, String) -> Void

jlPolar(f, a..b, title) draws the polar curve r = f(theta) with title. Example (Limaçon with Inner Loop):

f := (t : DoubleFloat) : DoubleFloat +-> 1.0 + 2.0*cos(t);
jlPolar(f, 0.0..6.283, "Limaçon with Inner Loop")
jlRange: (Segment Float, PositiveInteger) -> JLFloat64Vector

jlRange(range, n) is a utility function that returns a JLFloat64Vector with n points from low(range) to high(range). Example:

jlRange(-\%\ :code:`pi`\ ..\%\ :code:`pi`\ , 100)
jlRange: Segment Float -> JLFloat64Vector

jlRange(range) is a utility function that returns a JLFloat64Vector with jlPlotPoints() points from low(range) to high(range). Example:

jlRange(-\%\ :code:`pi`\ ..\%\ :code:`pi`\ )
jlSavePlot: String -> Void

jlSavePlot(file) saves the current plot in file. Supported formats: png (default), PDF, svg and more. See https://docs.juliaplots.org/latest/output/#savefig-/-format Example:

jlSavePlot("exhaustive_test_result.png")
jlSetPlot3dPoints!: PositiveInteger -> PositiveInteger

jlSetPlot3dPoints!(n) sets the default number of grid points per axis used for 3D plots and returns the previous value. Example:

jlSetPlot3dPoints!(75)
jlSetPlotPoints!: PositiveInteger -> PositiveInteger

jlSetPlotPoints!(n) sets the default number of points used for 1D and 2D curves and returns the previous value. Example:

jlSetPlotPoints!(350)
jlSetPlotsBackend!: String -> Void

jlSetPlotsBackend!(backend) sets the backend for plotting. The available backends are “gr”, “gaston”, “plotly”, “plotlyjs”, “pythonplot”, “pgfplotsx”, “unicodeplots” and “inspectdr”. Example:

jlSetPlotsBackend!("gr")
jlSurface!: ((DoubleFloat, DoubleFloat) -> DoubleFloat, Segment Float, Segment Float) -> Void

jlSurface!(f, a..b, c..d) adds the surface of z = f(x,y) as x ranges from min(a, b) to max(a, b) and y ranges from min(c, d) to max(c, d) on the existing graph object. Example (Gaussian Hill):

g := (u : DoubleFloat, v : DoubleFloat) : DoubleFloat +-> exp(-(u^2 + v^2)/2.0);
jlSurface!(g, -3.0..3.0, -3.0..3.0)
jlSurface!: ((DoubleFloat, DoubleFloat) -> DoubleFloat, Segment Float, Segment Float, PositiveInteger) -> Void

jlSurface!(f, a..b, c..d, n) adds the surface of z = f(x,y) using an n by n grid. Example (Chladni Nodal Plate):

g := (u : DoubleFloat, v : DoubleFloat) : DoubleFloat +-> cos(2.0*u)*cos(3.0*v);
jlSurface!(g, -3.0..3.0, -3.0..3.0, 40)
jlSurface!: ((DoubleFloat, DoubleFloat) -> DoubleFloat, Segment Float, Segment Float, PositiveInteger, String) -> Void

jlSurface!(f, a..b, c..d, n, title) adds the surface of z = f(x,y) with title using an n by n grid. Example (Damped Ripple Wave):

g := (u : DoubleFloat, v : DoubleFloat) : DoubleFloat +-> sin(u^2 + v^2)/(1.0 + u^2 + v^2);
jlSurface!(g, -3.0..3.0, -3.0..3.0, 40, "Damped Ripple Wave (40x40)")
jlSurface!: ((DoubleFloat, DoubleFloat) -> DoubleFloat, Segment Float, Segment Float, String) -> Void

jlSurface!(f, a..b, c..d, title) adds the surface of z = f(x,y) with title. Example (Rosenbrock Banana Surface):

g := (u : DoubleFloat, v : DoubleFloat) : DoubleFloat +-> (1.0 - u)^2 + 10.0*(v - u^2)^2;
jlSurface!(g, -2.0..2.0, -1.0..3.0, "Rosenbrock Banana Surface")
jlSurface!: (JLFloat64Vector, JLFloat64Vector, JLFloat64Matrix) -> Void

jlSurface!(x,y,mat) draws the plot surface of mat on the existing graph object. Example:

xGrid := jlRange(-3.0..3.0, 40); yGrid := jlRange(-3.0..3.0, 40);
zMat := qnew(40, 40)$JF64MAT;
jlSurface!(xGrid, yGrid, zMat)
jlSurface: ((DoubleFloat, DoubleFloat) -> DoubleFloat, Segment Float, Segment Float) -> Void

jlSurface(f, a..b, c..d) draws the surface of z = f(x,y) as x ranges from min(a, b) to max(a, b) and y ranges from min(c, d) to max(c, d). Example (Sombrero / Circular Waves):

f := (u : DoubleFloat, v : DoubleFloat) : DoubleFloat +-> exp(-(u^2 + v^2)/4.0)*cos(sqrt(u^2 + v^2));
jlSurface(f, -5.0..5.0, -5.0..5.0)
jlSurface: ((DoubleFloat, DoubleFloat) -> DoubleFloat, Segment Float, Segment Float, PositiveInteger) -> Void

jlSurface(f, a..b, c..d, n) draws the surface of z = f(x,y) using an n by n grid. Example (Monkey Saddle):

f := (u : DoubleFloat, v : DoubleFloat) : DoubleFloat +-> u^3 - 3.0*u*v^2;
jlSurface(f, -2.0..2.0, -2.0..2.0, 40)
jlSurface: ((DoubleFloat, DoubleFloat) -> DoubleFloat, Segment Float, Segment Float, PositiveInteger, String) -> Void

jlSurface(f, a..b, c..d, n, title) draws the surface of z = f(x,y) with title using an n by n grid. Example (Hyperbolic Paraboloid):

f := (u : DoubleFloat, v : DoubleFloat) : DoubleFloat +-> u^2 - v^2;
jlSurface(f, -2.0..2.0, -2.0..2.0, 40, "Hyperbolic Paraboloid (40x40)")
jlSurface: ((DoubleFloat, DoubleFloat) -> DoubleFloat, Segment Float, Segment Float, String) -> Void

jlSurface(f, a..b, c..d, title) draws the surface of z = f(x,y) with title. Example (Egg Carton Surface):

f := (u : DoubleFloat, v : DoubleFloat) : DoubleFloat +-> sin(u)*cos(v);
jlSurface(f, -4.0..4.0, -4.0..4.0, "Egg Carton Surface")
jlSurface: (JLFloat64Vector, JLFloat64Vector, JLFloat64Matrix) -> Void

jlSurface(x,y,mat) draws the plot surface of mat. Example:

xGrid := jlRange(-3.0..3.0, 40); yGrid := jlRange(-3.0..3.0, 40);
zMat := qnew(40, 40)$JF64MAT;
jlSurface(xGrid, yGrid, zMat)
jlVectorField: ((DoubleFloat, DoubleFloat) -> DoubleFloat, (DoubleFloat, DoubleFloat) -> DoubleFloat, Segment Float, Segment Float) -> Void

jlVectorField(u, v, a..b, c..d) draws the 2D vector field (u(x, y), v(x, y)). Example (Rotational Vortex / Harmonic Oscillator):

f := (u : DoubleFloat, v : DoubleFloat) : DoubleFloat +-> -v;
g := (u : DoubleFloat, v : DoubleFloat) : DoubleFloat +-> u;
jlVectorField(f, g, -2.0..2.0, -2.0..2.0)
jlVectorField: ((DoubleFloat, DoubleFloat) -> DoubleFloat, (DoubleFloat, DoubleFloat) -> DoubleFloat, Segment Float, Segment Float, PositiveInteger) -> Void

jlVectorField(u, v, a..b, c..d, n) draws the 2D vector field using an n by n grid. Example (Hyperbolic Saddle Field):

f := (u : DoubleFloat, v : DoubleFloat) : DoubleFloat +-> u;
g := (u : DoubleFloat, v : DoubleFloat) : DoubleFloat +-> -v;
jlVectorField(f, g, -2.0..2.0, -2.0..2.0, 20)
jlVectorField: ((DoubleFloat, DoubleFloat) -> DoubleFloat, (DoubleFloat, DoubleFloat) -> DoubleFloat, Segment Float, Segment Float, PositiveInteger, String) -> Void

jlVectorField(u, v, a..b, c..d, n, title) draws the 2D vector field with title using an n by n grid. Example (Lotka-Volterra Predator-Prey Field):

f := (u : DoubleFloat, v : DoubleFloat) : DoubleFloat +-> u*(1.5 - v);
g := (u : DoubleFloat, v : DoubleFloat) : DoubleFloat +-> -v*(3.0 - u);
jlVectorField(f, g, 0.0..5.0, 0.0..5.0, 20, "Lotka-Volterra Field (20x20)")
jlVectorField: ((DoubleFloat, DoubleFloat) -> DoubleFloat, (DoubleFloat, DoubleFloat) -> DoubleFloat, Segment Float, Segment Float, String) -> Void

jlVectorField(u, v, a..b, c..d, title) draws the 2D vector field with title. Example (Van der Pol Oscillator Field):

f := (u : DoubleFloat, v : DoubleFloat) : DoubleFloat +-> v;
g := (u : DoubleFloat, v : DoubleFloat) : DoubleFloat +-> (1.0 - u^2)*v - u;
jlVectorField(f, g, -3.0..3.0, -3.0..3.0, "Van der Pol Oscillator")
jlWireframe!: ((DoubleFloat, DoubleFloat) -> DoubleFloat, Segment Float, Segment Float) -> Void

jlWireframe!(f, a..b, c..d) adds the wireframe of z = f(x,y) as x ranges from min(a, b) to max(a, b) and y ranges from min(c, d) to max(c, d) on the existing graph object. Example (Paraboloid Bowl):

g := (u : DoubleFloat, v : DoubleFloat) : DoubleFloat +-> (u^2 + v^2)/2.0;
jlWireframe!(g, -2.0..2.0, -2.0..2.0)
jlWireframe!: ((DoubleFloat, DoubleFloat) -> DoubleFloat, Segment Float, Segment Float, PositiveInteger) -> Void

jlWireframe!(f, a..b, c..d, n) adds the wireframe using an n by n grid. Example (Circular Cosine Wave):

g := (u : DoubleFloat, v : DoubleFloat) : DoubleFloat +-> cos(sqrt(u^2 + v^2));
jlWireframe!(g, -5.0..5.0, -5.0..5.0, 30)
jlWireframe!: ((DoubleFloat, DoubleFloat) -> DoubleFloat, Segment Float, Segment Float, PositiveInteger, String) -> Void

jlWireframe!(f, a..b, c..d, n, title) adds the wireframe with title using an n by n grid. Example (Rosenbrock Banana Valley):

g := (u : DoubleFloat, v : DoubleFloat) : DoubleFloat +-> (1.0 - u)^2 + 10.0*(v - u^2)^2;
jlWireframe!(g, -2.0..2.0, -1.0..3.0, 30, "Rosenbrock Banana Valley (30x30)")
jlWireframe!: ((DoubleFloat, DoubleFloat) -> DoubleFloat, Segment Float, Segment Float, String) -> Void

jlWireframe!(f, a..b, c..d, title) adds the wireframe with title. Example (Cone Surface):

g := (u : DoubleFloat, v : DoubleFloat) : DoubleFloat +-> sqrt(u^2 + v^2);
jlWireframe!(g, -3.0..3.0, -3.0..3.0, "Cone Surface")
jlWireframe!: (JLFloat64Vector, JLFloat64Vector, JLFloat64Matrix) -> Void

jlWireframe!(x,y,mat) draws the wireframe surface of mat on the existing graph object. Example:

xGrid := jlRange(-3.0..3.0, 40); yGrid := jlRange(-3.0..3.0, 40);
zMat := qnew(40, 40)$JF64MAT;
jlWireframe!(xGrid, yGrid, zMat)
jlWireframe: ((DoubleFloat, DoubleFloat) -> DoubleFloat, Segment Float, Segment Float) -> Void

jlWireframe(f, a..b, c..d) draws the wireframe of z = f(x,y) as x ranges from min(a, b) to max(a, b) and y ranges from min(c, d) to max(c, d). Example (Monkey Saddle):

f := (u : DoubleFloat, v : DoubleFloat) : DoubleFloat +-> u^3 - 3.0*u*v^2;
jlWireframe(f, -2.0..2.0, -2.0..2.0)
jlWireframe: ((DoubleFloat, DoubleFloat) -> DoubleFloat, Segment Float, Segment Float, PositiveInteger) -> Void

jlWireframe(f, a..b, c..d, n) draws the wireframe using an n by n grid. Example (2D Mexican Hat Wavelet):

f := (u : DoubleFloat, v : DoubleFloat) : DoubleFloat +-> (1.0 - (u^2 + v^2)/2.0)*exp(-(u^2 + v^2)/2.0);
jlWireframe(f, -3.0..3.0, -3.0..3.0, 30)
jlWireframe: ((DoubleFloat, DoubleFloat) -> DoubleFloat, Segment Float, Segment Float, PositiveInteger, String) -> Void

jlWireframe(f, a..b, c..d, n, title) draws the wireframe with title using an n by n grid. Example (Circular Ripple Waves):

f := (u : DoubleFloat, v : DoubleFloat) : DoubleFloat +-> sin(u^2 + v^2);
jlWireframe(f, -3.0..3.0, -3.0..3.0, 30, "Circular Ripple Waves (30x30)")
jlWireframe: ((DoubleFloat, DoubleFloat) -> DoubleFloat, Segment Float, Segment Float, String) -> Void

jlWireframe(f, a..b, c..d, title) draws the wireframe with title. Example (Hyperbolic Paraboloid):

f := (u : DoubleFloat, v : DoubleFloat) : DoubleFloat +-> u^2 - v^2;
jlWireframe(f, -2.0..2.0, -2.0..2.0, "Hyperbolic Paraboloid")
jlWireframe: (JLFloat64Vector, JLFloat64Vector, JLFloat64Matrix) -> Void

jlWireframe(x,y,mat) draws the wireframe surface of mat. Example:

xGrid := jlRange(-3.0..3.0, 40); yGrid := jlRange(-3.0..3.0, 40);
zMat := qnew(40, 40)$JF64MAT;
jlWireframe(xGrid, yGrid, zMat)