
Plots R's 657 named colors for selection
colors.plot(locator = FALSE, cex.axis = 0.7)
colors.matrix()
activates 'locator' for interactive selection of color names (default is FALSE)
change size of axes labels
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
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.
none
# NOT RUN {
##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)
# }
Run the code above in your browser using DataLab