Plots.jl legend text color?

Viewed 357

Simple but seemingly non-answered question:

Is it possible to customize the legend in Plots.jl so as to have the different text labels in different text colors? With the GR backend.

1 Answers

You can get this to work with legendfontcolor, if you use one plot! statement per color:

julia> using Plots

julia> plot(rand(10), linecolor = :red, legendfontcolor=:red)

julia> plot!(rand(10), linecolor = :blue, legendfontcolor=:blue)
Related