g_train_layout: Learn the layout of panels within a plot.

View source: R/panel.r

g_train_layoutR Documentation

Learn the layout of panels within a plot.

Description

This is determined by the facet, which returns a data frame, than when joined to the data to be plotted tells us which panel it should appear in, where that panel appears in the grid, and what scales it uses.

Usage

g_train_layout(panel, facet, data, plot_data)

Arguments

panel

the panel object to train

facet

the facetting specification

data

a list of data frames (one for each layer), and one for the plot

plot_data

the default data frame

Details

As well as the layout info, this function also adds empty lists in which to house the x and y scales.

Value

an updated panel object


animint2 documentation built on Nov. 22, 2023, 1:07 a.m.