Split the chart into planes according to variables.

planes(
  g,
  asp,
  ...,
  type = c("rect", "list", "matrix", "circle", "tree", "mirror"),
  sync = TRUE
)

Arguments

g

An object of class g2r or g2Proxy as returned by g2() or g2_proxy().

asp

Aspects that define split, these must be defined as a formula, e.g.: ~x+y.

...

Any other option.

type

Type of planes to use.

sync

Whether to sync the aspects used for the planes with others used elsewhere, similar to that of fig_point().

Examples

g2(iris, asp(Sepal.Length, Sepal.Width, color = Species)) %>%
  fig_point() %>%
  planes(~Species, type = "tree")