library(purrr)
library(ggplot2)
# updating geom defaults (like default color of a point or fill for bar)
purrr::walk(
hdx_geom_defaults(),
~ do.call(what = ggplot2::update_geom_defaults, args = .),
)
p <- ggplot(mtcars) +
geom_point(
aes(
x = mpg,
y = hp
)
)
# see the points are automatically in HDX sapphire
p
# need to reset back to the default geometries
purrr::walk(
ggplot2_geom_defaults(),
~ do.call(what = ggplot2::update_geom_defaults, args = .)
)
# now the points are back to default black
p
Run the code above in your browser using DataLab