title: R plotlly add_trace issue when x-axis values are POSIXct
body: <p>I wish it could be much easier for us to add reference lines in <code>plotly</code> like using <code>geom_vline</code> or <code>geom_hline</code> in <code>ggplot2</code> or even the <code>abline</code> in base R. </p>
  
  <p>We can use <code>add_trace</code> function to mimic the <code>geom_hline</code> but this time it seems I am adding the wrong x values.</p>
  
  <pre><code>library(plotly)
  library(lubridate)
  
  D = data.frame(
    y = round(rnorm(10),1),
    x = structure(c(1498640394, 1498641854, 1498642201, 1498642515, 1498642749, 
              1498643011, 1498643247, 1498643499, 1498643735, 1498643992), 
              tzone = "UTC", class = c("POSIXct", "POSIXt"))
  )
  
  D$DATE_TIME = lubridate::ymd_hms(D$x)
  
  MIN = min(D$x)
  
  MAX = max(D$x)
  
  H = 0
  
  plot_ly(D, x = ~x, y = ~ y, type = "scatter", mode ="lines+markers") %&gt;% 
    add_trace(x = c(MIN, MAX), y = c(H, H), name = "Reference", mode = "lines", line=list(color="red",dash="dash"))
  </code></pre>
  
  <p>I get 
  <a href="https://i.stack.imgur.com/6SipN.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/6SipN.png" alt="enter image description here"></a></p>
  
  <p>The reference line goes way wrong. Why does this happen?</p>