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.

Rainbow

waterfall_density(rdistrs(20), rainbow(7))

Heatmap

waterfall_density(rdistrs(20), colorRampPalette(c("red", "orange"))(8))

Yellow

waterfall_density(rdistrs(20), colorRampPalette(c("yellow", "yellow4"))(9))

Blue

waterfall_density(rdistrs(20), colorRampPalette(c("royalblue", "royalblue4"))(10))

Purple

waterfall_density(rdistrs(20), colorRampPalette(c("purple", "purple4"))(11))

Green

waterfall_density(rdistrs(20), colorRampPalette(c("green2", "green4"))(12))

Pulsar style

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)


AndreyAkinshin/ggwaterfall documentation built on June 23, 2019, 12:01 a.m.