title: How to sort data in chart by 3rd variable?
body: <p>I have a data.frame like this </p>
  
  <pre><code>head(df)
  # Country Value1 Value2 Part
  # Germany 2.5    3.5    West
  # France  4.2    4.4    West
  # Romania 10.3   5      East
  # Latvia  12.2   13     East
  </code></pre>
  
  <p>I have chart like this</p>
  
  <pre><code>ggplot(df) +
    geom_segment(aes(x=Country, xend=Country, y=Value1, yend=Value2), color="grey") +
    geom_point(aes(x=Country, y=Value1), color="red", size=3 ) +
    geom_point(aes(x=Country, y=Value2), color="blue", size=3 ) +
    theme_classic() 
  </code></pre>
  
  <p>I want to sort data on x-axis by variable "Part".</p>
  
  <p>Cheers guys.</p>
  
  <hr>
  
  <p><strong>Data</strong></p>
  
  <pre><code>df &lt;- structure(list(Country = structure(c(3L, 4L, 1L, 2L), .Label = c("Romania", 
  "Latvia", "Germany", "France"), class = "factor"), Value1 = c(2.5, 
  4.2, 10.3, 12.2), Value2 = c(3.5, 4.4, 5, 13), Part = structure(c(2L, 
  2L, 1L, 1L), .Label = c("East", "West"), class = c("ordered", 
  "factor"))), row.names = c(NA, -4L), class = "data.frame")
  </code></pre>