Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

layout.boxes

Generate a Row or Column Arrangement of Rectangles.


Description

A simple utility to generate a row or column of boxes (rectangles) for use in point-and-click panels.

Usage

layout.boxes(B, n, horizontal = FALSE, aspect = 0.5, usefrac = 0.9)

Arguments

B

Bounding rectangle for the boxes. An object of class "owin".

n

Integer. The number of boxes.

horizontal

Logical. If TRUE, arrange the boxes in a horizontal row. If FALSE (the default), arrange them in a vertical column.

aspect

Aspect ratio (height/width) of each box.

usefrac

Number between 0 and 1. The fraction of height or width of B that should be occupied by boxes.

Details

This simple utility generates a list of boxes (rectangles) inside the bounding box B arranged in a regular row or column. It is useful for generating the positions of the panel buttons in the function simplepanel.

Value

A list of rectangles.

Author(s)

and Rolf Turner r.turner@auckland.ac.nz

See Also

Examples

B <- owin(c(0,10),c(0,1))
  boxes <- layout.boxes(B, 5, horizontal=TRUE)
  plot(B, main="", col="blue")
  niets <- lapply(boxes, plot, add=TRUE, col="grey")

spatstat.geom

Geometrical Functionality of the 'spatstat' Family

v2.1-0
GPL (>= 2)
Authors
Adrian Baddeley [aut, cre], Rolf Turner [aut], Ege Rubak [aut], Tilman Davies [ctb], Ute Hahn [ctb], Abdollah Jalilian [ctb], Sebastian Meyer [ctb], Suman Rakshit [ctb], Dominic Schuhmacher [ctb], Rasmus Waagepetersen [ctb]
Initial release
2021-04-15

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.