Plots R's 657 named colors for selection

Share:

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

Note

Visit http://medepi.com for the latest.

Author(s)

Tomas Aragon, aragon@berkeley.edu, http://www.medepi.com

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)

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.