plotly.R
plotly.R copied to clipboard
Plotly rounding timestamps with milliseconds to nearest second
When plotting a time-series with milliseconds, Plotly rounds the data on the x-axis to the nearest second.
x <- seq(1, 10000, by=250)/1000
y <- 1:length(x)
x <- as.POSIXct(x, origin='1970-01-01', tz='UTC')
data <- data.frame(x, y)
plot_ly(data, x=~x, y=~y, type='scatter', mode='lines+markers')
Is this a limitation in the JS library ? Or is it one from R?