Description Usage Arguments Aesthetics Cosmetic Tips Also See Examples
View source: R/stat_waterfall.R
Plot a time series as a waterfall plot
1 2 |
mapping |
mapping |
data |
data |
show.legend |
legend |
inherit.aes |
logical |
na.rm |
logical |
bandwidth |
bandwidth |
... |
more functions A waterfall plot highlights the change in the time series rather than the value of the time series itself. |
stat_waterfall needs x, y
The minimalist look can be achieved by appending the
following chunk of code to the output object:
+
xlab(NULL) +
ylab(NULL) +
theme(
axis.text = element_blank(),
axis.ticks = element_blank(),
legend.position = 'none',
strip.background = element_blank(),
plot.background = element_blank(),
panel.background = element_blank(),
panel.border = element_blank(),
panel.grid = element_blank(),
panel.border = element_blank()
)
ggplot_waterfall
, a
flexible but less polished alternative.
1 2 3 4 5 6 | {
library(ggplot2)
set.seed(1)
dfData = data.frame(x = 1:20, y = cumsum(rnorm(20)))
ggplot(dfData, aes(x =x, y = y) )+
stat_waterfall()}
|
Loading required package: ggplot2
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.