Inline legend

using MakieLayout
using AbstractPlotting: px

using AbstractPlotting

scene, layout = layoutscene()

ax = layout[1, 1] = LAxis(scene)

ls = [lines!(ax, 1:10, (1:10) .* i, color = rand(RGBf0)) for i in 1:5]

leg = layout[1, 1] = LLegend(scene, ls, ["line $i" for i in 1:5];
    width = Auto(), height = Auto(), halign = :left, valign = :top,
    tellwidth = false, tellheight = false,
    margin = (10, 10, 10, 10))

scene