# input file should be in the format: Treatment groups, Values # For Example: # Treatment Value # Control ##### # Treatment ##### # Control ##### # Treatment 2 ##### # ETC. library(readxl) Plot_input <- read_excel("") # Insert file location in "" in the brackets library(ggplot2) library(dplyr) library(plotrix) Plot_input$Treatment=factor(Plot_input$Treatment,levels = c()) # insert row names in c() brackets: "Control", "Treatment group", "Treatment group 2", etc grouped_df2<-group_by() # Insert into brackets: Plot_input, Treatment, value summarised_df2<-summarise_each(grouped_df2,funs(mean=mean,std_error=std.error)) limits <- aes(ymax = mean + std_error, ymin=mean-std_error) ggplot(Plot_input,mapping=aes(x=, y=, color=Treatment)) + #Insert column name: I.E. X= Treatment, y= Value geom_point(position = position_jitter(width = .2)) + # You can change the point jitter by adjusting the vales scale_color_manual (values = c())+ # Insert the color you want into c(): I.E. using hex color codes: "Control" = '#b2a5cd' # It will create a legend in the order you write the treatment groups. stat_summary(fun = mean, fun.min = function(x) mean(x) - sd(x)/sqrt(length(x)), fun.max = function(x) mean(x) + sd(x)/sqrt(length(x)), geom = 'errorbar', width = 0.25,color="black")+ # Will create a point at the mean +/- SEM # You can change the shape color and size of the point by adjusting the vales. xlab('Treatment') + theme_classic() + stat_summary(fun=mean, na.rm = TRUE, shape = "diamond", color = "black") + # You can change the shape color and size of the point by adjusting the vales scale_y_continuous(breaks = seq(), limits = c()) # breaks = seq(X, Y, Z) set the Y scale: X= lower limit labeled, Y = upper limit labeled, Z = Divisions in between # limits = c(X, Y) set the Y scale: X= lower limit displayed, Y = upper limit displayed