Plot function signatures
General function signatures and usage
Create a new plot inside a new scene object
func(args...; kw_args...)
where func
are the atomics function, e.g. lines
, scatter
, surface
, etc. For a list of the available atomics functions, see Plotting functions overview.
Create a new plot as a subscene of the specified scene
object
func(scene::SceneLike, args...; kw_args...)
Add a plot in-place to the current_scene()
func!(args...; kw_args...)
Add a plot in-place to the specified scene
as a subscene
func!(scene::SceneLike, args...; kw_args...)
Detailed function signatures
The input arguments are handled by the convert_arguments
function, which handles a large variety of inputs. The signatures accepted by convert_arguments
are also those accepted by the plotting functions.
Accepted signatures are as follows:
AbstractPlotting.convert_arguments
— FunctionWrap a single point or equivalent object in a single-element array.
Enables to use scatter like a surface plot with x::Vector, y::Vector, z::Matrix spanning z over the grid spanned by x y
convert_arguments(P, x, y, z)::(Vector)
Takes vectors x
, y
, and z
and turns it into a vector of 3D points of the values from x
, y
, and z
. P
is the plot Type (it is optional).
convert_arguments(P, x)::(Vector)
Takes an input GeometryPrimitive x
and decomposes it to points. P
is the plot Type (it is optional).
Accepts a Vector of Pair of Points (e.g. [Point(0, 0) => Point(1, 1), ...]
) to encode e.g. linesegments or directions.
convert_arguments(P, y)::Vector
Takes vector y
and generates a range from 1 to the length of y
, for plotting on an arbitrary x
axis.
P
is the plot Type (it is optional).
convert_arguments(P, x, y)::(Vector)
Takes vectors x
and y
and turns it into a vector of 2D points of the values from x
and y
.
P
is the plot Type (it is optional).
convert_arguments(P, x, y, z)::Tuple{ClosedInterval, ClosedInterval, Matrix}
Takes 2 ClosedIntervals's x
, y
, and an AbstractMatrix z
, and converts the closed range to linspaces with size(z, 1/2) P
is the plot Type (it is optional).
convert_arguments(x)::(String)
Takes an input AbstractString
x
and converts it to a string.
convert_arguments(P, x)::(Vector)
Takes an input Rect
x
and decomposes it to points.
P
is the plot Type (it is optional).
convert_arguments(P, x::VecOrMat, y::VecOrMat, z::Matrix)
Takes 3 AbstractMatrix
x
, y
, and z
, converts them to Float32
and outputs them in a Tuple.
P
is the plot Type (it is optional).
convert_arguments(P, Matrix)::Tuple{ClosedInterval, ClosedInterval, Matrix}
Takes an AbstractMatrix
, converts the dimesions n
and m
into ClosedInterval
, and stores the ClosedInterval
to n
and m
, plus the original matrix in a Tuple.
P
is the plot Type (it is optional).
convert_arguments(P, x, y, f)::(Vector, Vector, Matrix)
Takes vectors x
and y
and the function f
, and applies f
on the grid that x
and y
span. This is equivalent to f.(x, y')
. P
is the plot Type (it is optional).
convert_arguments(P, Matrix)::Tuple{ClosedInterval, ClosedInterval, ClosedInterval, Matrix}
Takes an array of {T, 3} where T
, converts the dimesions n
, m
and k
into ClosedInterval
, and stores the ClosedInterval
to n
, m
and k
, plus the original array in a Tuple.
P
is the plot Type (it is optional).
convert_arguments(P, x, y, z, i)::(Vector, Vector, Vector, Matrix)
Takes 3 AbstractVector
x
, y
, and z
and the AbstractMatrix
i
, and puts everything in a Tuple.
P
is the plot Type (it is optional).
convert_arguments(P, x, y, z, f)::(Vector, Vector, Vector, Matrix)
Takes AbstractVector
x
, y
, and z
and the function f
, evaluates f
on the volume spanned by x
, y
and z
, and puts x
, y
, z
and f(x,y,z)
in a Tuple.
P
is the plot Type (it is optional).
convert_arguments(Mesh, x, y, z)::GLNormalMesh
Takes real vectors x, y, z and constructs a mesh out of those, under the assumption that every 3 points form a triangle.
convert_arguments(Mesh, xyz::AbstractVector)::GLNormalMesh
Takes an input mesh and a vector xyz
representing the vertices of the mesh, and creates indices under the assumption, that each triplet in xyz
forms a triangle.
convert_arguments(Mesh, x, y, z, indices)::GLNormalMesh
Takes real vectors x, y, z and constructs a triangle mesh out of those, using the faces in indices
, which can be integers (every 3 -> one triangle), or GeometryBasics.NgonFace{N, <: Integer}.
convert_arguments(Mesh, vertices, indices)::GLNormalMesh
Takes vertices
and indices
, and creates a triangle mesh out of those. See to_vertices and to_triangles for more informations about accepted types.
See Plot attributes for the available plot attributes.