LogLogPlot does not output legends correctly

When I give lists of functions to LogPlot or LogLogPlot with the option of PlotLegends, the output legends only have its first one, just like on the image below.

What should I do to get all legends in the plot?

  • $\begingroup$ Evaluate@pdata in the second plot, but you really should make pdata a function... and please, in the future, post code, not images. See the help for information on how. $\endgroup$
    – ciao
    May 1, 2014 at 9:08

1 Answer 1


Using Evaluate for your variable will allow PlotLegends to work. For example:

llist = {1, 2, 3};
pdata = {x, x^2, x^3};
LogLogPlot[Evaluate@pdata, {x, 1, 10}, PlotLegends -> llist]

gives:enter image description here


LogPlot[Evaluate@pdata, {x, 1, 10}, PlotLegends -> llist]

enter image description here


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.