###### Plot Group two Individual learning success negative tone-frequency was presented with a probability of X percent ## can be used also for analysis of group three ## ####### R script ####### ###### R version 4.0.3 ###### ##### Learning Success ##### #### Plot #### setwd("XXX") LS=read.delim2("Group two Individual learning success negative tone-frequency was presented with a probability of 33 percent.txt") # LS=read.delim2("Group two Individual learning success negative tone-frequency was presented with a probability of 50 percent.txt") names(LS) str(LS) LS$animal<-as.factor(LS$animal) LS$correct_answer_in_percent<-as.numeric(LS$correct_answer_in_percent) str(LS) library("ggplot2") library(ggpubr) ILSPlot<-ggplot(LS, aes(x = experimental_day, y = correct_answer_in_percent, color = Tone))+ geom_line()+ geom_point()+ xlab("Experimental day")+ ylab("Correct nosepoke behavior [%]")+ geom_hline(yintercept=50,linetype="dashed", color = "black")+ scale_x_continuous(breaks = seq(min(as.numeric(LS$experimental_day)), max(as.numeric(LS$experimental_day)))) + facet_wrap(~ animal)+ theme(strip.text.x = element_text(size=18, color="black", face="bold"))+ theme(legend.position = "top") ILSPlot ggpar(ILSPlot, font.main = c(18, "bold"), font.x = c(18, "bold"), font.y = c(18, "bold"), font.caption = c(18, "bold"), font.legend = c(18, "bold"), font.tickslab = c(18, "bold"))