# How can I insert text into a relative position in a plot?

I use the following code to draw a parametric plot, with Epilog to add a point, and text using Graphics.

graf7 = ParametricPlot[  { delta18[t], delta2D[t]}, {t, 0, 800},
Epilog -> {Red, PointSize[Large],
Point[{ delta18[0] , delta2D[0]} ],
Line[{{20, 160}, {-50, -400}}] } ,
AspectRatio -> 1, PlotLabel -> "d18O vs dD (g/kgda)",
PlotStyle -> Thick, PlotRange -> All, ImageSize -> Medium
];

Show[graf7,
Graphics[Text["Dot is at surface", {-10.6, -89.4}]],
Graphics[Text["Black line is MWL ", {-10.6, -89.6}]]  ]


For now, it works fine. I experimented with the equations that find the original arguments, delta18[t] and delta2D[t], so their value ranges change drastically, and the inserted text is no longer in the plot region.

How can I make the text appear at a relative position within the plot, so it is never outside the plot region?

-
–  Mr.Wizard Jan 23 at 18:53

## 1 Answer

You must use Scaled coordinates to position the text.

Example:

Manipulate[
Plot[Sin[x], {x, 0, max},
PlotRange -> 1.1 {-1, 1},
Epilog -> {Text["sine", Scaled[{.2, .8}]]}],
{max, 1, 20}
]

-