abline!
abline!(axis::Axis, a::Number, b::Number; line_kw_args...)
Adds a line defined by f(x) = x * b + a
to the axis. kwargs are the same as for a line
plot and are passed directly to the line attributess.
The function abline!
draws a linear function given slope and intercept values through the given Axis
. The line always spans across the whole axis and doesn't affect the limits.
This function is not a plot type / recipe and only works with Axis
.
using CairoMakie
fig, ax, pl = scatter(1:4)
abline!(ax, 0, 1)
abline!(ax, 0, 1.5, color = :red, linestyle=:dash, linewidth=2)
fig
© Makie.jl. Last modified: September 02, 2021. Website built with Franklin.jl and the Julia programming language.
These docs were autogenerated using Makie: v0.15.2, GLMakie: v0.4.6, CairoMakie: v0.6.5, WGLMakie: v0.4.6