Skip to content
Prev 342913 / 398506 Next

lattice scales format dates

On Aug 6, 2014, at 1:11 PM, Folkes, Michael wrote:

            
Which says very little about barchart in particular but rather refers you to 

?panel.barchart

It's really designed expecting  x to be a factor,
Probably would have if you were using xyplot. But barchart's author assumed that the "x-axis" is a set of disjoint values and that's not really how datetimes are generally considered. Try this:

 barchart(var1~factor(format(date.val, "%Y-%b")), data=dat, horizontal=F,
          scales=list(x=list(rot=45) ) )
And learn to post in plain text.
David Winsemius
Alameda, CA, USA