Add rugs

fig_rug(g2, ..., x_axis = TRUE, y_axis = TRUE, opacity = 0.5,
  data = NULL, inherit_asp = TRUE, name = NULL)

Arguments

g2

An object of class g2r as returned by g2r.

...

Any option, aesthetic (asp), or animation (Animation).

x_axis, y_axis

Whether to show the ruf on the x and y axis.

opacity

Opacity of individual ticks, passed to asp.

data

A data.frame containing data to chart or a list.

inherit_asp

Whether to inherit aspects from g2r.

name

Name of figure, useful to apply functions to specific figures.

Examples

cars2 <- cars %>% dplyr::bind_rows(cars) %>% dplyr::mutate( speed = jitter(speed), dist = jitter(dist) ) g2(cars2, asp(speed, dist)) %>% fig_point() %>% fig_rug()