[R] Mixed font in lattice xyplot lables

baptiste auguie baptiste.auguie at googlemail.com
Sat Sep 26 18:25:49 CEST 2009


Hi,

I think you are feeding two expressions to xlab instead of one.

Try this instead,

xyplot(y ~ x, dat,xlab=expression("Moran's " * italic(I)))


HTH,

baptiste

2009/9/26 Andrewjohnclose <a.j.close at ncl.ac.uk>:
>
> Hi all, can anyone suggest a reason as mto why my xlab is plotting this text
> at oposite ends of axis. I would like to represent my lable like this:
> Moran's I ...but with the I in italics. For some reason they seperate and
> position at oposite ends of the axis??
>
> Thank you
>
> library(lattice)
> dat <- data.frame(x = rnorm(10),y = rnorm(10))
> xyplot(y ~ x, dat,xlab=expression("Moran's ",italic("I")))
> --
> View this message in context: http://www.nabble.com/Mixed-font-in-lattice-xyplot-lables-tp25626332p25626332.html
> Sent from the R help mailing list archive at Nabble.com.
>
> ______________________________________________
> 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