pals_help | R Documentation |
Build line type, shape, and color palettes.
pals_help()
line_types(tot, unq = min(9, tot))
fill_shapes(tot, unq = min(5, tot))
open_shapes(tot, unq = min(5, tot))
punc_shapes(tot, unq = min(7, tot))
empty_shapes(tot, unq = min(5, tot))
solid_shapes(tot, unq = min(4, tot))
digit_shapes(tot, unq = min(9, tot))
digit_shapes0(tot, unq = min(10, tot))
letter_shapes(tot, unq = min(26, tot))
LETTER_shapes(tot, unq = min(26, tot))
colors_dark(tot, unq = min(6, tot))
colors_bright(tot, unq = min(6, tot))
colors_sensitive(tot, unq = min(12, tot))
build_palette(type, tot, unq)
blank_shape()
tot |
A complete positive whole-number scalar indicating the number of values to return. |
unq |
A positive whole-number scalar less than or equal to |
type |
A character scalar from |
The functions in this family create palettes of various types from values of source vectors as defined below:
Function | Palette type | Source |
colors_sensitive | 6 dark + 6 bright colorblind sensitive colors | v(colors.sensitive) |
colors_bright | 6 colorblind sensitive bright colors | v(colors.bright) |
colors_dark | 6 colorblind-sensitive dark colors | v(colors.dark) |
line_types | line types | v(line.types) |
open_shapes | + x ~ ^ v < > as shapes | v(open.shapes) |
punc_shapes | ! @ # $ % & ? as shapes | v(punc.shapes) |
fill_shapes | The 5 R fillable shapes | v(fill.shapes) |
empty_shapes | The 5 R empty shapes | v(empty.shapes) |
solid_shapes | The 4 R solid shapes | v(solid.shapes) |
digit_shapes | 1 to 9 as shapes | v(digit.shapes) |
digit_shapes0 | 0 to 9 as shapes | v(digit.shapes0) |
letter_shapes | a to z as shapes | v(letter.shapes) |
LETTER_shapes | A to Z as shapes | v(LETTER.shapes) |
build_palette | any of the above | any of the above |
blank_shape | Space as a shape | v(blank.shape) |
NOTE: unq
defaults to the smaller of tot
or the number of unique values available for the palette. If unq
is larger than the number of unique values available for the palette, an error is generated, except in create_palette
where unq
is reduced to the number of available unique values if necessary.
A positive whole number vector
fill_shapes
, open_shapes
, punc_shapes
, empty_shapes
, solid_shapes
, digit_shapes
, digit_shapes0
, letter_shapes
, LETTER_shapes,
and possibly build_palette
A character vector
line_types
, colors_dark
, colors_bright
, colors_sensitive
and possibly build_palette
A positive whole number scalar
blank_shape
line_types()
: Returns a linetype palette composed of up to 9 unique linetypes. Sourced from v(line.types)
. Consists of solid, 4 on 2 off dashed, 2 on 2 off dashed, 1 on 1 off dotted, 4 on 1 off 1 on 1 off dash-dotted, 2 on 1 off 1 on 1 off dash-dotted, 1 on 1 off 1 on 4 off dotted, 1 on 1 off 1 on 2 off dotted, and 1 on 4 off 4 on 1 off dot-dashed.
fill_shapes()
: Returns a palette of fillable plotting shapes composed of up to 5 unique shapes. Sourced from v(fill.shapes)
. Consists of circle, square, up triangle, down triangle, diamond.
open_shapes()
: Returns a palette of open plotting shapes composed of up to 5 unique shapes. Sourced from v(open.shapes)
. Consists of +
, ^
,v
, <
, and >
shapes.
punc_shapes()
: Returns a palette of punctuation-based plotting shapes composed of up to 7 unique shapes. Sourced from v(punc.shapes)
. Consists of !
, @
, #
, $
, %
, &
, and ?
shapes.
empty_shapes()
: Returns a palette of empty (unfilled) plotting shapes composed of up to 5 unique shapes. Sourced from v(empty.shapes)
. Consists of empty circle, square, up triangle, down triangle, and diamond.
solid_shapes()
: Returns a palette of solid plotting shapes consisting of up to 4 unique shapes. Sourced from v(solid.shapes)
. Consists of circle, square, up triangle, and diamond shapes.
digit_shapes()
: Returns a palette of digit character plotting shapes consisting of up to 9 unique shapes. Sourced from v(digit.shapes)
. Consists of the numerals from 1
to 9
.
digit_shapes0()
: Returns a palette of digit character plotting shapes consisting of up to 10 unique shapes. Sourced from v(digit.shapes0)
. Consists of numerals from 0
to 9
.
letter_shapes()
: Returns a palette of lowercase letter plotting shapes consisting of up to 26 unique shapes. Sourced from v(letter.shapes)
. Consists of English lowercase letters.
LETTER_shapes()
: Returns a palette of uppercase letter plotting shapes consisting of up to 26 unique shapes. Sourced from v(letter.shapes)
. Consists of English uppercase letters.
colors_dark()
: Returns a palette of dark hexademical plotting colors consisting of up to 6 unique colors. Sources from v(.HexColorVals)$colors.dark
. Consists of dark blue, orange, magenta, cyan, red-orange and grey-green.
colors_bright()
: Returns a palette of bright hexademical plotting colors consisting of up to 6 unique colors. Sources from v(.HexColorVals)$colors.bright
. Consists of bright blue, orange, magenta, cyan, red-orange and grey-green.
colors_sensitive()
: Returns a palette of dark and bright hexademical plotting colors sensitive to most forms of colorblindness consisting of up to 12 unique colors. Sources from v(.HexColorVals)$colors.sensitive
. Consists of dark, then bright blue, orange, magenta, cyan, red-orange and grey-green.
build_palette()
: Builds a plotting palette of any type, where type
is one of c('colors.dark', 'colors.bright', 'colors.sensitive', 'line.types', 'letter.shapes', 'LETTER.shapes', 'digit.shapes0', 'digit.shapes', 'open.shapes', 'punc.shapes', 'empty.shapes', 'fill.shapes', 'solid.shapes')
.
blank_shape()
: Returns a shape that prints nothing on a plot (i.e., a space as a plotting symbol).
Other plots:
color_funs()
,
gg_help()
,
gr
,
markdown_help()
,
u2u_help()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.