tags:

views:

83

answers:

1

Is it possible to have a datetime scale not consider weekends as part of the time continuum? For instance, if I am plotting stock prices over a 2 week period with a line geometry, I do not want to plot a 2 day period of flattness during the weekend. I would like friday to connect with Monday.

+1  A: 

I imagine that there's a better way, but you could always just use an index for the plot and then assign the dates as labels afterwards:

p <- qplot(1:3, 1:3, geom='line') 
p + scale_x_continuous("", breaks=1:3, labels = as.Date(c("2010-06-03", "2010-06-04", "2010-06-07")))
Shane
That's the only way I'm aware of.
hadley