title: Observations instead of dates in R plot
body: <p>I am trying to plot a garch model in R. However my results are showing as observation numbers instead of the date. I have tried ammending my csv file and adjusting the dates here with no solution. Is there a solution in R itself as I have seen that it should pick up dates automatically?</p>
  <p>Here is a segment of my data csv file.</p>
  <p><a href="https://i.stack.imgur.com/bvqk1.png" rel="nofollow noreferrer">enter image description here</a></p>
  <pre><code>SWA&lt;- ugarchspec(variance.model = list(model = &quot;sGARCH&quot;,
            garchOrder=c(1,1), external.regressors = data.matrix(dummy_x2)), mean.model = list(armaOrder=c(1,0)),
                  distribution.model = &quot;std&quot;)
  
  # fit model
  # ugarchfit(spec, data)
  
  SWA_fit&lt;- ugarchfit(SWA, data = r_SW)
  SWA_fit
  
  
  #plot volatility
  SWA_rhat&lt;-SWA_fit@fit$fitted.values
  plot.ts(SWA_rhat)
  SWA_hhat&lt;-ts(SWA_fit@fit$sigma^2)
  plot.ts(SWA_hhat)
  </code></pre>