On Jun 28, 2011, at 1:52 PM, Peter Ehlers wrote:
On 2011-06-28 10:25, array chip wrote:
Hi, how can I print "<=" (I mean the symbol of just one character)
in the main
title of a plot?
for example:
plot(1:10, main=paste("x<=", x))
where variable x is some number generated on the fly.
x <- 2.718
plot(0, 0)
title(bquote( x %<=% .(x) ))
I think John wants the mathematical symbol. As was pointed out in a
question last week, the `<=` plotmath symbol needs to be flanked by
operands. Non-printing operands can be created with the phantom
function:
title(main=expression(phantom("")<=phantom("")) )
Contrary to Gunters's comment, this is probably going to work on all
the three major OS platforms. It depends only on whether there is a
Symbol font mapped to the output device.
?plotmath
Yes. The details are there.
Peter Ehlers
David Winsemius, MD
West Hartford, CT
______________________________________________
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.