3D Plots

3D Plots

Each graphics primitive ending in 3D has an alternative constructor with the 3D part dropped.

Point3D(x::Real,y::Real,z::Real; label="",pen=Pen())
Point3D(P; label="",pen=Pen())

A graphics primitive representing a three-dimensional point.

P may be a 3-tuple of real numbers or a Vec3

Examples

julia> Point3D(0,4,5;pen="DarkGreen")
source
AsyPlots.Path3DType.
Path3D(points;label="",pen=Pen(),arrow="",spline=false)

A graphics primitive representing a two-dimensional path

points may be an Array of Vec3s or an Array of 3-tuples. Alternatively, iterables of coordinates may be supplied separately as x and y

Examples

julia> Path3D([(0,0),(1,0),(1,1)];pen="MidnightBlue")
source
Polygon3D(points;pen=Pen(),
                 fillpen=Pen(color="white"),
                 spline=false)

A graphics primitive representing a three-dimensional polygon

points may be an Array of Vec3s or an Array of 3-tuples.

Examples

julia> Polygon3D([(0,0,0),(1,0,0),(1,1,0)];pen="MidnightBlue")
source
Surface(x::Array{<:Real},
        y::Array{<:Real},
        z::Array{<:Real,2};
        options)
Surface(z::Array{<:Real},2)

A graphics primitive representing a surface in three dimensions x and y may be one- or two-dimensional arrays

The surface passes through the points [x[i,j],y[i,j],z[i,j] for i=1:size(z,1),j=1:size(z,2)]

The options are

  • colors: A vector of color names, for coloring

  • spline: whether to draw a smooth or piecewise smooth surface

  • surfacepen: a pen for drawing the surface

  • meshpen: a pen for drawing the grid lines on the surface

  • clip: either false or a boolean array of the same dimensions as x, y, and z, specifying patches to exclude

source