Skip to content
Snippets Groups Projects
Commit 39990cd2 authored by Joanes Grandjean's avatar Joanes Grandjean
Browse files

beautify test plot

parent 1d4fd663
No related branches found
No related tags found
No related merge requests found
......@@ -17,7 +17,7 @@ library(ggpubr)
```
```{r}
df <- read_csv('C:/Users/xiamen/Desktop/data_for_R/modified_robogator_paper/robotmod_data.csv') %>%
df <- read_csv('robotmod_data.csv') %>%
mutate(trials = as.factor(trials)) %>%
mutate(group = as.factor(group)) %>%
mutate(sex = as.factor(sex)) %>%
......@@ -68,12 +68,13 @@ df <- read_csv('C:/Users/xiamen/Desktop/data_for_R/modified_robogator_paper/robo
df.SD_Rday1 <- df %>% filter(df$robot.day == 1, df$group == "SD")
p_1 <- ggplot(df.SD_Rday1, aes(x=trials, y=foraging.score, group=rat_ID))
p_1 + geom_point(color="gray")+ geom_line(color="gray")+
stat_summary(fun=mean, aes(group = age, color= age), geom="line")+
p_1 + 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("red", "blue"))+
scale_color_manual(values = c("#7fc97f", "#fdc086"))+
scale_y_continuous(breaks = seq(0, 7, by = 1))+
geom_jitter(alpha = 0.5,width = 0.1) + labs(x = "positions", y = "foraging score") + theme_minimal()
labs(x = "positions", y = "foraging score") + theme_classic() + facet_wrap(~age, ncol=2)
```
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