Description Usage Arguments Details Value Examples
A discrete-palette function takes an integers, from 1 to
the maximum size of the palette, and returns a vector of character hex-codes.
You con use a discrete-palette function to
build a custom ggplot2 scale, using ggplot2::discrete_scale()
.
1 2 3 4 5 6 7 8 9 10 11 12 13 |
.fdisc |
|
... |
other arguments (not used). |
method |
|
These functions help you build, modify, and compose discrete-palette functions.
A discrete-palette function can be bounded or unbounded. A bounded function has a maxiumum number of possible colors, and is created from a series of hex-colors, for example, Tableau 10. An unbounded function is created from a continuous-palette function, thus has no maximum number of possible colors.
A discrete-palette function can be constructed using pev_fdisc()
; it takes
an argument .fdisc
, which can be one of:
character
A series of hex-codes, returns a bounded discrete-palette function.
pev_fcont
A continuous-palette function, to be discretized
according to method
("post"
or "panel"
).
This returns an unbounded discrete-palette function.
pev_fdisc
If you provide a pev_fdisc
, this is a no-op.
The print method for a pev_disc
function generates a plot of the palette.
The other functions that return continuous-palette functions are:
pev_fdisc_cvd()
Modify output to simulate color-vision deficiency.
pev_fdisc_reverse()
Reverse palette-function.
function
with S3 class pev_disc
,
when called with a numeric vector with values between 0 and 1,
returns the corresponding (hex-code) values.
1 2 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.