[R] labelling plots with ancillary data in data.frame

Paul Hiemstra p.hiemstra at geo.uu.nl
Tue Aug 14 17:52:03 CEST 2007


Hi Wesley,

Try the text() function. An example:

a = rep(10,10)
b = seq(1,10)
plot(a,b)
text(a,b, labels = b, pos = 4, offset = 0.7)
?text

hth,

Paul

Wesley Roberts schreef:
> Hi All,
>
> I am busy using R to do some regression modelling and have been using plot(x,y,"") to visualise my variables. I would now like to label my points using data stored in the data.frame used for the regression analysis. For example each of my data points is made up of a field measured forest volume value and a remotely sensed vegetation estimate (NDVI). Each point is an enumeration plot and I would like to label each the points in the xy-scatterplot with their respective plot numbers. Is this possible in R, if so how do I go about doing it?
>
> Many thanks for your help
>
> Wesley
>
> Wesley Roberts MSc.
> Researcher: Forest Assessment (Remote Sensing & GIS)
> Forestry and Forest Products Research Centre
> CSIR
> Tel: +27 (31) 242-2353
> Fax: +27 (31) 261-1216
> http://ffp.csir.co.za/
>
> "To know the road ahead, ask those coming back."
> - Chinese proverb
>
>
>   


-- 
Drs. Paul Hiemstra
Department of Physical Geography
Faculty of Geosciences
University of Utrecht
Heidelberglaan 2
P.O. Box 80.115
3508 TC Utrecht
Phone: 	+31302535773
Fax:	+31302531145
http://intamap.geo.uu.nl/~paul



More information about the R-help mailing list