| scale_divergent | R Documentation |
Wrapper around ggplot's scale_colour_gradient2 with
inverted defaults of high and low.
scale_colour_divergent(
...,
low = scales::muted("blue"),
mid = "white",
high = scales::muted("red"),
midpoint = 0,
space = "Lab",
na.value = "grey50",
guide = "colourbar"
)
scale_color_divergent(
...,
low = scales::muted("blue"),
mid = "white",
high = scales::muted("red"),
midpoint = 0,
space = "Lab",
na.value = "grey50",
guide = "colourbar"
)
scale_fill_divergent(
...,
low = scales::muted("blue"),
mid = "white",
high = scales::muted("red"),
midpoint = 0,
space = "Lab",
na.value = "grey50",
guide = "colourbar"
)
Other ggplot2 helpers:
MakeBreaks(),
WrapCircular(),
geom_arrow(),
geom_contour2(),
geom_contour_fill(),
geom_label_contour(),
geom_relief(),
geom_streamline(),
guide_colourstrip(),
map_labels,
reverselog_trans(),
scale_longitude,
stat_na(),
stat_subset()
library(ggplot2)
ggplot(reshape2::melt(volcano), aes(Var1, Var2, z = value)) +
geom_contour(aes(color = after_stat(level))) +
scale_colour_divergent(midpoint = 130)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.