Adding Guide.manual_color_key to Geom.ribbon plot with hex codes

Okay actually I figured it out! It wasn’t Guide.manual_color_key I wanted, but instead Scale.color_discrete_manual! Apologies for my slander to the package authors, it was in fact in the docs (as it always is) I just hadn’t found it yet!!

The solution:

plot(df, x=:x,y=:y,
        ymax = :ymax, ymin = :ymin, alpha = [0.2],
        color = :func,
        Geom.line, Geom.ribbon,
        Guide.colorkey(title="Function",labels=["Sin","Cos"]),
        Scale.color_discrete_manual("#3b3759", "#cf8da7"))

Which produces exactly what I wanted :slight_smile: