[R] How to extract the upper xlim and ylim of my plot?

Greg Snow Greg.Snow at imail.org
Wed Jul 22 07:22:27 CEST 2009


?grconvertX

-----Original Message-----
From: "Mark Na" <mtb954 at gmail.com>
To: "r-help at r-project.org" <r-help at r-project.org>
Sent: 7/21/09 3:05 PM
Subject: [R] How to extract the upper xlim and ylim of my plot?


Dear R-helpers,

I wish to place some text in a plot, at approx 10% of my upper xlim and
approx 90% of my upper ylim, i.e.

> plot(log(all$SR,10)~log(all$AREA,10))
> text(.1*max(xlim),.9*max(ylim),"text to be placed")

(I know how to give absolute coordinates for text location, but I wish to
use relative coordinates).

My code (above) doesn't work because I don't know how to properly extract
the upper xlim and ylim values.

Does anyone know how I could extract the upper xlim and ylim values (without
using max(x-variable) or max (y-variable)...I wish to keep this as general
as possible and not point to the original data.

Thanks in advance,

Mark

        [[alternative HTML version deleted]]

______________________________________________
R-help at r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.




More information about the R-help mailing list