Re: [R] putting text in the corner

From: Gregory Snow <Greg.Snow_at_intermountainmail.org>
Date: Fri 10 Feb 2006 - 07:59:34 EST

par('usr') will give you the coordinates of the corners of the current plot.

If you want to go a little beyond this (more like your legend example) by specifying that you want your text to be some distance from the bottom and left of the plot and have the distance not affected by the scale of the data then you might want to look at the cnvrt.coords function in the TeachingDemos package.

-----Original Message-----
From: r-help-bounces@stat.math.ethz.ch on behalf of Thomas Steiner Sent: Thu 2/9/2006 9:18 AM
To: r-help@stat.math.ethz.ch
Subject: [R] putting text in the corner  

I want to write some text in a corner of my plot. Is it possible to get the xlim and ylim of an open window? Or is there anything similar like
legend(x="bottomright", inset=0.01,legend=...) for
text(x=1,y=2, "test")

Thomas



R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

        [[alternative HTML version deleted]]



R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Fri Feb 10 09:23:42 2006

This archive was generated by hypermail 2.1.8 : Sat 11 Feb 2006 - 03:08:58 EST