# 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) Plot_input$Treatment=factor(Plot_input$Treatment,levels = c()) # insert row names in c() brackets: "Control", "Treatment group", "Treatment group 2", etc. ggplot(Plot_input, 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, na.rm = TRUE, shape = "diamond", color = "black", size =.5) + # Will create a point at the mean # 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") + # mean_sdl computes mean +/- a constant times the standard deviation stat_summary(fun.data = mean_sdl, fun.args = list(mult =1), na.rm = TRUE, geom = "errorbar", width = .2, color = "black" )+ # mean_sdl defaults to 2 standard deviations so use fun.args = list(mult =1) to change it to 1 standard deviation. # You can change the shape color and size of the error bars 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