ggplot label code example
Example 1: change label x axis ggplot2
theme(
axis.title = element_text(),
axis.title.x = element_text(),
axis.title.x.top = element_text(),
axis.title.y = element_text(),
axis.title.y.right = element_text(),
)
Example 2: ggalluvial ggplot label
ggplot(vaccinations,
aes(x = survey, stratum = response, alluvium = subject, y = freq,
fill = response, label = response)) +
scale_x_discrete(expand = c(.1, 0)) +
geom_flow(width = 1/4) +
geom_stratum(alpha = .5, width = 1/4) +
ggfittext::geom_fit_text(stat = "stratum", width = 1/4, min.size = 3) +
theme(legend.position = "none") +
ggtitle("vaccination survey responses", "labeled using `geom_fit_text()`")