Skip to content
Prev 139302 / 398506 Next

Specifying relative position of text in a plot

This is a useful example of placing text, but I interpreted the request as aking for the text to be placed at the left side of the graph (1/10 of the x range) and centered vertically (with respect to the y scale).  So, then I would calculate x and y as

x <- pu[1] * 0.9 + pu[2] * 0.1
y <- pu[3] * 0.5 + pu[4] * 0.5

Also, text() centers the supplied text at the x,y coordinates. So, if Tom wants the text "begin" at that point, he will need to adjust the x coordinate for the length of the string being printed.

Hope this is helpful,

Dan

Daniel J. Nordlund
Research and Data Analysis
Washington State Department of Social and Health Services
Olympia, WA  98504-5204