Reproducible example
set.seed(1)
df <- data.frame(A=rep(c("good","bad"),each=8),
B=rep(c("yes","no"),4),
C=sample(1:20,16),
stringsAsFactors=F) %>%
group_by(A,B)
Question
I'd like to change the font size of the titles from facet_wrap ('bad' 'good')
ggplot(df, aes(x=B, y=C)) +
geom_violin() +
geom_point() +
facet_wrap(~A, nrow=1) +
theme_classic() +
theme( axis.text = element_text( size = 14 ),
axis.text.x = element_text( size = 20 ),
axis.title = element_text( size = 16, face = "bold" ),
legend.position="none" )
Any ideas? Thanks!