[R] is it possible to get the coordinate of mtext()?

Jinsong Zhao jszhao at yeah.net
Mon Mar 17 23:18:50 CET 2014


Hi there,

I hope to rotate the Y label of axis(4) with -90 degree. I can typeset 
the Y label using text() with srt = -90. However, I cannot get the 
coordinate of the position that mtext() used.

In other words, I hope to convert:
mtext("Y label", side = 4, at = 0, line = 2)
to
text(x, 0, "Y label", str = -90)

Now, I don't know how to get the x in the above expression. I can give 
it an arbitrary value. However, I hope it could be more precise.

Thanks a lot for any suggestions.

Regards,
Jinsong



More information about the R-help mailing list