setBrushLocation.ggobi {Rggobi}R Documentation

Gets or sets the location and/or dimension of the selection region of a ggobi dataset.

Description

This allows the user to query and set the location and size of the brushing region of a ggobi dataset.

Usage

setBrushLocation.ggobi(x, y, .data = 1, .gobi=getDefaultGGobi(), update=TRUE, units=0)
getBrushLocation.ggobi(.data = 1, .gobi=getDefaultGGobi(), units=0)
setBrushSize.ggobi(w, h, .data=1, .gobi=getDefaultGGobi(), update = TRUE, units=0)
getBrushSize.ggobi(.data=1, .gobi=getDefaultGGobi(), units=0)

Arguments

x the x coordinate at which to locate the brushing region (in pixels)
y the x coordinate at which to locate the brushing region (in pixels)
w the width to which to set the brushing region (in pixels)
h the height to which to set the brushing region (in pixels)
.data the dataset identifier for which the brush should be set or queried. This can be a simple index or an object of class ggobiDataset. If the latter is set, no value for .gobi need be specified.
.gobi the identifier for the ggobi instance in which the dataset can be resolved. This can be either an index identifying the ggobi instance by order, or an object of class ggobi returned from a call to ggobi or getGGobi.
update whether to force the recomputation of the points within the brushing region and the updating of the display giving the number of points within this region. This is often supressed when changing both location and size in two separate actions.
units currently ignored, but will allow specification of what units

Details

Value

Note

The settings are in pixel coordinates relative to the plot and not the coordinates of the data being plotted. In the future, we will provide functions to map between these different units.

Author(s)

Duncan Temple Lang

References

http://www.ggobi.org

See Also

getSelectedIndices.ggobi getBrushColor.ggobi setBrushColor.ggobi getBrushGlyph.ggobi setBrushGlyph.ggobi

Examples

 g <- ggobi(system.file("data", "flea.xml", package="Rggobi"), args="-noinit")
 g$setMode("Brush"); 
 g$setBrushLocation(50, 50); 
 g$setBrushSize(100, 50); 
 g$getSelectedIndices()

[Package Rggobi version 1.1-3 Index]