tidyverts / tsibble

Tidy Temporal Data Frames and Tools
https://tsibble.tidyverts.org
GNU General Public License v3.0
528 stars 50 forks source link

fixes #219 and #195 #222

Closed TylerGrantSmith closed 3 years ago

TylerGrantSmith commented 3 years ago
set.seed(42)
library(tsibble)
library(ggplot2)
tibble(date = seq(yearquarter("2000Q2"), 
                  yearquarter("2020Q4"), by = 1),
       y = rnorm(length(date))) %>% 
  ggplot() + 
  aes(date, y) +
  geom_point() +
  scale_x_yearquarter(date_breaks = "5 years", 
                      date_minor_breaks = "1 year")


tsibble(grp = "A", idx = yearweek(1:10), y = rnorm(10), index = idx, key = grp) %>% 
  ggplot(aes(x = idx, y = y)) + 
  geom_line()

Created on 2020-09-29 by the reprex package (v0.3.0)

earowang commented 3 years ago

Thanks 🙏

Can you send a new PR to add yourself as a contributor?