Algosim documentation: plot


The generalised visualisation function.



If equation is an equation in the Cartesian coordinates x and y with either the LHS or the RHS equal to one of these variables and the other side not containing this variable, then plot(equation) plots this function curve.


y = sin(x)
x = √y + 1
ln(x) + 4 = y

If inequality is an inequality in the Cartesian coordinates satisfying the same restrictions, then the implied planar region is plotted.


y < sin(x)
x > √y + 1
ln(x) + 4 < y

If inequalities is a chain of two inequalities in the Cartesian coordinates x and y and at least one side is such a variable isolated and the remaining sides functions of this variable, then the implied region (the region between two function curves) is plotted.


sin(x) < y < 2⋅sin(x)

In all these cases, the plot is taken as the independent variable goes from a to b in steps of δ; if omitted, a default value is used for each parameter.

plot(data) is the same as ScatterPlot(data).

The plot is shown in the current diagram (for 2D plots) or scene (for 3D plots) and a reference to the plot is returned.


plot(y = sin(x), −π, π)

Image 1

plot(cos(x) < y < 2⋅cos(x), −π, π)

Image 2

plot([−2⋅π, 2⋅π] @ (t ↦ ❨5⋅cos(5⋅t)⋅sin(5⋅t), 5⋅sin(5⋅t)⋅sin(2⋅t), t❩))

Image 3

See also