jitter

R: How to jitter both geom_line and geom_point in ggplot2 linegraph?

馋奶兔 提交于 2019-11-30 08:16:22
问题 I have a ggplot2 linegraph with two lines featuring significant overlap. I'm trying to use position_jitterdodge() so that they are more visible, but I can't get the lines and points to both jitter in the same way. I'm trying to jitter the points and line horizontally only (as I don't want to suggest any change on the y-axis). Here is an MWE: ## Create data frames dimension <- factor(c("A", "B", "C", "D")) df <- data.frame("dimension" = rep(dimension, 2), "value" = c(20, 21, 34, 32, 20, 21, 36