I am inserting a DNA sequence into a plot, and hope to colourize each
of the four nucleotide of the DNA sequence with a unique colour i.e.,
A ("red"), C ("green"), G ("blue", and T ("yellow"). I use the
following codes, but the DNA sequence only shows as "red"


DNA <- "ACGT"

plot(1, xlim = c(0,1), ylim = c(0,1), axes=F, xlab="", ylab="",
main="", xaxs="i", yaxs="i")

text(x=0.5, y=0.5, labels=DNA, col=c("red", "green", "blue", "yellow"))

______________________________________________
R-help@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.

Reply via email to