knitr::opts_chunk$set( collapse = TRUE, comment = "#>", fig.width = 5 )
library(ggwaterfall)
With the help of the palette
argument (the second argument of
waterfall_density
and waterfall_ft
) allows you to customize the fill colors
of your plot.
Below you can find several nice looking color palettes.
waterfall_density(rdistrs(20), rainbow(7))
waterfall_density(rdistrs(20), colorRampPalette(c("red", "orange"))(8))
waterfall_density(rdistrs(20), colorRampPalette(c("yellow", "yellow4"))(9))
waterfall_density(rdistrs(20), colorRampPalette(c("royalblue", "royalblue4"))(10))
waterfall_density(rdistrs(20), colorRampPalette(c("purple", "purple4"))(11))
waterfall_density(rdistrs(20), colorRampPalette(c("green2", "green4"))(12))
With the help of style.pulsar
, you can apply the plot style which is similar
to the iconic plot of a pulsar and the
"Unknown Pleasures" Joy
Division album cover. If it's true, the values of palette
, bg
, col
,
alpha
, show.axis
, show.underline
will be ignored because they will be
overriden by special values which are specific for the pulsar style images.
waterfall_density(rdistrs(20), style.pulsar = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.