Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

enter image description here

Can "plotlegend" do that? I cannot find a proper function.

share|improve this question
Have you taken a look at ? – Dr. belisarius Nov 21 '13 at 16:10
up vote 7 down vote accepted
Plot[{Sin[x], Cos[x]}, {x, 0, 5}, 
      PlotStyle   -> {Blue, Red}, 
      PlotLegends -> Placed[Framed@LineLegend[{Blue, Red}, {"L1", "L2"}, LegendLayout -> "Row"], 

enter image description here

share|improve this answer
What you use is mathematica 8 or 9? I cannot plot the picture like the above one to use mathematica 8. – user10709 Nov 21 '13 at 23:33
@user10709 Those functions have been added in version 9. I don't have v8 available now to play with. Please when you want a solution for a problem in a previous version, state that at the question. – Dr. belisarius Nov 22 '13 at 11:47

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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