[R] plot() > point names ?

Daniel Malter daniel at umd.edu
Tue Oct 13 08:39:52 CEST 2009


I think you are looking for this:

x=rnorm(6,10,1)
e=rnorm(6,0,1)
y=x+e

plot(y~x,xlim=c(min(x)-2,max(x)+2),ylim=c(min(y)-2,max(y)+2))
text(x,y,pos=1,labels=c("Prof","CEO","Janitor","Admin","Farmer","Fire
Chief"))

HTH,
Daniel 


-------------------------
cuncta stricte discussurus
-------------------------

-----Ursprüngliche Nachricht-----
Von: r-help-bounces at r-project.org [mailto:r-help-bounces at r-project.org] Im
Auftrag von Robert U
Gesendet: Tuesday, October 13, 2009 1:15 AM
An: r-help at r-project.org
Betreff: [R] plot() > point names ?

Dear R-users,

I am using the simple plot() function and i cannot find a way to add the
point label (i would like to plot the points and up to each point the point
name). I found a way to do it with n.plot but then the point is not plotted,
only the label. Do you know if there is a parameter for the plot() function
that would allow me to specify point names ? (and even more ideally, another
parameter to specify the point label size...)

with regards !

P.P.




      
	[[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