[R] coloured letters in a text
Fränzi Korner
fraenzi.korner at oikostat.ch
Thu Aug 28 13:33:12 CEST 2008
Hi
does somebody know how to plot single letters in a text in different
colours?
example 1:
I would like to add the word "ABC" to a figure. Thereby each letter should
have a different colour.
text(x,y,"ABC", col=c(1,2,3)) # this does not work
example 2:
I would like to add the name of a parameter p with an index i to a figure.
The index i should be in red, whereas the rest of the text should be in
black.
text(x,y, expression(p[i]))
Looking forward to your answers!
Fränzi
More information about the R-help
mailing list