1
$\begingroup$

I have the same question as asked in this question. With the difference that I want to change multiple legend entries.

I tried:

ListLinePlot[Table[{i, RandomReal[]}, {j, 2}, {i, 10}],
PlotLegends -> Style[#, Small] & /@ {"first entry", "second entry"}]
$\endgroup$

2 Answers 2

1
$\begingroup$

Try this:

 ListLinePlot[Table[{i, RandomReal[]}, {j, 2}, {i, 10}], 
 PlotLegends -> (Style[#, 16] & /@ {"first entry", "second entry"})]

with the effect:

enter image description here

Have fun!

$\endgroup$
3
  • $\begingroup$ Thank you very much, but why does Small not work here? $\endgroup$
    – mcocdawc
    Oct 9, 2015 at 14:35
  • $\begingroup$ Ah ok, I see it is not the Small vs. specific number but the brackets. $\endgroup$
    – mcocdawc
    Oct 9, 2015 at 14:37
  • $\begingroup$ Yeah, it's the precedence of & vs ->. The former has a pretty low precedence. $\endgroup$ Oct 9, 2015 at 20:27
1
$\begingroup$

Another way to do it.

ListLinePlot[Table[{i, RandomReal[]}, {j, 2}, {i, 10}], 
  PlotLegends -> LineLegend[{"first entry", "second entry"}, LabelStyle -> Small]]

plot

$\endgroup$

Your Answer

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

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