tidyverts / tsibble

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

year* ggplot2 scales outside of plot limits #195

Closed mitchelloharawild closed 4 years ago

mitchelloharawild commented 4 years ago

1970 W1 is shown as a break/label despite not being within the x axis limits on the plot.

library(tsibble)
#> Warning: package 'tsibble' was built under R version 3.6.3
library(ggplot2)
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-06-15 by the reprex package (v0.3.0)

earowang commented 4 years ago

PR please?

Cheers, Earo

On 15 Jun 2020, at 19:03, mitchelloharawild wrote:

library(ggplot2)
tsibble(grp = "A", idx = yearweek(1:10), y = rnorm(10), index = 

idx, key = grp) %>% ggplot(aes(x = idx, y = y)) + geom_line()