R语言可视化包ggplot2包设置轴标签的位置实战:ggplot2包设置x轴标签的位置、ggplot2包设置x轴标签的位置(添加一个边距margin)、ggplot2包设置y轴标签的位置
目录
#ggplot2包设置x轴标签的位置(添加一个边距margin)
#ggplot2包设置轴标签的位置语法
请注意,我们可以为margin参数指定t、r、b、l,它代表top、right、bottom和left。
theme(axis.title.x = element_text(margin=margin(t=20)), #add margin to x-axis title
axis.title.y = element_text(margin=margin(r=60))) #add margin to y-axis title