The color palette of official SomaLogic risk categories/trends.
Usage
palette_soma_risk(direction = 4, n)
scale_color_soma_risk(direction = 4, ...)
scale_fill_soma_risk(direction = 4, ...)
scale_continuous_color_soma_risk(
low = soma_colors_risk$green,
high = soma_colors_risk$red,
...
)
scale_continuous_fill_soma_risk(
low = soma_colors_risk$green,
high = soma_colors_risk$red,
...
)Arguments
- direction
Captures both number of colors and direction of those colors based on soma_colors_risk colors, which are currently 5 colors from high to low risk. The palette is recycled as necessary. A positive number maintains order from high (red) to low (green) risk. A negative number reverses that order. There is special handling for
n = 2, 3, and 4colors for both directions. For more custom ordering, usescale_color_manual()orscale_fill_manual()with the soma_colors_risk colors.- n
Not currently used. Included to make palette function work with
scale_color_soma_risk()andscale_fill_soma_risk().- ...
Arguments passed to
ggplot2::discrete_scale(),ggplot2::scale_fill_gradient(), orggplot2::scale_color_gradient().- low, high
Colours for low and high ends of the gradient.
Functions
scale_color_soma_risk(): color discrete scale for risk categories.scale_fill_soma_risk(): fill discrete scale for risk categories.scale_continuous_color_soma_risk(): color continuous scale for risk trends. Currently implemented for 2 colors (high risk red to low risk green). Multiple colors can be done in a gradient withscale_color_gradientn().scale_continuous_fill_soma_risk(): fill continuous scale for risk trends.
See also
Other palettes:
style-gender,
style-greys,
style-soma
