Adds geom_hex()
of the projected data. Does not display hexagons in plotly
animations; will not work with animate_plotly()
.
A list of arguments to call inside of aes().
aesthetic mapping of the primary geom. For example,
geom_point(aes(color = my_fct, shape = my_fct))
becomes
aes_args = list(color = my_fct, shape = my_fct)
.
A list of static, identity arguments passed into
the primary geom. For instance,
geom_point(size = 2, alpha = .7)
becomes
identity_args = list(size = 2, alpha = .7)
.
Also passes more foundational arguments such as stat and position, though
these have been tested less.
A numeric or logical index of rows to subset to. Defaults to NULL, all observations.
Numeric vector giving number of bins in both vertical and horizontal directions. Defaults to 30.
Other ggtour proto functions:
append_fixed_y()
,
facet_wrap_tour()
,
ggtour()
,
proto_basis()
,
proto_default()
,
proto_density2d()
,
proto_density()
,
proto_highlight()
,
proto_hline0()
,
proto_origin()
,
proto_point()
,
proto_text()
library(spinifex)
raw <- ggplot2::diamonds
dat <- scale_sd(raw[1:10000, c(1, 5:6, 8:10)])
gt_path <- save_history(dat, grand_tour(), max = 3)
## 10000 rows is quite heavy to animate.
## Increase performance by aggregating many points into few hexagons
ggp <- ggtour(gt_path, dat) +
proto_basis() +
proto_hex(bins = 20)
#> Loading required namespace: hexbin
## Hexagons don't show up in plotly animation.
# \donttest{
animate_gganimate(ggp)
# }