I would like to chance the distances between groups in an alluvial diagram using ggplot2
and ggalluvial
my example is from https://corybrunson.github.io/ggalluvial/articles/ggalluvial.html
data(vaccinations)
levels(vaccinations$response) <- rev(levels(vaccinations$response))
ggplot(vaccinations,
aes(x = survey, stratum = response, alluvium = subject,
y = freq,
fill = response, label = response)) +
scale_x_discrete(expand = c(.1, .1)) +
geom_flow() +
geom_stratum(alpha = .5) +
geom_text(stat = "stratum", size = 3) +
theme(legend.position = "none") +
ggtitle("vaccination survey responses at three points in time")
gives me:
Now I would like to shorten the distance between ms153_NSA while keeping the same distance between ms432_NSA and ms460_NSA:
I tried to use following (without success):
https://rdrr.io/cran/ggalluvial/man/stat_flow.html
How to increase the space between the bars in a bar plot in ggplot2?
Even google does not show me an asymmetrical alluvial diagram: :'-/