R: Lattice: modifying fonts

From MathWiki

Example:


 td( col = c('black','black'), lwd = 4, cex = 1.5, lty = c(1,2), pch = c(16,17))
 trellis.par.set( list( axis.text = list(font=6),par.xlab.text=list(font=6)) )
 xyplot( Specific + Generic ~ stage, pred, 
       auto.key = list(text= c("Single Event","Generic"),font=6,columns = 2,lines = T), type = 'b', lwd = 2,
       scales = list( x=list(alternating =  1)),
       ylab=list("Proportion of ABM Subtypes",font=6),
       xlab=list("Stage of Therapy", font=6))


An alternative that also changes fonts in shingles is:


xyplot( Aro.peak.n ~ EEpropSE | stage, pred,  lwd = 3, groups = Outcome,
    type = 'l', auto.key = list(columns=2, lines = T, points=F),
    ylab = "Peak Arousal",
    xlab = list("Proportion of Single-Event ABM",fontfamily='serif'),
    par.settings = list( grid.pars = list(fontfamily = 'serif')),
    layout = c(3,1))