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.