arc

arc(origin, radius, start_angle, stop_angle; kwargs...)

This function plots a circular arc, centered at origin with radius radius, from start_angle to stop_angle. origin must be a coordinate in 2 dimensions (i.e., a Point2); the rest of the arguments must be <: Number.

Examples:

arc(Point2f(0), 1, 0.0, π)arc(Point2f(1, 2), 0.3. π, -π)

Attributes

Available attributes and their defaults for Combined{Makie.arc} are:

  alpha           1.0
  color           :black
  colormap        :viridis
  colorrange      MakieCore.Automatic()
  colorscale      identity
  cycle           [:color]
  depth_shift     0.0f0
  highclip        MakieCore.Automatic()
  inspectable     true
  linestyle       "nothing"
  linewidth       1.5
  lowclip         MakieCore.Automatic()
  nan_color       :transparent
  overdraw        false
  resolution      361
  space           :data
  ssao            false
  transparency    false
  visible         true

Examples

using CairoMakie

arc(Point2f(0), 1, -π, π)

using CairoMakie
f = Figure() 
Axis(f[1, 1])

for i in 1:10
    arc!(Point2f(0, i), i, -π, π)
end

f

using CairoMakie

f = Figure()
Axis(f[1, 1])

for i in 1:4
    radius = 1/(i*2)
    left = 1/(i*2)
    right = (i*2-1)/(i*2)
    arc!(Point2f(left, 0), radius, 0, π)
    arc!(Point2f(right, 0), radius, 0, π)
end
for i in 3:4
    radius = 1/(i*(i-1)*2)
    left = (1/i) + 1/(i*(i-1)*2)
    right = ((i-1)/i) - 1/(i*(i-1)*2)
    arc!(Point2f(left, 0), radius, 0, π)
    arc!(Point2f(right, 0), radius, 0, π)
end

f