Splits the chart into a grid of panels, one per unique value of the faceting variable. Each panel shows the same layers filtered to that subset of the data.
Arguments
- myIO
A myIO widget object.
- var
Character. Column name to facet by. Must exist in at least one layer's data.
- ncol
Integer or NULL. Number of columns in the grid. If NULL, auto-computes from
min_widthand container width.- min_width
Numeric. Minimum panel width in pixels when
ncolis NULL. Default 200.- scales
Character. Scale sharing mode:
"fixed"– all panels share x and y scales (default)"free_x"– independent x scales per panel"free_y"– independent y scales per panel"free"– independent x and y scales per panel
- label_position
Character. Where to show panel labels:
"top"(default) or"bottom".
Examples
myIO(iris) |>
addIoLayer("point", label = "pts",
mapping = list(x_var = "Sepal.Length", y_var = "Sepal.Width")) |>
setFacet("Species", ncol = 3)
