Adds a vertical/horizontal line with an intercept of 0, scaled to the data frame.

proto_hline0(identity_args = list(color = "grey80", size = 0.5, alpha = 0.9))

proto_vline0(identity_args = list(color = "grey80", size = 0.5, alpha = 0.9))

Arguments

identity_args

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.

Examples

library(spinifex)
dat  <- scale_sd(penguins_na.rm[, 1:4])
clas <- penguins_na.rm$species

## 2D case:
gt_path <- save_history(dat, grand_tour(), max_bases = 5)
ggt <- ggtour(gt_path, dat, angle = .1) +
  proto_point(list(color = clas, shape = clas)) +
  proto_hline0() + ## horizonatal line at 0
  proto_vline0()   ## vertical line at 0
# \donttest{
animate_plotly(ggt)
#> Warning: `gather_()` was deprecated in tidyr 1.2.0.
#> Please use `gather()` instead.
#> This warning is displayed once every 8 hours.
#> Call `lifecycle::last_lifecycle_warnings()` to see where this warning was generated.
# }