Skip to content

Predefined objects and shapes

The following objects are predefined.

julia
julia> unitcircle
Circle{Float64} in the complex plane:
   centered at (0.0 + 0.0im) with radius 1.0, positively oriented

julia> unitdisk
Disk interior to:
   Circle(0.0+0.0im,1.0,ccw)

julia> righthalfplane
Half-plane to the left of:
   Line(...0.0+0.0im...0.0-1.0im...)

julia> upperhalfplane
Half-plane to the left of:
   Line(...0.0+0.0im...1.0+0.0im...)

julia> lefthalfplane
Half-plane to the left of:
   Line(...0.0+0.0im...0.0+1.0im...)

julia> lowerhalfplane
Half-plane to the left of:
   Line(...0.0+0.0im...-1.0+0.0im...)

The Shapes submodule provides a number of other curves/paths that can be used in constructing regions.

julia
using Plots
shapes = [
    Shapes.circle  Shapes.ellipse(2, 1) Shapes.squircle;
    Shapes.square  Shapes.triangle      Shapes.cross;
    Shapes.hypo(3) Shapes.star          Shapes.spiral(2, 0.7)
    ]

fig = plot(resolution=(400, 400), layout=(3,3), showaxis=false, legend=false)
for i in 1:3, j in 1:3
    plot!(shapes[i, j], l=2, subplot=3i + j - 3, aspect_ratio=1, guide="", grid=false)
end
fig