1
$\begingroup$

When I pass the list directly into the Plot as

Plot[{1 x, 2 x, 3 x}, {x, 0, 5}, PlotLegends -> {1, 2, 3}]

the legends are

legends2

But when I pass a reference to the list into the Plot as

l = {1 x, 2 x, 3 x}
Plot[l, {x, 0, 5}, PlotLegends -> {1, 2, 3}]

the legends are

legends1

How can I get all legends displayed after passing a list reference and not a plain list to the Plot?

The version of Wolfram Mathematica is 10.4.0.0.

$\endgroup$
2

0

Browse other questions tagged or ask your own question.