library(ggplot2) bp <- ggplot(PlantGrowth, aes(x=group, y=weight)) + geom_boxplot() bp
제목(Title)을 달면,
bp + ggtitle("Plant growth") # 혹은 bp + labs(title="Plant growth") # 제목이 길면 \n을 사용하여 여러 줄로 나누어서.... bp + labs(title = "Plant growth with\ndifferent treatments") # 줄 간격을 줄이고 굵은 텍스트 사용 bp + labs(title = "Plant growth with\ndifferent treatments") + theme(plot.title = element_text(lineheight=.8, face="bold"))
댓글