Plots (plotly) multiple series or line labels in legend


how does one label two lines?

using Plots; pyplot()
plot(Plots.fakedata(50,2), w=3, labels=[ "a", "b" ])

the blue line is not labeled “a” and the red line is not labeled “b” .

PS: writes “if label is empty”…what is empty?


This is the #1 most asked question on Plots. The answer is that columns are series - so you should use a row matrix. label = ["a" "b"].
There’s an open issue to change the behaviour to accept a Vector.