Add and customise grid.

b_grid(p, focus = TRUE, lines = TRUE)

b_xgrid(p, show = TRUE, ...)

b_ygrid(p, show = TRUE, ...)

b_grid_line(p, value, label, axis = "x", position = NULL, class = NULL)

Arguments

p

an object of class billboard.

focus

show grids when focus.

lines

show lines.

show

set to show.

...

any other parameter.

value

axis value.

label

label of line.

axis

axis to draw on.

position

line position.

class

CSS class.

Examples

mtcars %>% b_board() %>% b_bar(disp) %>% b_bar(hp, axis = "y2") -> p # add grid p %>% b_xgrid() %>% b_ygrid() -> p p # add lines p %>% b_grid_line(8, "x = 8") %>% b_grid_line(25, "x = 25") %>% b_grid_line(max(mtcars$disp), "Max disp", axis = "y")