Julia PyPlot add legend

As explained in the docs, legend() only works if you pass label= to plot or explicitly call set_label. Otherwise, you need to pass the desired legends to legend, e.g.:

legend(["first line", "second line"])
1 Like