print.multipanelfigure
Print a multi-panel figure
Prints and object of class multipanelfigure
.
Usage
# S3 method for 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
# NOT RUN {
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
# }
Community examples
Looks like there are no examples yet.