Get colors for elements according to their bin.
Colors are assigned to bins forming a gradient from col1
to col2 in the order of levels{b}. col0 is assigned
to the neutral bin (attribute "") if available.
Arguments
- b
A factor that groups elements into bins (typically the output of
bin).- col1
First color.
- col2
Second color.
- col0
Neutral color.
See also
bin.