get.layout.mat:
Get the best layout matrix for a given number of panes per page.
Description
This function is for automatically deciding how to lay out multiple images per page. It takes as an argument the number of images the user wants on a single page and returns the most square matrix possible.
Usage
get.layout.mat(num.panes, type = c("landscape", "upright"))
Arguments
num.panes
The number of images to plot per page.
type
A character vector specifying whether the layout matrix should have more columns than rows ("landscape"), or more rows than columns ("upright"), if the resulting matrix is not square.
Value
Returns a matrix that can be used as a layout matrix by the function layout