title: Connected dotplot with ggplot. Connecting with geom_line
body: <p>This is my data frame:</p>
  <pre><code>df&lt;-structure(list(category_of_job = structure(1:27, .Label = c(&quot;Recepcionist&quot;, 
  &quot;Secretaries&quot;, &quot;Admin&quot;, &quot;Stock control&quot;, &quot;Government admin&quot;, 
  &quot;Payroll &amp; accounts&quot;, &quot;Human resources&quot;, &quot;Research admin&quot;, &quot;Accounts&quot;, 
  &quot;Paramedics&quot;, &quot;Childcare&quot;, &quot;Teaching assistants&quot;, &quot;Care workers&quot;, 
  &quot;School crossing&quot;, &quot;Nurses&quot;, &quot;Social workers&quot;, &quot;Teaching &amp; education&quot;, 
  &quot;Medical practitioners&quot;, &quot;Culture &amp; Media&quot;, &quot;Graphic designers&quot;, 
  &quot;Arts &amp; media&quot;, &quot;Designers&quot;, &quot;Public relations&quot;, &quot;Web Design&quot;, 
  &quot;Media professionals&quot;, &quot;Business &amp; media&quot;, &quot;Advertising&quot;), class = &quot;factor&quot;), 
      female_year_salary = c(13, 15, 15, 16, 18, 18, 25, 32, 30, 
      23, 35, 12, 12, 13, 3, 27, 30, 45, 26, 16, 23, 25, 26, 27, 
      29, 32, 34), male_year_salary = c(14, 16, 19, 21, 23, 26, 
      30, 35, 41, 37, 13, 14, 16, 4, 32, 33, 36, 78, 25, 27, 31, 
      31, 27, 29, 34, 37, 40)), row.names = c(NA, -27L), class = c(&quot;tbl_df&quot;, 
  &quot;tbl&quot;, &quot;data.frame&quot;))
  </code></pre>
  <p>I need to connect the dots using <code>geom_line()</code> function from <code>ggplot</code>. Is it possible?</p>
  <p>I was able to do with <code>geom_segment()</code> But I cant do it with <code>geom_line</code>.</p>
  <p>Any help?</p>
  <pre><code>ggplot(df, aes(x = category_of_job,group = category_of_job)) +
    geom_point(aes(y = male_year_salary), color = 'red')+
    geom_point(aes(y = female_year_salary), color = 'blue')
  </code></pre>
  <p>How can I connect the red and blue dots with <code>geom_line</code>?</p>