pev_fcont_reverse: Reverse palette-function

Description Usage Arguments Value Examples

View source: R/reverse.R

Description

Reverse palette-function

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
pev_fcont_reverse(.fcont, ...)

## Default S3 method:
pev_fcont_reverse(.fcont, ...)

## S3 method for class 'pev_fcont'
pev_fcont_reverse(.fcont, ...)

pev_fdisc_reverse(.fdisc, ...)

## Default S3 method:
pev_fdisc_reverse(.fdisc, ...)

## S3 method for class 'pev_funbounded'
pev_fdisc_reverse(.fdisc, ...)

## S3 method for class 'pev_fbounded'
pev_fdisc_reverse(.fdisc, ...)

Arguments

.fcont

object that can be coerced to pev_fcont, when called with a numeric vector with values between 0 and 1, returns the corresponding (hex-code) values.

...

Other args (not used)

.fdisc

object that can be coerced to pev_fdisc, when called with an integer, returns the corresponding (hex-code) values.

Value

Object of of the same type as .fpal; a palette function, with S3 class pev_fcont or pev_fdisc.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
  # Create continuous diverging-palette function
  fcont_purple_green <- pev_fcont("Purple-Green")
  fcont_purple_green

  # Create discrete diverging-palette function
  fdisc_purple_green <- pev_fdisc(fcont_purple_green, n = 11)
  fdisc_purple_green

  # Reverse the palettes
  pev_fcont_reverse(fcont_purple_green)
  pev_fdisc_reverse(fdisc_purple_green)

ijlyttle/paleval documentation built on Dec. 25, 2019, 9:17 a.m.