Skip to Content

R plot: Print text on margin in top left corner

I have the following basic code to plot a grid.

grid <- expand.grid( pi=seq(50, 95, 5) / 100, mu2=seq(5, .5, -.5) )
pi <- seq(44, 100, .5) / 100
par( mai=c(.05, .05, .05, .05), oma=c(2.9, 2.9, 0, 0) ) # Make room for label
plot( grid, cex=.5, xlab="", ylab="", cex.axis=.7 )

How can I plot a text label such as "(A)" in the top left corner as indicated by the red circle?

Edit: The "(A)" should be printed in regular, i.e., horizontal, reading direction; not vertically along with the y-axis.