[R] superscripts in xyplot labels

Paul Murrell p.murrell at auckland.ac.nz
Wed Jun 19 23:33:07 CEST 2002


Hi


>     YangR> R-helpers;
>     YangR> I tried to get a superscripted 3 in the following
>     YangR> xyplot example but failed:
> 
>     >> data(whiteside)
> 
>     >> xyplot(Gas ~ Temp | Insul, whiteside, panel =
>     YangR> function(x, y, ...) {
>     YangR> panel.xyplot(x, y, ...)
>     YangR> panel.lmline(x, y, ...)
>     YangR> }, xlab = "Average external temperature (deg. C)",
>     YangR> ylab = paste(paste("Gas consumption  (1000", expression(ft^3),")"), aspect
>     YangR> = "xy",
>     YangR> strip = function(...) strip.default(..., style = 1))
> 
>     YangR> It produces a label "Gas consumption (1000 ft^3)" for
>     YangR> y axis insted of a superscipted 3 as in plot(). Any
>     YangR> workaround to produce superscripts or subscripts for
>     YangR> labels in xyplot()?
> 
> no easy workaround.
> -- This is becoming a FAQ (hence CC to its maintainer) --
> 
> NO, currently you can't use any mathematical annotation as in
> help(plotmath) when using ``grid'' graphics.
> Lattice is relying on grid entirely.


You might want to hold off on that FAQ ... I have added mathematical
annotation to what will be the next version of grid.  There will have to
be a couple of minor changes to lattice to get this to propagate, but
this sort of thing should hopefully work for grid and lattice with R 1.6
(later this year).

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