This is a small helper used to specify a single area in a rectangular grid
that should contain a plot. Objects constructed with cell()
can be
concatenated together with c()
in order to specify multiple areas.
cell(t, l, b = t, r = l)
The top and bottom bounds of the area in the grid
The left and right bounds of the area int the grid
A plot_cell
object
The grid that the cells are specified in reference to enumerate rows from top
to bottom, and coloumns from left to right. This means that t
and l
should always be less or equal to b
and r
respectively. Instead of
specifying cell placement with a combination of cell()
calls, it is
possible to instead pass in a single string
cells <- c(cell(1, 1, 2, 1), cell(2, 3, 3, 3))
is equivalent to
cells < -"A## A#B ##B"
For an example of this, see the plot_layout()
examples.