title: Changing order of x-axis labels in ggplot
body: <p>I have dates as <code>'Dec-17','Jan-18','Feb-18','Mar-18','Apr-18','May-18','Jun-18','Jul-18','Aug-18'</code> 
  When I plot I need to preserve this in x axis. But x axis is getting reordered. 
  I tried factors method, then also I get the same :</p>
  
  <pre><code>&gt; data_$Dates
  [1] Apr-18 Aug-18 Dec-17 Feb-18 Jan-18 Jul-18 Jun-18 Mar-18 May-18
  9 Levels: Apr-18 Aug-18 Dec-17 Feb-18 Jan-18 Jul-18 Jun-18 ... May-18
  </code></pre>
  
  <p>But, I need to follow the same formatting starting from <code>Dec-17</code> and not <code>Apr-18</code>
  My code :</p>
  
  <pre><code>data_$Dates &lt;- factor(data_$Dates, levels = data_$Dates[order(data_$`Expected`)])
  data_$Dates
  ggplot(data=data_, aes(x=Dates, y=`Expected`, group=1)) +
    geom_line()+
    geom_point()
  </code></pre>