stat_waterfall {ggTimeSeries} | R Documentation |
Plot a time series as a waterfall plot
Description
Plot a time series as a waterfall plot
Usage
stat_waterfall(mapping = NULL, data = NULL, show.legend = NA,
inherit.aes = TRUE, na.rm = T, bandwidth = NULL, ...)
Arguments
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. |
Aesthetics
stat_waterfall needs x, y
Cosmetic Tips
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()
)
Also See
ggplot_waterfall
, a
flexible but less polished alternative.
Examples
{
library(ggplot2)
set.seed(1)
dfData = data.frame(x = 1:20, y = cumsum(rnorm(20)))
ggplot(dfData, aes(x =x, y = y) )+
stat_waterfall()}
[Package ggTimeSeries version 1.0.2 Index]