0
$\begingroup$

This question already has an answer here:

I am using Mathematica 8.0.1.0 and when I use PlotLegend the names disappear.

Could you help me fix it?

Thank you.

<< "PlotLegends`"; 
Plot[{Sin[x], Cos[x]}, {x, -2*Pi, 2*Pi}, PlotLegend -> {"Sine", "Cosine"}]

enter image description here

$\endgroup$

marked as duplicate by Jens, MarcoB, RunnyKine, user9660, ubpdqn Mar 13 '16 at 8:49

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • 3
    $\begingroup$ Use this answer instead of the PlotLegends package for version 8.0.1. It is not worth the time and trouble to work with the built-in package. $\endgroup$ – rm -rf Mar 12 '16 at 23:11
  • $\begingroup$ Thank you. I will study these functions. $\endgroup$ – anhnha Mar 12 '16 at 23:13
  • 1
    $\begingroup$ If the suggestion by @R.M. works for you, I would propose closing the question because there is no great likelihood that anyone will be able to fix this particular problem. It's one of so many bugs that it's fair to say nobody cares about the PlotLegends package anymore, particularly since it's obsolete now. Also, I can't actually reproduce that issue in version 8 on Mac... maybe you're on Linux? $\endgroup$ – Jens Mar 12 '16 at 23:15
  • $\begingroup$ Hi, I use Windows. $\endgroup$ – anhnha Mar 12 '16 at 23:23
  • 1
    $\begingroup$ OK - then you should definitely try to use the linked answer, e.g., by doing autoLegend[ Plot[{Sin[x], Cos[x]}, {x, -2*Pi, 2*Pi}], {"Sine", "Cosine"}] $\endgroup$ – Jens Mar 13 '16 at 0:51