Hi Andrew, Do you want to put the symbols you described as a legend in a plot? If so, here is one way:
x <- rnorm(3) plot(x, pch = 16, cex = 1.1, col = 1:3) legend('topleft', ncol = 3, c(expression(alpha), expression(beta), expression(gamma)), pch = 16, cex = 1.1, col = 1:3) Is you do not want to use legend, but place the symbols in each plot, then: plot(x, pch = 16, cex = 1.1, col = 1:3) text(1.05,1.01*x[1], expression(alpha) ) text(2.05,1.01*x[2], expression(beta) ) text(2.95,1.01*x[3], expression(gamma) ) should get you close. See ?text, ?expression and ?legend for more information. HTH, Jorge On Thu, Jul 9, 2009 at 10:53 AM, Andrew Yee <y...@post.harvard.edu> wrote: > Hi, is there a way to treat a data symbol, e.g. one with pch = 16, as a > character? > Specifically, I'm interested in creating a line of text as follows using > the > text() function > > O alpha O beta O gamma > > where the "O" is pch 16 and filled with a specific color. > > Not sure if this is possible or not. > > Thanks, > Andrew > > [[alternative HTML version deleted]] > > ______________________________________________ > 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. > [[alternative HTML version deleted]] ______________________________________________ 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.