Q1PlotViolinE1 <-
ggplot(data = Q1_filtered, aes(x = Condition, y = general_empathy,
fill = Condition, color = Condition))+
ggdist::stat_halfeye( # for distributions
xmax = 3, # creates distance between them - the max height
adjust = 1, # adjust bandwidth
justification = -.3, # less close to boxplot
alpha = 0.6,
# remove the slub interval
.width = 0,
point_colour = NA) +
geom_boxplot(color = "black",
width = 0.25,
# removing outliers
outlier.color = NA,
alpha = 0.8)+
ggdist::stat_dots(aes(fill = Condition), side = "left",
justification = (1.2),
binwidth = 0.15, overflow = "compress")+
scale_color_manual(values = c("indianred1","darkturquoise"))+
scale_fill_manual(values = c("indianred1","darkturquoise"))+
theme(axis.text.x = element_text(face = "bold", size = 13),
legend.position = "none")+
#geom_point(aes(fill = Condition),shape=21, position=position_jitterdodge(0.2), inherit.aes = T)+
stat_summary(geom = "errorbar", fun.data = mean_cl_normal,
position = position_dodge(.75), linewidth=.3, width =.1, colour="black")+
stat_summary(fun=mean, geom="point",
shape=4, size=2, colour="black",
position = position_dodge(0.75))+
xlab("Condition")+
ylim(c(0,11))+
ylab("General Empathy")+
theme_classic() +
ggtitle("Effect of Condition on Perceived Empathy")
Q1PlotViolinE1