title: How can I arrange the X axis sorted by Y on my plot?
body: <p>I need to plot on X (the application used ("facebook" ,"tweeter" ... ) ) and the time spend on it on Y axis <em>but</em> I have to order the X axis by the Y axis.
  How could I do this?</p>
  
  <p>I have tried the following: </p>
  
  <pre><code>data_df &lt;- Original_dataFrame%&gt;%                                           
  
  dplyr::select(Applications,Time_Spend) %&gt;%
  dplyr::group_by(Applications,Time_Spend)%&gt;%
  arrange(Applications,Time_Spend)
  
  
  plot_ly(data_df, y=~Time_Spend,x = ~Applications, type = 'scatter', mode = 'lines')
  
  </code></pre>