In package ggmosaic
, how to add weight percent label to the columns ? I want to add the percent value of each column (every column totla percent equalt 100%). Thanks!
library(tidyverse)
library(ggmosaic)
ggplot(data = titanic) +
geom_mosaic(aes(x = product(Class), fill = Survived)) +
geom_mosaic_text(size=5,aes(x = product(Class), fill = Survived))