Skip to contents

Returns a consistent color scale for diverging data (e.g., correlations, loadings). Uses a diverging palette centered at zero.

Usage

scale_fill_mixsynergy_diverging(
  option = "RdBu",
  midpoint = 0,
  limits = NULL,
  ...
)

Arguments

option

Viridis color option for diverging scale (default: "RdBu")

midpoint

Midpoint value for diverging scale (default: 0)

limits

Limits for the color scale (default: NULL for automatic)

...

Additional arguments passed to scale_fill_gradient2()

Value

A ggplot2 scale object

Examples

if (FALSE) { # \dontrun{
library(ggplot2)
ggplot(data, aes(x, y, fill = correlation)) + 
  geom_tile() + 
  scale_fill_mixsynergy_diverging()
} # }