ggline with grouping: dodging separates mean and ci (not wanted)

Hello there,
I have problems with the dodging function when using add="mean_ci" in the ggline-function: It also separates means and their corresponding ci (that is obviously not what I want, I want them to stay together).

Below, I post my code and the plot:

df <- KombiGD0102_long
df$MZP <- as.factor(df$MZP)
df$Bed_new <- as.factor(df$Bed_new)
ggline(
  df, x="MZP", y="gd", group="Bed_new",
  color="Bed_new", palette = c("blue", "blue", "red", "red"),
  linetype="Bed_new",
  add="mean_ci",
  position = position_dodge(0.5)
  )+
scale_linetype_manual(values=c(44, 13, 44, 13))+
ylab("belonging goal desirability")+
xlab("time of measurement")+
scale_y_continuous(breaks=c(0, 20, 40, 60, 80, 100))+
coord_cartesian(ylim = c(0,100), xlim = c(1, 3))

Is there anyone who can help me to fix this? I want mean and ci fixed together, but separated from other means/cis.

Thank you in advantage!

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.