Skip to content
Snippets Groups Projects
Commit b72a8239 authored by Xianzong Meng's avatar Xianzong Meng
Browse files

export with size

parent c1dce758
No related branches found
No related tags found
No related merge requests found
......@@ -73,21 +73,20 @@ SD_Rday1_sum<-df.SD_Rday1 %>% group_by(trials, age) %>% summarize(percentage = s
fig1a <-ggbarplot(SD_Rday1_sum, x="trials", y="percentage",
color = "age", palette = c("#7fc97f", "#fdc086"),
size = 2, ylab = "foraging success [%]",
position = position_dodge(0.8))
position = position_dodge(1))
p_1b <- ggplot(df.SD_Rday1, aes(x=trials, y=foraging.score, group=rat_ID))
fig1b<-p_1b + geom_line(color="gray", alpha=0.2)+
fig1b<- ggplot(df.SD_Rday1, aes(x=trials, y=foraging.score, group=rat_ID)) + geom_line(color="gray", alpha=0.2)+
stat_summary(fun=mean, aes(group = age, color= age), geom="line", linewidth=2)+
stat_summary(fun.data = mean_se, aes(group=age, color = age), geom = "errorbar", alpha=1, width=0.05)+
scale_color_manual(values = c("#7fc97f", "#fdc086"))+
scale_y_continuous(breaks = seq(0, 7, by = 1))+
labs(x = "positions", y = "foraging score") + theme_classic() + facet_wrap(~age, ncol=2)
ggarrange(fig1a, fig1b, ncols=2,labels=c('A','B'), common.legend=TRUE, widths=c(1,2))
Fig1a_1b <- ggarrange(fig1a, fig1b, ncols=2,labels=c('A','B'), common.legend=TRUE,legend="right", widths=c(1,2))
Fig1a_1b
ggsave('C:/Users/xiamen/Desktop/modified robogator/result figs/Fig1a_1b.svg', plot = Fig1a_1b, device = 'svg',dpi = 300, width = 176, height = 140, units = "mm")
```
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment