I am using a triangle to mark an event on a timeline in R, and I've given the coordinates to the specific position on the line where the event occurs in days. In the points(
function, I have supplied pch=25
to create the "filled triangle" shape. However, the positioning of the character is based on the center of the triangle. Is it possible to use an argument like "pos" (i.e. pos=3) so that the triangle is positioned immediately above the line and points to to X coordinate of interest?
Example:
plot.new()
segments(0, 0.5, 1, 0.5)
points(0.5, 0.5, pch=25)
have
want