Skip to content

Limiting number of tickmarks in lattice bwplot

2 messages · GL, David Winsemius

GL
#
Have a simple bwplot with 24 ordered factors across the x axis. I would like
to only label every 4th tick mark so that the labels fit. I tried
scales=list(x=list(tick.number=6)), but I still seem to get 24 tickmarks and
24 labels. Full code is below:


bwplot(SumOfIn.Use ~ Hour | Period,
scales=list(x=list(tick.number=6)),horizontal=FALSE,las=2,main="Rooms
Running",sub="Timeframe: 8/09 - 12/09",xlab="Hour of Day",ylab="Rooms
Running",ex.main=0.7,cex.axis=0.5,data=dbs.weekday,as.table=TRUE,layout=c(2,1))
#
On Jan 11, 2010, at 2:42 PM, GL wrote:

            
?bwplot  #first read argument tick.number, then see xlim as a result.

Perhaps adding:

  xlim=as.character(c( rep("",3), Period[4], rep("",3), Period[8],  
rep("",3), Period[12],rep("",3), Period[16],rep("",3),  
Period[20],rep("",3), Period[24]) )
David Winsemius, MD
Heritage Laboratories
West Hartford, CT