# Show legend on plot [duplicate]

I have a series of curve I'm plotting using ListPlot. For each plot I'm changing a variable called X. Is there anyway I could show X above each plot? Not like the legend function since it shows it on the side or above. Thanks.

## marked as duplicate by Simon Woods, b.gates.you.know.what, Kuba♦, gpap, Michael E2Nov 18 '14 at 2:08

• Welcome to Mathematica.SE! I suggest the following: 1) As you receive help, try to give it too, by answering questions in your area of expertise. 2) Read the faq! 3) When you see good questions and answers, vote them up by clicking the gray triangles, because the credibility of the system is based on the reputation gained by users sharing their knowledge. Also, please remember to accept the answer, if any, that solves your problem, by clicking the checkmark sign! – user9660 Nov 17 '14 at 19:16

PlotLabel does it!

Table[ListPlot[Table[X Sin[n/Pi], {n, 30}], PlotLabel -> X], {X, 3}]


You can use helpers as:

text1 = "My Title";
text2 = "My other Title";
text3 = "More Text";
text4 = "Well ...";


ans use'm within ListPlot,

lp1 = ListPlot[data
, PlotLabel -> text1
, AxesLabel -> {x, y}
, ImageSize -> Medium];

lp2 = ListPlot[data
, PlotLabel -> text2
, Frame -> True
, FrameLabel -> {x, y}
, ImageSize -> Medium];

lp3 = ListPlot[data
, PlotLabel -> text3
, AxesLabel -> {x, y}
, ImageSize -> Medium];

lp4 = ListPlot[data
, PlotLabel -> text4
, Frame -> True
, FrameLabel -> {x, y}
, ImageSize -> Medium];


ListPlot is a pretty powerful tool. The Documentation Center (via F1) has some great examples.

?? ListPlot


... shows you the most important informations in a compact overview:

Note the difference between no Frame Frame->True.