grid: Customise grid

Description Usage Arguments Examples

Description

Add and customise grid.

Usage

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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
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")

JohnCoene/billboard documentation built on May 14, 2019, 2:39 p.m.