How can I break the the y axis not starting from 0 in my plot? I guess it can't be done with ggplot. Any other solutions?
My ggplot:
ggplot(allEvents %>% dplyr::filter(FixationID>1,FixationID<15), aes(FixationID, Fixation)) +
geom_line(stat="summary", fun.y=mean, position="identity") + theme_bw() + stat_summary(fun.data=mean_se)+
labs (x = "Ordinal fixation number", y = "Fixation duration (s)") +
scale_y_continuous (name="Fixation duration (s) ", limits=c(0.1, 0.4)) +
scale_x_continuous (name="Ordinal fixation number", breaks=c(5,10,15,20)) +
geom_smooth(method=lm)
Excerpt from my data:
structure(list(Fixation = c(0.383, 0.185, NA, 0.312, NA, 0.328,
NA, 0.259, NA, 0.335), FixationID = c(1, 2, NA, 3, NA, 4, NA,
5, NA, 6)), .Names = c("Fixation", "FixationID"), row.names = c(NA,
10L), class = "data.frame")