title: How to reorder X axis date based on another variable
body: <p>I have a text file here: <a href="https://login.filesanywhere.com/fs/v.aspx?v=8c6b67865a6370b0af67" rel="nofollow noreferrer">https://login.filesanywhere.com/fs/v.aspx?v=8c6b67865a6370b0af67</a>
  I need to re-arrange my 'X' axis based on the month column of the dataset. I have tried for a while and can't seem to find a way to achieve it. The graph below currently plots from Jan to Dec but I want the order to be from Oct to Sept. This is what I have so far:</p>
  <pre><code># A tibble: 6 x 6
  # Groups:   C_WY, WDAY, month, date [1]
    C_WY   WDAY month date       boxname           daily_mean
    &lt;fct&gt; &lt;int&gt; &lt;fct&gt; &lt;date&gt;     &lt;chr&gt;                  &lt;dbl&gt;
  1 2001    274 Oct   2001-10-01 Confluence              22.3
  2 2001    274 Oct   2001-10-01 DWSC-Yolo-CSlough       22.3
  3 2001    274 Oct   2001-10-01 E_Delta                 21.8
  4 2001    274 Oct   2001-10-01 Lower_SaC               22.3
  5 2001    274 Oct   2001-10-01 Lower_SJR               22.5
  6 2001    274 Oct   2001-10-01 Marsh                   23.0
  
  
  ggplot(test2,aes(date,daily_mean,colour=boxname)) + 
                    geom_line(size=.8) +  
         scale_x_date(date_breaks = &quot;1 month&quot;,date_labels = &quot;%b&quot;,expand=c(0,0.5)) +
                    ggtitle(&quot;Test&quot;) 
  </code></pre>
  <p><a href="https://i.stack.imgur.com/v66mS.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/v66mS.png" alt="enter image description here" /></a></p>