showColors: Display colours in a collection

Description Usage Arguments Value Examples

Description

Display colours in a collection

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
showColors(fill, ...)

## Default S3 method:
showColors(
  fill,
  labels = if (length(fill) <= 25) {     if (!is.null(names(fill)))         
    names(fill)     else fill } else NA,
  border = colour,
  colour = color,
  color = if (length(fill) <= 20) "grey" else "transparent",
  edges = 1000,
  radius = 1,
  ...,
  n = length(fill)
)

## S3 method for class ''function''
showColors(fill, ..., n = 20)

showColours(fill, ...)

Arguments

fill

either a palette function or a vector of colours to display

...

arguments to be passed on to methods

border, colour, color

alternative names to use for the colour of the borders

edges

integer: no of edges to use for the inner circle

radius

numeric: value to use for the radius of the circular display

n

number of colours to use for a palette display

Value

the vector of colours used in the display, invisibly.

Examples

1
2
3
4
showColors(pal_desert)
pal <- myPalette(pink, beige, 'sky blue')
showColours(pal)
showColours(pal, n = 50)

BillVenables/WWRGraphics documentation built on Feb. 1, 2021, 12:13 p.m.