[R] how to print "<=" in plot title

Peter Ehlers ehlers at ucalgary.ca
Tue Jun 28 19:52:07 CEST 2011


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) ))

?plotmath

Peter Ehlers

>
> Thanks
>
> John
>
> ______________________________________________
> 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.



More information about the R-help mailing list