Correction x <- seq(0, 1, length=21) db <- dbeta(x, 3,1) plot(db) colour <- c("red", "blue") mytext <- c("RED", "BLUE") mtext( mytext, at= c(2,5), side=1, col=colour)
--- John Kane <[EMAIL PROTECTED]> wrote: > Hi Andrew, > > This is pretty clumsy but it seems to work. I > suspect > there are many better ways > > x <- seq(0, 1, length=21) > plot(db) > colour <- c("red", "blue") > mytext <- c("RED", "BLUE") > mtext( mytext, at= c(2,5), side=1, col=colour) > > --- Andrew Yee <[EMAIL PROTECTED]> wrote: > > > Hi, I'm interested in using mtext(), but with the > > option of having multiple > > colors in the same line of text. > > > > For example, creating a line of text where: > > > > Red is red and blue is blue > > > > How do you create a text argument that lets you do > > this within mtext()? > > > > Thanks, > > Andrew > > MGH Cancer Center > > > > [[alternative HTML version deleted]] > > > > ______________________________________________ > > R-help@stat.math.ethz.ch 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. > > > > ______________________________________________ > R-help@stat.math.ethz.ch 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. > ______________________________________________ R-help@stat.math.ethz.ch 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.