wrGraph (version 1.3.7)

partitionPlot: Make matrix for layout to partition plotting area

Description

This function proposes a matrix for use with layout to arrange given number of plots to be placed on a page/plotting area. In certain instances the proposed layout may accomodate slightly more plots, eg nFig=5 can not be arranged in 2 or 3 columns without an empty last spot. Portrait (vertival) or lanscape (horizontal) layout proportions can be chosen. The user can also impose a given number of columns.

Usage

partitionPlot(
  nFig,
  returnMatr = TRUE,
  horiz = TRUE,
  figNcol = NULL,
  byrow = TRUE,
  silent = TRUE,
  debug = FALSE,
  callFrom = NULL
)

Value

matrix for use with layout or (if returnMatr=FALSE numeric vector with number of segements in x- an y-axis)

Arguments

nFig

(integer) number of figures to be arrages on single plotting surface (ie window or plotting device)

returnMatr

(logical) will return matrix ready for use by layout; returns vector with nRow and nCol if =FALSE

horiz

(logical) will priviledge horizontal layout if TRUE

figNcol

(integer) optional number of columns

byrow

(logical) toggle if output is in order of rows or columns (equivament to matrix

silent

(logical) suppress messages

debug

(logical) additonal messages for debugging

callFrom

(character) allows easier tracking of messages produced

See Also

Examples

Run this code
partitionPlot(5); partitionPlot(14,horiz=TRUE)

Run the code above in your browser using DataLab