title: ggplot with both `geom_vline` and `geom_hline`. Task: need separate legends
body: <pre class="lang-r prettyprint-override"><code>library(tidyverse)
  library(lubridate)
  
  y &lt;- rnorm(100)
  
  df &lt;- tibble(y) %&gt;% 
    mutate(os = factor(rep_len(1:5, 100)),
           date = seq(from = ymd('2013-01-01'), by = 1, length.out = 100))
  
  ggplot(df, aes(x = date, y = y, colour = os)) +
    geom_line() +
    geom_vline(
      aes(xintercept = min(date), linetype = 'os 1'), 
      colour = 'red') +
    geom_vline(
      aes(xintercept = median(date), linetype = 'os 2'), 
      colour = 'blue') +
    geom_hline(
      aes(yintercept = 1, linetype = &quot;dashed&quot;),
      colour = &quot;black&quot;
    ) +
    scale_linetype_manual(
      name = 'lines',
      values = c('os 1' = 1, 'os 2' = 1),
      guide = guide_legend(override.aes = list(colour = c('red', 'blue')))) 
  
  </code></pre>
  <p>output:</p>
  <p><a href="https://i.stack.imgur.com/WRIjU.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/WRIjU.png" alt="enter image description here" /></a></p>
  <p>What is wrong with output:</p>
  <ol>
  <li>The <code>geom_hline</code> is missing.</li>
  <li>The legend combines the vline and the hline to form a cross.</li>
  </ol>
  <p>Correct output:</p>
  <ol>
  <li>THe geom_hline should be drawn.</li>
  <li>Need a separate legend for the vlines and hlines. i.e., lines in the vline legend should be vertical while lines in the hline legend should be horizontal.</li>
  </ol>