setColors.ggobi {Rggobi}R Documentation

Access color and hidden attributes of records.

Description

Usage

setColors.ggobi(colors, which = 1:length(colors), .data=1, .gobi=getDefaultGGobi())
getColors.ggobi(which, .data=1, .gobi=getDefaultGGobi())
setHiddenCases.ggobi(vals, which = 1:length(vals), .data = 1, .gobi=getDefaultGGobi())
getHiddenCases.ggobi(.data = 1, .gobi=getDefaultGGobi())

Arguments

colors color identifiers, either indices into the color map, or names of entries in the color map.
vals logical vector giving the settings for the records identified in the parallel vector of indices which.
which the indices of the records for which the color should be set. This vector is used in parallel with the colors argument. The i-th element of colors is applied to the record identified by the i-the element of which.
.data the identifier for the dataset whose records are to be set or queried. This can be an integer, name/string or an object of class ggobiDataset.
.gobi the ggobi instance identifier. This is used to resolve the dataset and is unecessary if an object of class ggobiDataset is supplied for the .data argument.

Value

Author(s)

Duncan Temple Lang

References

http://www.ggobi.org

See Also

getGlyphs.ggobi

Examples

  g <- ggobi(system.file("data", "flea.xml", package="Rggobi"), args="-noinit")
  g$getColors()
  g$setColors(rep(2, 74), which=1:nrow(g[[1]]))

   # now highlight a subset of the points
  g$setColors(rep(1, 74), which=1:32)

## Not run: 
# Update
   # Set the first 30 records to blue.
  g$setColors(rep("blue",30))  # no colornames for the moment

   # Set the colormap and then set the 
   # points.
  m <- g$getColorMap()
  m["green", 1] <- .5
  g$setColorMap(m)
  g$setColors(rep("green",30))
## End(Not run)

[Package Rggobi version 1.1-3 Index]