Learn R Programming

autoimage (version 2.2.3)

autosize: Automatically select plot matrix dimensions

Description

autosize automatically makes a sensible choice for the dimensions of a plot matrix based on n, the number of plots. Only works for n <= 36. The dimensions are chosen to be as close to a square as possible.

Usage

autosize(n)

Arguments

n

The number of plots. Should be a positive integer.

Value

A vector of length 2 with the number of rows and number of columns for the plot matrix.

Examples

Run this code
# NOT RUN {
autosize(3)
autosize(9)
autosize(11)
autosize(24)
# }

Run the code above in your browser using DataLab