I have some Analyses on a plot, such as a linear fit and a smoother, in different colors. I would like it to create a legend that shows what the lines mean.
let N = 1000
(
data(DataFrame(a=rand(N), b=rand(N)))
* mapping(:a, :b)
* (
visual(Scatter, markersize=2)
+ AlgebraOfGraphics.linear() * visual(color=:teal)
+ AlgebraOfGraphics.smooth(span=0.1) * visual(color=:pink)
)
)|> draw(resolution=(800,600))
end
I have some Analyses on a plot, such as a linear fit and a smoother, in different colors. I would like it to create a legend that shows what the lines mean.