print.multipanelfigure: Print a multi-panel figure

View source: R/methods.R

print.multipanelfigureR Documentation

Print a multi-panel figure

Description

Prints and object of class multipanelfigure.

Usage

## S3 method for class 'multipanelfigure'
print(x, newpage = TRUE, ...)

Arguments

x

An object of class multipanelfigure.

newpage

Logical. If TRUE, a new device page is opened before drawing.

...

Passed from other print methods.

Value

The input x is invisibly returned, but the method is mostly invoked for the side effect of printing the plot to the current device.

References

Graumann, J., and Cotton, R.J. (2018). multipanelfigure: Simple Assembly of Multiple Plots and Images into a Compound Figure. Journal of Statistical Software 84. doi: 10.18637/jss.v084.c03

Examples

p <- lattice::xyplot(dist ~ speed, cars)
figure <- multi_panel_figure(
  width = 100, height = 100,
  rows = 1, columns = 1
)
# With no panels, printing shows the layout
print(figure)
figure <- fill_panel(figure, p)
# After a panel is added, printing shows the plot.
print(figure) # shows plot

multipanelfigure documentation built on Nov. 27, 2023, 5:08 p.m.