Guest User

Untitled

a guest
Oct 18th, 2017
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. library(xts)
  2. library(dygraphs)
  3. data1 <- xts(matrix( c(rnorm(50, mean = 3), rnorm(50, mean = -3) ) , ncol=2, nrow=50), order.by=seq.POSIXt(as.POSIXct("2017-10-01 00:00:00", tz="UTC"), by=3600, length.out = 50))
  4.  
  5. dygraph(data1) %>%
  6. dyShading(from = "2017-10-01 12:00:00",to = "2017-10-02 08:00:00", color = "rgba(10, 89, 4, 0.2)", axis = "x") %>%
  7. dyShading(from = "2017-10-02 00:00:00",to = "2017-10-02 16:00:00", color = "rgba(200, 200, 230, 0.4)", axis = "x")
Add Comment
Please, Sign In to add comment