[R] how to label lines

derek jan.kacaba at gmail.com
Sat Mar 12 17:16:21 CET 2011


Hello R
I can not figure out, how to add text string or number to lines like on this
image:
http://r.789695.n4.nabble.com/file/n3350452/graph.png 
I have some data series in text file.

My script:

require(graphics)
require(stats)
graf=read.table("file",header =FALSE,sep = "", dec = ",",fileEncoding = "",
encoding = "unknown", skip=19,nrows=400)
attach(graf)
plot(V1,V2,type = "l",main = "name",xlab = substitute(lambda (nm)), ylab
=substitute(A))
lines(V3,V4)
lines(V5,V6)
lines(V7,V8)
lines(V9,V10)
lines(V11,V12)
lines(V13,V14)
lines(V15,V16)
lines(V17,V18)
lines(V19,V20)
lines(V21,V22)


--
View this message in context: http://r.789695.n4.nabble.com/how-to-label-lines-tp3350452p3350452.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list