All, I am trying to put a few special symbols into a string to place on a graph (e.g., >= and superscript 2). This clearly works, but does not look good: text<-c("x2", "A>=B") I tried pasting in the >= symbol, but just comes out as an =. I have tried expression() with no luck: text<-c("x2", expression(x^2)) Any help appreciated. Thanks, Gerard [[alternative HTML version deleted]]
See ?plotmath Example: plot(1:10); text(4:5, 5:4, c(expression(A >= B), expression(x^2))) Uwe Ligges On 14.03.2010 16:38, Gerard Smits wrote:> All, > > I am trying to put a few special symbols into a string to place on a graph (e.g.,>= and superscript 2). > > This clearly works, but does not look good: text<-c("x2", "A>=B") > > I tried pasting in the>= symbol, but just comes out as an =. > > I have tried expression() with no luck: text<-c("x2", expression(x^2)) > > Any help appreciated. > > Thanks, > > Gerard > [[alternative HTML version deleted]] > > ______________________________________________ > R-help at 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.
See ?plotmath, especially the examples. S>>> Gerard Smits <g_smits at verizon.net> 03/14/10 3:38 PM >>>All, I am trying to put a few special symbols into a string to place on a graph (e.g., >= and superscript 2). This clearly works, but does not look good: text<-c("x2", "A>=B") I tried pasting in the >= symbol, but just comes out as an =. I have tried expression() with no luck: text<-c("x2", expression(x^2)) Any help appreciated. Thanks, Gerard [[alternative HTML version deleted]] ______________________________________________ R-help at 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. ******************************************************************* This email and any attachments are confidential. Any use...{{dropped:8}}