I have here three example data sets which are plotted with ListLinePlot
.
Each data sets get its own color and the same is assigned to the labels.
How can I Map
or simplify the line:
Legended[Transpose[{x, y1}], "y1"], Legended[
Transpose[{x, y2}], "y2"], Legended[Transpose[{x, y3}], "y3"]
so that the plot below is obtained?
Example code:
SeedRandom["x"];
x = Range[10]*0.3;
SeedRandom["y1"];
y1 = RandomReal[{0, 1}, 10];
SeedRandom["y2"];
y2 = RandomReal[{0, 1}, 10];
SeedRandom["y3"];
y3 = RandomReal[{0, 1}, 10];
ListLinePlot[{Legended[Transpose[{x, y1}], "y1"],
Legended[Transpose[{x, y2}], "y2"],
Legended[Transpose[{x, y3}], "y3"]}, Joined -> True,
PlotRange -> All, BaseStyle -> {FontSize -> 20}, Frame -> True,
FrameLabel -> {{"y", ""}, {"x", "Title"}}, ImageSize -> 600]
Legended[Transpose[{x, ToExpression@#}], #] & /@ {"y1", "y2", "y3"}
? $\endgroup$ – kglr Aug 9 '16 at 13:13