[R] bwplot title size

S Ellison S.Ellison at LGCGroup.com
Fri Dec 9 13:16:08 CET 2011

Check the Intro page for Lattice and note the bit that says 'In particular, changing par() settings usually has no effect on Lattice plots'

By and large, lattice uses things like cex inside a list of options and only in a few cases (when passed to panel.bwplot) does it use what look like traditional graphics parameters directly.

To change title font details (and indeed many other settings) you need to change things using trellis.par.set or provide a list of settings in the par.settings argument to the top-level function. Example for your problem:

  Depth <- equal.count(quakes$depth, number=8, overlap=.1)
  xyplot(lat ~ long | Depth, data = quakes, main='Earthquakes', par.settings=list(par.main.text=list(cex=2)))

S Ellison

> -----Original Message-----
> From: r-help-bounces at r-project.org 
> [mailto:r-help-bounces at r-project.org] On Behalf Of g_l
> Sent: 08 December 2011 19:36
> To: r-help at r-project.org
> Subject: [R] bwplot title size
> Using the statement below to draw a plot. The title size 
> doesn't seem to change regardless of what value I put in for 
> cex.main. How do I reduce the size of the title?
> #print distributions by Month
> bwplot(RoomsInUse  ~ Hour | Month, scales=list(x=list(rot=90)),
>   horizontal=FALSE,las=2,main=title,sub=tag,xlab="Hour of Day",
>   ylab="Rooms Running",cex.sub = 0.5, cex.main = 0.5, 
> cex.axis=0.5,data=df.final,as.table=TRUE,
>   layout=c(2,3))
> --
> View this message in context: 
> http://r.789695.n4.nabble.com/bwplot-title-size-tp4173955p4173955.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.
> *******************************************************************
This email and any attachments are confidential. Any use...{{dropped:8}}

More information about the R-help mailing list