Hallo

On 28 Nov 2005 at 21:33, Robert wrote:

Date sent:              Mon, 28 Nov 2005 21:33:24 -0800 (PST)
From:                   Robert <[EMAIL PROTECTED]>
To:                     [email protected]
Subject:                [R] label point

>   Hi, I have a matrix:
>   [,1] [,2]
>   [1,] 11 31
>   [2,] 44 50
>   [3,] 23 100
>   [4,] 90 31
>   I use plot to draw the four points. Is there any way to label the
>   point? for insatnce, for (11,31), it is "1", for (44,50), it is "4".
>   Thanks!
> 


label.vec<-c(1, 4, l2, l3.....)
plot(matrix)
text(matrix, label.vec)

Should do the trick but it overplots your points, so you need to 
shift positions e.g. by

text(matrix+c(some offset,0), label.vec)

HTH
Petr




> 
> 
> 
> ---------------------------------
> 
>  [[alternative HTML version deleted]]
> 
> ______________________________________________
> [email protected] mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide!
> http://www.R-project.org/posting-guide.html

Petr Pikal
[EMAIL PROTECTED]

______________________________________________
[email protected] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

Reply via email to