2D Plots
Each of the following 2D graphics primitives has an alternative constructor without the 2D at the end.
AsyPlots.Point2D — Type.Point2D(x::Real,y::Real; label="",pen=Pen())
Point2D(P; label="",pen=Pen())A graphics primitive representing a two-dimensional point.
P may be a 2-tuple of real numbers, a Vec2, or a Complex
Examples
julia> Point2D(3,-1;pen="DarkGreen")
Point2D(3,-1;pen=DarkGreen)AsyPlots.Path2D — Type.Path2D(points;label="",pen=Pen(),arrow=NoArrow(),spline=false)
Path2D(x,y;label="",pen=Pen(),arrow=NoArrow(),spline=false)A graphics primitive representing a two-dimensional path
points may be an Array of Vec2s, an Array of 2-tuples, or an $n × 2$ Array. Alternatively, iterables of coordinates may be supplied separately as x and y
Examples
julia> Path2D([(0,0),(1,0),(1,1)];pen="MidnightBlue")
Path2D(<3 points>;pen=MidnightBlue)AsyPlots.Circle2D — Type.Circle2D(center,radius; pen::Pen,fillpen::Pen)A graphics primitive representing a circle in the plane
center may be a Vec2 or a 2-tuple of Reals or a Complex
Examples
julia> Circle2D((0,0),1;pen="LightBlue",fillpen="red")
Circle2D((0,0),1;pen=LightBlue,fillpen=red)AsyPlots.Polygon2D — Type.Polygon2D(points;pen=Pen(),
fillpen=Pen(color="white"),
spline=false)A graphics primitive representing a two-dimensional polygon
points may be an Array of Vec2s, an Array of 2-tuples, or an $n × 2$ Array. Alternatively, iterables of coordinates may be supplied separately as x and y
Examples
julia> Polygon2D([(0,0),(1,0),(1,1)];pen="MidnightBlue")
Polygon2D(<3 points>;pen=MidnightBlue)AsyPlots.RawString — Type.RawString(s::AbstractString)Container for directly inserting Asymptote drawing commands
Examples
julia> Plot([Circle((0,0),1),RawString2D("draw((0,0)--dir(20));")])