icontainer {Acinonyx}R Documentation

Creates a new interactive container


icontainer creates a new interactive container. Containers are used to group interactive visual objects (such as plots) and can be nested.


icontainer(parent = NULL, window, frame, flags)



parent container to register with. If NULL this container is created on its own.


window to place this container into. If not specified a window is created and filled with this container.


numeric vector of the form c(x, y, with, height) specifying the size and location of the container


flags defining the behavior of this container when the parent container of window are resized


Containers can contain any visual object in the iPlots eXtreme graphics system. Most commonly such objects are plots, R graphics devices or further containers. The flags of each obejct define how it will respond to resize events. Containers automatically handle the resizing of their children.

The model for resizing is that each object can choose to fix its borders with respect to any of the four sides of its parent. Any sides that are not fixed will grow proportinally. The default is to be fixed to all four sides (or from the other point of view full expansion in both directions) which simply fills all available space.

The currently supported flags are:


fixed at the top


fixed at the bottom


fixed at the left margin


fixed at the right margin


expands along the x axis (by fixing both ends) - same as c("fix.left","fix.right")


expands along the y axis (by fixing both ends) - same as c("fix.top","fix.bottom")


expands in all directions (by attaching all four margins) - same as the combination of all fix attributes above

The window parameter can be either NULL is which case a new window is created and filled with the container (the size of the window is thus defined by the size of the container) or FALSE in which case an off-screen container is created to be attached to a window later or a window object (of the clas iWindow).


Object of the class iContainer.


Operations on the container object are by default not followed by an implicit redraw (as is the case for plots) to allow contruction of complex layouts without unnecessary redraws. Please use redraw after all components have been added to a container.

See Also

iplot, redraw


# create a container (implicitly creates a new window)
a = icontainer(frame=c(0,0,400,300))

# create some random plots off-screen (window=FALSE)
x = rnorm(1000)
y = rnorm(1000)
p = iplot(x, y, window=FALSE, frame=c(0,0,200,300),
q = iplot(y, x, window=FALSE, frame=c(200,0,200,300),

# add the plots to the container and redraw
redraw(a + p + q)

[Package Acinonyx version 3.0-0 Index]