-
Notifications
You must be signed in to change notification settings - Fork 631
Closed
Description
I often plot high-frequency market data, so I would like to be able to zoom in to see the sub-second time-scale.
Plotly would be perfect for this, but I noticed that it truncates all timestamps (POSIX.ct type) to the nearest whole second. I even tried setting "options(digits.secs=6)", but that didn't seem to help.
Example:
ggplotly(ggplot(data.frame(x=Sys.time()+1e-3*c(1:9,5000), y=rnorm(10)), aes(x,y)) + geom_point())
You can either zoom in to see that the first 9 points are all plotted on the same x-value or just look at the html source.
Note that the reason for the 10th point is to avoid this (probably unrelated) bug when using ggplot2 with small time intervals:
r-lib/scales#65
Metadata
Metadata
Assignees
Labels
No labels