将位置偏移添加到R';GGS图
在R中,我目前有这个将位置偏移添加到R';GGS图,r,ggplot2,plot,data-visualization,R,Ggplot2,Plot,Data Visualization,在R中,我目前有这个ggplot: 我想把标题放在广场中央,像这样: 我查看了?元素\u文本,但没有位置/偏移设置。如何在ggplot中移动偏移x轴?可以尝试使用我添加的主题() library(ggplot2) #Code ggplot(iris,aes(x=Species,y=Sepal.Length))+ geom_boxplot(aes(fill=Species))+ theme(axis.text.x = element_text(angle = 90,vjust = 0.
ggplot
:
我想把标题放在广场中央,像这样:
我查看了
?元素\u文本
,但没有位置/偏移设置。如何在ggplot
中移动偏移x轴?可以尝试使用我添加的主题()
library(ggplot2)
#Code
ggplot(iris,aes(x=Species,y=Sepal.Length))+
geom_boxplot(aes(fill=Species))+
theme(axis.text.x = element_text(angle = 90,vjust = 0.5))
输出:
也许可以尝试使用我添加的主题()
library(ggplot2)
#Code
ggplot(iris,aes(x=Species,y=Sepal.Length))+
geom_boxplot(aes(fill=Species))+
theme(axis.text.x = element_text(angle = 90,vjust = 0.5))
输出: