Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

print.multipanelfigure

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

Infrastructure to Assemble Multi-Panel Figures (from Grobs)

v2.1.2
GPL (>= 3)
Authors
Johannes Graumann [cre, aut], Richard Cotton [ctb]
Initial release
2020-03-04

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.