scale_x_bd {bdscale}R Documentation

Weekend- and holiday-ignoring position scale for a ggplot.

Description

Weekend- and holiday-ignoring position scale for a ggplot.

Usage

scale_x_bd(..., business.dates, max.major.breaks = 5,
  max.minor.breaks = max.major.breaks * 5,
  breaks = bd_breaks(business.dates))

Arguments

...

other arguments passed to continuous_scale

business.dates

a vector of Date objects, sorted ascending

max.major.breaks

maximum major breaks bd_breaks will return, default=5

max.minor.breaks

maximum minor breaks bd_breaks will return, default=major*5

breaks

a function max => [date range] => breaks

Examples


## Not run: 
 ggplot(ts, aes(x=date, y=price)) + 
   scale_x_bd(business.dates=yahoo('SPY'), max.major.breaks=10, labels=date_format("%b '%y"))

## End(Not run)


[Package bdscale version 2.0.0 Index]