rescaler_bezier | R Documentation |
Use this function to rescale a palette function, for example: clip a certain part of it.
rescaler_bezier(mat_luv, n = 21)
mat_luv |
|
n |
|
A rescaler function:
must accept input between zero and one.
must provide an output between zero and one.
the output must to vary monotonically with the input.
Use rescaler_linear()
create a new palette-function that uses part
of the range of an existing palette-function.
Use rescaler_bezier()
to rescale a Bézier palette-function to be more
perceptually uniform. This uses fits a spline to equally-spaced points on
the colorpath. The Bézier function makes some optimization calculations,
so it may take a few seconds to run.
A function with S3 class cpath_rescaler
.
# Input rescaler rlin <- rescaler_x(c(0.25, 0.75)) # print for a preview print(rlin) # evaluate rlin(c(0, 0.5, 1)) # Luminance rescaler pal_luv_blues <- pal_luv_bezier(mat_luv_blues) rlum <- rescaler_lum(c(40, 70), pal_luv_blues) # print for a preview print(rlum) # evaluate rlum(c(0, 0.5, 1))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.