title: How to force `geom_line()` to NOT use the shortest distance to connect points?
body: <pre><code>ggplot(mtcars, aes(wt, mpg)) + geom_line() + geom_point()
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/Svfz4.png" alt="enter image description here"></p>
  
  <p><code>geom_line()</code> connects the dot with a single straight line, that is the shortest path between the two dots. I would like the line to go straight on the horizontal (or vertical) direction first and then goes up or down (or right) to connect the point that follows.</p>
  
  <p>It sounds likely that this option is not already integrated in <code>ggplot2</code>. One way to do that would be to create a whole set of points that won't be displayed when <code>geom_point()</code> but that would be positioned at the same x position as the point that follows (or the same x position as the point the preceeds) and at the same y position as the point that precedes (or the same y position as the point that follows). It sounds like a complicated solution! And I don't really manage to make it work. Is there a better solution? In any case, can you help making a handy function that will do the two tricks (1.first vertical and 2.first horiozontal)?</p>