get_layout_mat: Get the best layout matrix for a given number of panes per...

Description Usage Arguments Value

View source: R/get_layout_mat.R

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

1
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

A layout matrix with positions for each element in num_panes and zeros filling the rest of the rectangle where nothing will be plotted.


cape documentation built on Feb. 10, 2021, 5:06 p.m.