Plot a continuous color legend for the diverging color scheme.

plot_continuous_legend(
  min = -3,
  max = 3,
  neutral_min = -0.5,
  neutral_max = 0.5,
  low = "#7f0000",
  mid = "#ffffff",
  high = "#006400",
  n = 801,
  unit = 1,
  title = "Z"
)

Arguments

min

Minimum value that maps to the darkest red (values below are clipped).

max

Maximum value that maps to the darkest green (values above are clipped).

neutral_min

Minimum value of the white "dead zone" (values above are colored white).

neutral_max

Maximum value of the white "dead zone" (values below are colored white).

low

Color for low end (default dark red).

mid

Color for midpoint (default white).

high

Color for high end (default dark green).

n

Number of discrete colors used internally for the gradient.

title

Title for the legend.

Value

A plot of the color legend.