ggplot2作图将Y轴的标签放到右边
正常坐标轴都是位于左边和下边,如果要改成上边或者右边可以使用如下代码
正常
library(ggplot2)
dfR^2==0.56))+
theme(plot.title = element_text(hjust=0.5))
?...image.png
ggplot2更改绘图边界
library(ggplot2)
ggplot()+
geom_point(aes(x=1,y=1))+
labs(title=expression...(R^2==0.56))+
theme(plot.title = element_text(hjust=0.5),
plot.margin = unit(c(1,4,1,1),"lines...image.png
四个位置 控制的分别是上右下 左
数据分组排序
> df<-data.frame(group=c("A","A","A","B","B","B"),
+