Generate a Row or Column Arrangement of Rectangles.
A simple utility to generate a row or column of boxes (rectangles) for use in point-and-click panels.
layout.boxes(B, n, horizontal = FALSE, aspect = 0.5, usefrac = 0.9)
B |
Bounding rectangle for the boxes.
An object of class |
n |
Integer. The number of boxes. |
horizontal |
Logical. If |
aspect |
Aspect ratio (height/width) of each box. |
usefrac |
Number between 0 and 1. The
fraction of height or width of |
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
.
A list of rectangles.
Adrian Baddeley Adrian.Baddeley@curtin.edu.au
and Rolf Turner r.turner@auckland.ac.nz
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")
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.