[R] Symbol escape sequence in xlab

Paul Murrell p.murrell at auckland.ac.nz
Thu Nov 22 23:11:09 CET 2001


Hi


> I would like to label an x-axis with the nabla symbol. I have tried this
> with the following symbol escape sequence
>
>      plot(1:5, 1:5, xlab=""); title(xlab="\\dl", vfont=c("serif symbol",
> "plain"))
>
> but I got the warning message
>
>      parameter "vfont" couldn't be set in high-level plot() function
>
> Is it possible to use a symbol escape sequence in xlab?


Unfortunately not.  Hershey fonts are yet to be implemented for text in the
plot margins.  A not-very-nice work around is to use text() with a bit of
trial-and-error to get the positioning right.  For example,

    plot(1:5, 1:5, xlab="")
    par(xpd=NA)
    text(3, .3, "\\dl", vfont=c("serif symbol", "plain"))

Paul


-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list