Skip to content
Prev 154805 / 398503 Next

Text

Dani,
You can put text on your graphs using the locator function. Here is an example

hist(rnorm(1000,0,1) #plots a histogram for you
xy.cord<-locator(1) #Once you give this click on the graph to get the coordinates
text(xy.cord, "Text you want to write")

Hope this helps.
Cheers../Murli




-----Original Message-----
From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-project.org] On Behalf Of Greg Snow
Sent: Tuesday, September 02, 2008 1:38 PM
To: Dani Valverde; R Help
Subject: Re: [R] Text

In recent versions of R there are the functions grconvertX and grconvertY that will convert between the different coordiate systems.  You can use them to convert from the device or ndc systems to user coordinates, then place the text using the text function.

Hope this helps,

--
Gregory (Greg) L. Snow Ph.D.
Statistical Data Center
Intermountain Healthcare
greg.snow at imail.org
(801) 408-8111
______________________________________________
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.