我认为这可以归结为的重大变化ggplot2 https://github.com/hadley/ggplot2/releases/tag/v2.0.0.
这里有几个选项。第一个使用点shape='-'
对于单杠。第二种用途geom_errorbar
正如您之前使用的那样,但是通过stat_summary
.
ggplot(data, aes(x=Day, y=CorrectedIntensity)) +
ylim(-2.5, 0.5) +
# data points
geom_point(size=7, colour="royalblue3", alpha=0.30) +
# +/- standard deviation
stat_summary(fun.data=function(...) mean_sdl(..., mult=1),
geom='errorbar', width=0.1, color='royalblue3') +
# points for mean, using hyphens for point shape
stat_summary(fun=mean, colour='royalblue3', geom='point', shape='-', size=30) +
# line connecting means
stat_summary(fun=mean, colour='royalblue3', geom='line', aes(group=1), lty=2)
ggplot(data, aes(x=Day, y=CorrectedIntensity)) +
ylim(-2.5, 0.5) +
# data points
geom_point(size=7, colour="royalblue3", alpha=0.30) +
# +/- standard deviation
stat_summary(fun.data=function(...) mean_sdl(..., mult=1),
geom='errorbar', width=0.1, color='royalblue3') +
# lines for means, using geom=errorbar
stat_summary(fun=mean, aes(ymin=..y.., ymax=..y..),
geom='errorbar', width=0.3, color='royalblue3', size=1.25) +
# line connecting means
stat_summary(fun=mean, colour='royalblue3', geom='line', aes(group=1), lty=2)