ggalluvial: Alluvial diagrams in ggplot2
> library(ggalluvial)
バージョン: 0.1
関数名 | 概略 |
---|---|
alluvium |
Alluvial flows |
get_axes |
Identify axis columns |
ggalluvial |
Quick alluvial diagram |
stratum |
Variable axes and strata |
zigzag |
Zigzag outward order |
alluvium
> ggplot(as.data.frame(Titanic),
+ aes(weight = Freq, axis1 = Class, axis2 = Sex)) +
+ geom_alluvium()
>
> # omitting weight (defaults to 1)
> ggplot(as.data.frame(Titanic),
+ aes(axis1 = Class, axis2 = Sex)) +
+ geom_alluvium() +
+ geom_stratum() + geom_text(stat = "stratum")
stratum
> ggplot(as.data.frame(Titanic),
+ aes(weight = Freq, axis1 = Class, axis2 = Sex)) +
+ geom_stratum()