How to jitter both geom_line and geom_point by the same magnitude?
<p>I have a <code>ggplot2</code> linegraph with two lines featuring significant overlap. I'm trying to use <code>position_jitterdodge()</code> 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:</p>

<pre><code>## Create data frames
dimension &lt;- factor(c("A", "B", "C", "D"))
df &lt;- data.frame("dimension" = rep(dimension, 2),
                 "value" = c(20, 21, 34, 32,
                             20, 21, 36, 29),
                 "Time" = c(rep("First", 4), rep("Second", 4)))
## Plot it
ggplot(data = df, aes(x = dimension, y = value,
                      shape = Time, linetype = Time, group = Time)) +
    geom_line(position = position_jitterdodge(dodge.width = 0.45)) +
    geom_point(position = position_jitterdodge(dodge.width = 0.45)) +
    xlab("Dimension") + ylab("Value")
</code></pre>

<p>Which produces the ugly:</p>

<p><a href="https://i.stack.imgur.com/D3ZhX.png" rel="noreferrer"><img src="https://i.stack.imgur.com/D3ZhX.png" alt="Line/point mismatch"></a></p>

<p>I've obviously got something fundamentally wrong here: What should I do to make the <code>geom_point</code> jitter follow the <code>geom_line</code> jitter?</p>