colors.plot: Plots R's 657 named colors for selection

Description Usage Arguments Details Value Author(s) References See Also Examples

Description

Plots R's 657 named colors for selection

Usage

1
2
colors.plot(locator = FALSE, cex.axis = 0.7)
colors.matrix()

Arguments

colors.plot:

locator

activates 'locator' for interactive selection of color names (default is FALSE)

cex.axis

change size of axes labels

colors.matrix has no arguments.

Details

The colors.plot function plots R's 657 named colors. If locator=TRUE then you can interactively point and click to select the colors for which you want names. To end selection, right click on the mouse and select 'Stop', then R returns the selected color names.

The colors.matrix function is used by colors.plot to create the matrix of color names that corresponds to the graph created by colors.plot. colors.matrix can be used alone to create the matrix of name without generating a plot. To see the matrix it must be assigned an object name and then displayed.

Value

colors.plot generates plot with R colors and, when locator=TRUE, returns matrix with graph coordinates and names of colors selected

colors.matrix quietly returns matrix of names

Author(s)

Tomas Aragon, aragon@berkeley.edu, http://www.phdata.science

References

none

See Also

colorbrewer.display, colorbrewer.palette, colorbrewer.data

colors

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
##creates matrix with color names
cm <- colors.matrix()
cm[1:3, 1:3]

##generates plot
colors.plot()

##generates plot and activates 'locator'
##don't run
##colors.plot(TRUE)

epitools documentation built on March 26, 2020, 9:14 p.m.