Learn R Programming

iNZightPlots (version 2.16.0)

emphasize_pal_colour: Emphasize a level or interval of a colour palette

Description

Emphasize a level or interval of a colour palette

Usage

emphasize_pal_colour(n, k, cat = TRUE, ncat = 5, fn)

Value

a colour palette, with one level emphasized (or range for numeric)

Arguments

n

the number of colours to draw from the palette

k

the index of the colour to emphasize

cat

logical indicator if palette is categorical or numeric

ncat

the number of intervals to use for continuous palettes

fn

the colour palette function to use

Author

Tom Elliott

Examples

Run this code
pal <- inzpalette("bright")
plot(1:5, pch = 19, col = emphasize_pal_colour(5, 2, fn = pal))

Run the code above in your browser using DataLab