Quantcast
Channel: First steps - JuliaLang
Viewing all articles
Browse latest Browse all 2795

Julia PyPlot: how to assign multiple colors to legend

$
0
0

Hello,
I am assigning the color of a plot drawn with PyPlot manually, I need to assign the same color to the legend. How can I control the color parameter?
I am using the following but it gives me an error:

legend(["A", "B", "C"], 
    color = ["blue", "red", "green"],
    loc="best")

What is the correct syntax?
Thank you

3 posts - 2 participants

Read full topic


Viewing all articles
Browse latest Browse all 2795