[R] lattice x(y)lab and expression

Deepayan Sarkar deepayansarkar at yahoo.com
Mon Apr 22 23:13:37 CEST 2002


--- Sundar Dorai-Raj <sundard at pdf.com> wrote:
> Another question about lattice:
> 
> Is there a way to use plotmath in the labels and strips?


Not at present, since grid doesn't support it yet, but there are plans to
implement this in future. The closest you can get now is by using font=5 for
Greek, but I don't think it can be combined with other fonts, so that might not
be very useful.


> E.g.
> 
> xyplot(y~x|group,data=test.df,
>        panel=function(x,y,subscripts,df) {
>          llines(x,y,col="black",lwd=2)
>          llines(x,df[subscripts,"lowerCI"],lty=2,col="#aaaaaa")
>          llines(x,df[subscripts,"upperCI"],lty=2,col="#aaaaaa")
>        },
>        strip=function(...) {
>          # not sure what to put here
>          # but I would like something like
>          # substitute(gamma[r]==2*pi*r,list(r=group))
>          strip.default(strip.names=c(F,F),...)
>        },
>        par.strip.text=list(col="white",font=7),
>        xlab=expression(rho),                     # this is ignored
>        ylab=expression(f[r]*group("(",rho,")"))  # this is ignored
>        df=test.df,as.table=T)
> 
> -- 
> 
> Sundar Dorai-Raj, Ph.D.
> Statistical Methods Engineer
> PDF Solutions, Inc.
> (972) 889-3085 x216
> (214) 392-7619 cell
> sundard at pdf.com
>
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
> 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
>
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._


__________________________________________________

Yahoo! Games - play chess, backgammon, pool and more

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