AlgebraOfGraphics.jl icon indicating copy to clipboard operation
AlgebraOfGraphics.jl copied to clipboard

Add legends for analyses

Open jtrakk opened this issue 4 years ago • 1 comments

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

image

jtrakk avatar Jan 22 '21 01:01 jtrakk

Any update on this?

pkofod avatar Sep 21 '23 06:09 pkofod