Hello, I am unable to get the greater-than-or-equal-to symbol (?) in a legend. I am able to get pi, squares, sqrt, but not this particular symbol. Can anyone tell me what I am doing wrong? legend(locator(n=1), legend = c("Observed", expression("Area < 5"* m^2), expression("Area >= 5"*m^2)), pch=c(1,16,4), bg="white") Much thanks in advance, Krista [[alternative HTML version deleted]]
On 6/5/05, Krista Chin <057448c at acadiau.ca> wrote:> Hello, > > I am unable to get the greater-than-or-equal-to symbol (?) in a legend. > I am able to get pi, squares, sqrt, but not this particular symbol. Can > anyone tell me what I am doing wrong? > > legend(locator(n=1), legend = c("Observed", expression("Area < 5"* m^2), > expression("Area >= 5"*m^2)), pch=c(1,16,4), bg="white") >Remove the quotes: legend(locator(n=1), legend = c("Observed", expression(Area < 5 * m^2), expression(Area >= 5*m^2)), pch=c(1,16,4), bg="white")
On Sun, 5 Jun 2005, Krista Chin wrote:> I am unable to get the greater-than-or-equal-to symbol (?) in a legend. > I am able to get pi, squares, sqrt, but not this particular symbol. Can > anyone tell me what I am doing wrong? > > legend(locator(n=1), legend = c("Observed", expression("Area < 5"* m^2), > expression("Area >= 5"*m^2)), pch=c(1,16,4), bg="white")You want >= as part of the expression, not part of a character string. I suspect expression(Area >= 5*m^2) is what you intended. -- Brian D. Ripley, ripley at stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UK Fax: +44 1865 272595