divergentColors | R Documentation |
Creates a palette for the current session for a divergent-colour graphic with a non-symmetric range. Based on ideas from Maureen Kennedy, Nick Povak, and Alina Cansler.
divergentColors(
start.color,
end.color,
min.value,
max.value,
mid.value = 0,
mid.color = "white"
)
## S4 method for signature 'character,character,numeric,numeric'
divergentColors(
start.color,
end.color,
min.value,
max.value,
mid.value = 0,
mid.color = "white"
)
start.color |
Start colour to be passed to |
end.color |
End colour to be passed to |
min.value |
Numeric minimum value corresponding to |
max.value |
Numeric maximum value corresponding to |
mid.value |
Numeric middle value corresponding to |
mid.color |
Middle colour to be passed to |
A diverging colour palette.
Eliot McIntire and Alex Chubaty
colorRampPalette()
divergentColors("darkred", "darkblue", -10, 10, 0, "white")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.