pals_help: Plotting palettes

View source: R/pals.R

pals_helpR Documentation

Plotting palettes

Description

Build line type, shape, and color palettes.

Usage

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()

Arguments

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 tot giving the number of unique values to be repeated until there are tot total values.

type

A character scalar from c('line.types', 'open.shapes', 'punc.shapes', 'fill.shapes','empty.shapes', 'solid.shapes', 'digit.shapes', 'digit.shapes0', 'letter.shapes', 'LETTER.shapes', 'colors.standard', 'colors.sensitive').

Details

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.

Value

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

Functions

  • 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).

See Also

Other plots: color_funs(), gg_help(), gr, markdown_help(), u2u_help()


j-martineau/uj documentation built on Sept. 14, 2024, 4:40 a.m.