title: How to rename the x axis of plotly in R?
body: <p>I have a data frame, where the first column (x) are numbers from 1:12, and second column (y) contains the numbers I want to plot.</p>
  
  <p>I want to create a plot_ly plot of the y axis vs the 12 months.
  I want to label the x axis as 'Jan', 'Feb', 'Mar, ... 'Dec'.</p>
  
  <p>I have tried:</p>
  
  <pre><code>p &lt;- p %&gt;% plot_ly(df, x = df[[1]]) %&gt;% 
  add_lines(y = df[[2]], name = colnames(df)[2]) %&gt;% 
    layout(
      title = " Graph",
      xaxis = list(title="x axis"),
      yaxis = list(title="Y axis")
  )
  
  </code></pre>
  
  <p>Here the x axis is labeled as 0,1,2,...12. </p>
  
  <p>I have also tried to create a third column in the data frame where the third column contains c('Jan', 'Feb', ... 'Dec').
  When I do:</p>
  
  <pre><code>p &lt;- p %&gt;% plot_ly(df, x = df[[3]]) %&gt;% 
  add_lines(y = df[[2]], name = colnames(df)[2]) %&gt;% 
    layout(
      title = " Graph",
      xaxis = list(title="x axis"),
      yaxis = list(title="Y axis")
  )
  
  </code></pre>
  
  <p>the x axis is labeled in alphabetical order as 'Apr', 'Aug', 'Dec', 'Feb', 'Jan', 'Jun', Jul', 'Mar', 'May', 'Nov', 'Oct', 'Sep'.</p>
  
  <p>How can I label the x axis in the chronological order of months for my plot?</p>