########################################################################### figure 5 ################### leaf concentration #2020 figure 5A df<- read.csv("2_field.csv") data<-df%>% filter(year== "2020") p1 <- ggplot(data=data, aes(x=factor(Date, level=c('2020/8/6', '2020/8/27', '2020/10/3')),y=leafN_concerntration, fill=factor(treatment,level=c('N0', 'N20', 'N60', 'N120', 'N180')))) + geom_bar(position = "dodge", stat="identity",colour = "black",size=0.3)+ geom_errorbar(aes(x = Date, y = leafN_concerntration, ymin = leafN_concerntration - leafN_concerntration_error, ymax = leafN_concerntration + leafN_concerntration_error), width = 0.3,size=0.3,position=position_dodge(.9)) + xlab(expression(paste(Date)))+ labs(y=expression(Leaf~N~concentration~("%")))+ mytheme2+ theme(legend.position = c(0.15, 0.85), legend.text = element_text(size = 8, family = "serif"), legend.title = element_text( size = 7), legend.key.size = unit(0.3, 'cm'))+ scale_y_continuous(expand = c(0,0),limits = c(0,10)) + labs(fill=' ')+ geom_text(label = c("b", "ab", "ab","a", "ab", "b", "a", "a", "a", "a", "b", "a", "ab", "ab", "ab"), family="serif", aes(y = leafN_concerntration + leafN_concerntration_error, x = Date), hjust = 0.45,vjust= -0.4, size = 3, position = position_dodge(width = 0.9), stat="identity")+ scale_fill_manual( values = c("#00AFBB", "#E7B800", "#FC4E07","cornflowerblue","violet"),name = NULL)+ theme( axis.title.y = element_text(vjust = 3,margin = margin(t =0, r = 0, b = 0, l = 0)), axis.title.x = element_text(vjust = -1,margin = margin(t =0, r = 0, b = 0, l = 0)))+ theme(plot.margin = unit(c(1,1,0.5,1), "cm")) # ("left", "top", "bottom", "right") p1 #2021 figure 5B data<-df%>% filter(year== "2021") data$cut1 = factor(data$cut, levels=c('First regrowth','Second regrowth','Third regrowth')) p2 <- ggplot(data=data, aes(x=factor(Date, level=c('2021/5/26', '2021/6/3', '2021/6/15', '2021/7/16','2021/7/30','2021/8/7','2021/9/24')),y=leafN_concerntration, fill=factor(treatment,level=c('N0', 'N20', 'N60', 'N120', 'N180')))) + facet_grid(. ~cut1, scales="free_x", space = "free") + geom_bar(position = "dodge", stat="identity",colour = "black",size=0.3)+ geom_errorbar(aes(x = Date, y = leafN_concerntration, ymin = leafN_concerntration - leafN_concerntration_error, ymax = leafN_concerntration + leafN_concerntration_error), width = 0.3,size=0.3,position=position_dodge(.9)) + xlab(expression(paste(Date)))+ labs(y=expression(Leaf~N~concentration~("%")))+ mytheme2+ theme(legend.position = c(0.08, 0.86), legend.text = element_text(size = 8, family = "serif"), legend.title = element_text( size = 7), legend.key.size = unit(0.3, 'cm'))+ scale_y_continuous(expand = c(0,0),limits = c(0,10)) + labs(fill=' ')+ geom_text(label = c("b", "ab", "ab","a", "b", "ab", "ab", "a", "b", "b", "a", "a", "a", "a", "a", "b", "ab", "a","a", "a", "a", "a", "a", "a", "a", "a", "a", "a", "a", "a", "a", "a", "a", "a", "a"), family="serif", aes(y = leafN_concerntration + leafN_concerntration_error, x = Date), hjust = 0.45,vjust= -0.4, size = 3, position = position_dodge(width = 0.9), stat="identity")+ scale_fill_manual( values = c("#00AFBB", "#E7B800", "#FC4E07","cornflowerblue","violet"),name = NULL)+ theme( axis.title.y = element_text(vjust = 3,margin = margin(t =0, r = 0, b = 0, l = 0)), axis.title.x = element_text(vjust = -1,margin = margin(t =0, r = 0, b = 0, l = 0)))+ theme(plot.margin = unit(c(1,1,0.5,1), "cm")) # ("left", "top", "bottom", "right") p2 LEAF <- cowplot::plot_grid(p1, p2, labels = "AUTO",label_fontfamily="serif",nrow = 1,rel_widths = c (1,2)) LEAF #############################stem n concentration #2020 figure 5C data<-df%>% filter(year== "2020") p1 <- ggplot(data=data, aes(x=factor(Date, level=c('2020/8/6', '2020/8/27', '2020/10/3')),y=stemN_concerntration, fill=factor(treatment,level=c('N0', 'N20', 'N60', 'N120', 'N180')))) + geom_bar(position = "dodge", stat="identity",colour = "black",size=0.3)+ geom_errorbar(aes(x = Date, y = stemN_concerntration, ymin = stemN_concerntration - stemN_concerntration_error, ymax = stemN_concerntration + stemN_concerntration_error), width = 0.3,size=0.3,position=position_dodge(.9)) + xlab(expression(paste(Date)))+ labs(y=expression(Stem~N~concentration~("%")))+ mytheme2+ theme(legend.position = c(0.15, 0.88), legend.text = element_text(size = 8, family = "serif"), legend.title = element_text( size = 7), legend.key.size = unit(0.3, 'cm'))+ scale_y_continuous(expand = c(0,0),limits = c(0,4)) + labs(fill=' ')+ geom_text(label = c("c", "bc", "ab","ab", "a", "a", "a", "a", "a", "a", "a", "a", "a", "a", "a"), family="serif", aes(y = stemN_concerntration + stemN_concerntration_error, x = Date), hjust = 0.45,vjust= -0.4, size = 3, position = position_dodge(width = 0.9), stat="identity")+ scale_fill_manual( values = c("#00AFBB", "#E7B800", "#FC4E07","cornflowerblue","violet"),name = NULL)+ theme( axis.title.y = element_text(vjust = 3,margin = margin(t =0, r =0, b = 0, l = 0)), axis.title.x = element_text(vjust = -1,margin = margin(t =0, r = 0, b = 0, l = 0)))+ theme(plot.margin = unit(c(1,1,0.5,1), "cm")) # ("left", "top", "bottom", "right") p1 #2021 figure 5D data<-df%>% filter(year== "2021") data$cut1 = factor(data$cut, levels=c('First regrowth','Second regrowth','Third regrowth')) p2 <- ggplot(data=data, aes(x=factor(Date, level=c('2021/5/26', '2021/6/3', '2021/6/15', '2021/7/16','2021/7/30','2021/8/7','2021/9/24')),y=stemN_concerntration, fill=factor(treatment,level=c('N0', 'N20', 'N60', 'N120', 'N180')))) + facet_grid(. ~cut1, scales="free_x", space = "free") + geom_bar(position = "dodge", stat="identity",colour = "black",size=0.3)+ geom_errorbar(aes(x = Date, y = stemN_concerntration, ymin = stemN_concerntration - stemN_concerntration_error, ymax = stemN_concerntration + stemN_concerntration_error), width = 0.3,size=0.3,position=position_dodge(.9)) + xlab(expression(paste(Date)))+ labs(y=expression(Stem~N~concentration~("%")))+ mytheme2+ theme(legend.position = c(0.05, 0.88), legend.text = element_text(size = 8, family = "serif"), legend.title = element_text( size = 7), legend.key.size = unit(0.3, 'cm'))+ scale_y_continuous(expand = c(0,0),limits = c(0,4)) + labs(fill=' ')+ geom_text(label = c("a", "a", "a","a", "a", "a", "a", "ab", "a", "b", "a", "a", "a", "a", "a", "a", "a", "a","a", "a", "a", "a", "a", "a", "a", "ab", "a", "a", "ab", "b", "a", "a", "a","a", "a"), family="serif", aes(y = stemN_concerntration + stemN_concerntration_error, x = Date), hjust = 0.45,vjust= -0.4, size = 3, position = position_dodge(width = 0.9), stat="identity")+ scale_fill_manual( values = c("#00AFBB", "#E7B800", "#FC4E07","cornflowerblue","violet"),name = NULL)+ theme( axis.title.y = element_text(vjust = 3,margin = margin(t =0, r = 0, b = 0, l = 0)), axis.title.x = element_text(vjust = -1,margin = margin(t =0, r = 0, b = 0, l = 0)))+ theme(plot.margin = unit(c(1,1,0.5,1), "cm")) # ("left", "top", "bottom", "right") p2 ##########hebing STEM <- cowplot::plot_grid(p1, p2, labels = c("C","D"),label_fontfamily="serif",nrow = 1,rel_widths = c (1,2)) STEM #2020 root figure 5E data<-df%>% filter(year== "2020") p1 <- ggplot(data=data, aes(x=factor(Date, level=c('2020/8/6', '2020/8/27', '2020/10/3')),y=rootN_concentration, fill=factor(treatment,level=c('N0', 'N20', 'N60', 'N120', 'N180')))) + geom_bar(position = "dodge", stat="identity",colour = "black",size=0.3)+ geom_errorbar(aes(x = Date, y = rootN_concentration, ymin = rootN_concentration - rootN_concentration_error, ymax = rootN_concentration + rootN_concentration_error), width = 0.3,size=0.3,position=position_dodge(.9)) + xlab(expression(paste(Date)))+ labs(y=expression(Root~N~concentration~("%")))+ mytheme2+ theme(legend.position = c(0.15, 0.85), legend.text = element_text(size = 8, family = "serif"), legend.title = element_text( size = 7), legend.key.size = unit(0.3, 'cm'))+ 小 scale_y_continuous(expand = c(0,0),limits = c(0,4)) + labs(fill=' ')+ geom_text(label = c("b", "a", "a","a", "a", "b", "ab", "ab", "a", "a", "a", "a", "a", "a", "a"), family="serif", aes(y = rootN_concentration + rootN_concentration_error, x = Date), hjust = 0.45,vjust= -0.4, size = 3, position = position_dodge(width = 0.9), stat="identity")+ scale_fill_manual( values = c("#00AFBB", "#E7B800", "#FC4E07","cornflowerblue","violet"),name = NULL)+ theme( axis.title.y = element_text(vjust = 3,margin = margin(t =0, r = 0, b = 0, l = 0)), axis.title.x = element_text(vjust = -1,margin = margin(t =0, r = 0, b = 0, l = 0)))+ theme(plot.margin = unit(c(1,1,0.5,1), "cm")) # ("left", "top", "bottom", "right" p1 ##################################root concentration # root figure 5F data<-df%>% filter(year== "2021") data$cut1 = factor(data$cut, levels=c('First regrowth','Second regrowth','Third regrowth')) p2 <- ggplot(data=data, aes(x=factor(Date, level=c('2021/5/26', '2021/6/3', '2021/6/15', '2021/7/16','2021/7/30','2021/8/7','2021/9/24')),y=rootN_concentration, fill=factor(treatment,level=c('N0', 'N20', 'N60', 'N120', 'N180')))) + facet_grid(. ~cut1, scales="free_x", space = "free") + geom_bar(position = "dodge", stat="identity",colour = "black",size=0.3)+ geom_errorbar(aes(x = Date, y = rootN_concentration, ymin = rootN_concentration - rootN_concentration_error, ymax = rootN_concentration + rootN_concentration_error), width = 0.3,size=0.3,position=position_dodge(.9)) + xlab(expression(paste(Date)))+ labs(y=expression(Root~N~concentration~("%")))+ mytheme2+ theme(legend.position = c(0.08, 0.87), legend.text = element_text(size = 8, family = "serif"), legend.title = element_text( size = 7), legend.key.size = unit(0.3, 'cm'))+ scale_y_continuous(expand = c(0,0),limits = c(0,4)) + labs(fill=' ')+ geom_text(label = c("b", "ab", "a","a", "a", "b", "ab", "ab", "a", "a","a", "a", "a", "a", "a", "b", "a", "a","a", "a", "b", "ab", "ab", "a", "a", "a", "a", "a", "a", "a", "a", "a", "a", "a", "a"),family="serif", aes(y = rootN_concentration + rootN_concentration_error, x = Date), hjust = 0.45,vjust= -0.4, size = 3, position = position_dodge(width = 0.9), stat="identity")+ scale_fill_manual( values = c("#00AFBB", "#E7B800", "#FC4E07","cornflowerblue","violet"),name = NULL)+ theme( axis.title.y = element_text(vjust = 3,margin = margin(t =0, r = 0, b = 0, l = 0)), axis.title.x = element_text(vjust = -1,margin = margin(t =0, r = 0, b = 0, l = 0)))+ theme(plot.margin = unit(c(1,1,0.5,1), "cm")) # ("left", "top", "bottom", "right") p2 ########## ROOT <- cowplot::plot_grid(p1, p2, labels = c("E","F"),label_fontfamily="serif",nrow = 1,rel_widths = c (1,2)) ROOT plot_all <- cowplot::plot_grid(LEAF, STEM, ROOT,labels = NULL,label_fontfamily="serif",nrow = 3) plot_all ggsave("paper_all_con_c.png", plot=plot_all, height=30, width=25, units="cm", dpi=600)