Learn R Programming

ribiosPlot (version 1.3.0)

squareLayout: Plan a square/matrix layout of plots

Description

Plan a square/matrix layout of plots

Usage

squareLayout(n)

Value

A vector of integers of length 2. Can be passed to layout or mfrow in par to make the layout.

Arguments

n

Number of plots

Author

Jitao David Zhang <jitao_david.zhang@roche.com>

Examples

Run this code

  # \donttest{
    op <- par(mfrow=squareLayout(7))
    plot(1:5)
    plot(2:6)
    plot(3:7)
    plot(-9:-4)
    plot(8:5)
    plot(5:1)
    plot(1:9)
    par(op)
  # }

Run the code above in your browser using DataLab