How to place PlotLabel inside the plot frame

I have the following plot:

dibA1 = Show[Plot[{PDF[eϕ1rand, x], PDF[eϕ1fps, x], PDF[eϕ1grad, x], PDF[eϕ1rank, x]},
{x, 0, 1200},
Frame -> True,
Filling -> None,
PlotLegends -> Placed[{"No Stigmergy", "FPS", "Gradient", "Rank"}, {0.85, 0.7}],
FrameLabel -> {"Minutes", "Probability"},
AspectRatio -> 0.8,
LabelStyle -> {FontFamily -> "Times", 12},
PlotRange -> {{0, 100}, All},
PlotStyle ->
{Directive[Thick, Opacity[0.45], {Black}, Dashing[{0.045, 0.020}]],
Directive[Thick, Opacity[0.75], {Red}],
Directive[Thick, Opacity[0.75], {Blue}, DotDashed],
Directive[Thick, Opacity[0.75], {Green}, Dashing[{0.025, 0.014}]]},
PlotLabel -> "Event 1"],
ImageSize -> 600]


I would like to place it in the same relative position but into the plot frame. I have been testing

Epilog -> Text[Style["Event1", 12], {0, -1}]


in different parts of the code and trying other text positions but I can not see any text into the plot frame.

How can I get to see the text "Event1" into the frame and determine its location?

• Use Epilog -> Text[Style["Event1", 12], {45, -0.5}]]. The {45, -0.5} are the coordinates (relative to the axes) where the text will appear. – aardvark2012 Aug 8 '17 at 13:45
• Hi, Thank to answer me. I have tested the Epilog[] line but it does not show any text into the frame. – user1993416 Aug 8 '17 at 14:55

Use scaled coordinates Scaled[{x,y}] for easier control. Scale runs $0<(x,y)<1$ independently of actual axes values, therefore not only it is easier to control, but also if you ever change the plot so axes values change, Scale will faithfully keep your text in the originally specified location relative to the Frame. Remember Style works in Text and hence in Epilog. Also next time your ask a question try to give a minimal code example, no need to overload the question with irrelevant code.

Plot[Cos[x^2],{x,0,Pi},
Frame->True,
Epilog->Text[Style["Hey There",Red,Italic,20],Scaled[{.5,.9}]]]


• Thank you, it works fine. I will remember your comment next times. – user1993416 Aug 8 '17 at 15:56
Legended[Plot[x Cos[x] Sin[x], {x, 0, Pi}, Frame -> True],
Placed[Style["Event 1", Red, Bold, 20], {Center, Top}]]


Use Placed[Style["Event 1", Red, Bold, 20], {.7, .9}] to get