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

Description Usage Arguments Examples

Description

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

Usage

1
2
3
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

1
2
3
4
5
## 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)

dvmlls/bdscale documentation built on May 15, 2019, 6:20 p.m.