Labelling functions in Gadfly plot

gadfly, julia

Solution

Set the `color` argument to a list of labels:

plot([sin, cos], 0, 25, color=["sine", "cosine"])

Problem

Plotting functions directly is easy in Gadfly: ``` plot([sin, cos], 0, 25) ``` This gives my two differently colored lines, automatically labelled in the legend as something like `f_1` and `f_2`: How can I change the default names in the "Color" legend?

Original source