lines

lines(positions)
lines(x, y)
lines(x, y, z)

Creates a connected line plot for each element in (x, y, z), (x, y) or positions.

Tip

You can separate segments by inserting NaNs.

Examples

using CairoMakie

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

xs = 0:0.01:10
ys = 0.5 .* sin.(xs)

lines!(xs, ys)
lines!(xs, ys .- 1, linewidth = 5)
lines!(xs, ys .- 2, linewidth = 5, color = ys)
lines!(xs, ys .- 3, linestyle = :dash)

f