add.layout.Rd
add.layout
creates or adds to a layout of non-overlapping
rectangles.
add.labels
is a front-end to add.layout
which creates a
layout suitable for labels allowing to adjust the placement of the label
with respect to the original points and to add extra margins.
add.layout(x, y, w, h, rs = 0.01, as = 0.22, ri = 0, ai = 0, l = NULL)
add.labels(x, y, txt, w, h, adj = 0.5, mar = 0.1, ...)
x coordinates of the points to add. For rectangles it is the left edge.
y coordinates of the points to add. For rectangles it is the bottom edge.
width of the rectangles (optional for labels where it defaults to the label widths)
height of the rectangles (optional for labels where it defaults to the label height)
radius step for the placement algorithm
angle step for the placement algorithm
initial radius for the placement algorithm
initial angle for the placement algorithm
layout to add to or NULL
if a new layout is to be
created
text labels to add
adjustment of the text position with respect to the
supplied points (see adj
in text
)
additional margins around the text (relative to the width or height). If present, it will be recycled to length two for horizontal and vertical margins respectively.
additional parameters passed through to add.layout
The layout attempts to sequentially place rectangles of the given width and height at the specified points. If a placement of a new rectangle would overlap with any existing rectangle, it is moved until it no longer overlaps. The current algorithm defines the movement as a clockwise spiral.
add.layout
returns an obejct of the class box.layout
which consists of a list with elements x
, y
, w
and h
. If the input was non-overlapping it would be equivalent
to the (recycled) arguments. If there are overlaps the x
and
y
coordinates will differ accordingly.
If l
is specified on input, it is expected to be
box.layout
as well and the layout is extended by adding the
rectangles defined in the arguments.
add.labels
returns an object of the class label.layout
which is a subclass of box.layout
. It adds the components
lx
and ly
which are the label coordinates (as opposed to
the rectangle coordinates). If adj
is zero the label and box
coordinates are equal.