Description Usage Arguments Details Value References See Also Examples
Functions to fit litmus objects to vectors of data.
1 2 |
x |
A numeric vector. |
colvs |
A 3-column or 4-column numeric matrix, where each row is one color vector, and the optional fourth column is alpha values. |
color.space |
A string giving the color space, refer to the details section for litmus objects. |
reverse |
Logical, reverse the order of the colors. |
equalize |
Numeric, between zero and one, refer to details. |
na.color |
A single string representing an R color. |
... |
Ignored. |
Refer to the litmus function for background information.
The litmus.fit function constructs a litmus object.
Given n colors, it computes a length-n vector of knots computed from a vector of data.
If equalize is zero, the knots are equally spaced from the lowest x value to the highest. If equalize is one, then knots are selected, such that there's an approximately equal number of points between each pair of knots. And equalization values between zero and one result in an intermediate effect.
Note that high equalize values (higher than the default) may cause color interpolation to appear less smooth.
In general, it's easiest to wrap the litmus.fit function inside another function.
All functions return litmus objects, except the hot.and.cold function which returns a mlitmus object.
Refer to the vignette for an overview, references and better examples.
Main Plotting Functions
Functional Versions
Which take a function as their main argument.
Global Options
litmus, mlitmus
Predefined Litmus Objects, Predefined Litmus-Fitting Functions
With predefined colors.
1 2 3 4 5 6 7 8 9 10 11 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.