Learn R Programming

RnavGraph (version 0.1.8)

ng_set_color<-: Change colors of data points in an active navGraph session

Description

Specify new colors for each point for an active navGraph session.

Usage

ng_set_color(obj, dataName) <- value

Arguments

obj
A navgraph handler of an active navGraph session.
dataName
String of the data name. If not specified and only one data set is beeing used in the navGraph session, it will default to this data. Otherwise, if multiple data sets are being used in a navGraph session, the function will list the name of these data sets and ask you to specify one.
value
Replacement vector or single value specifing valid colors.

See Also

navGraph, ng_get_color, ng_set_size<-, ng_get_size

Examples

Run this code
## Define a NG_data object
ng.iris <- ng_data(name = "IrisData", data = iris[,1:4])

## start a navGraph session
nav <- navGraph(ng.iris)

## set all point to red
ng_set_color(nav, "IrisData") <- 'red'

Run the code above in your browser using DataLab