gg_season - double-label on x-axis

Hello,
When I use gg_season (in the feasts pkg) to plot tsibble data I often get x-axis labelling that adds a label twice or in the wrong place.
I've used the pedestrian dataset to illustrate but I have used other datasets and had similar labelling issues return.

Have other folks had this problem? If anyone knows how to resolve please let me know.
Thanks.

#> summing to daily
z <- index_by(pedestrian, Date) %>%
summarise(Count2 = sum(Count))

gg_season(z, y = Count2, period = 'year')

#>summing to weekly 
z2 <- index_by(pedestrian, yearweek(Date)) %>%
  summarise(Count2 = sum(Count))

gg_season(z2, y = Count2, period = 'year')

Is pedestrian a tsibble?

Fixed, thanks: Fix issue with double label/breaks of gg_season() ยท tidyverts/feasts@f7894e8 ยท GitHub

library(fpp3)
#> โ”€โ”€ Attaching packages โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ fpp3 0.3 โ”€โ”€
#> โœ“ tibble      3.0.4          โœ“ tsibble     0.9.3.9000
#> โœ“ dplyr       1.0.2          โœ“ tsibbledata 0.2.0     
#> โœ“ tidyr       1.1.2          โœ“ feasts      0.1.5.9000
#> โœ“ lubridate   1.7.9          โœ“ fable       0.2.1.9000
#> โœ“ ggplot2     3.3.2
#> โ”€โ”€ Conflicts โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ fpp3_conflicts โ”€โ”€
#> x lubridate::date()   masks base::date()
#> x dplyr::filter()     masks stats::filter()
#> x tsibble::interval() masks lubridate::interval()
#> x dplyr::lag()        masks stats::lag()
#> summing to daily
z <- index_by(pedestrian, Date) %>%
  summarise(Count2 = sum(Count))

gg_season(z, y = Count2, period = 'year')

#>summing to weekly 
z2 <- index_by(pedestrian, yearweek(Date)) %>%
  summarise(Count2 = sum(Count))

gg_season(z2, y = Count2, period = 'year')

Created on 2020-11-16 by the reprex package (v0.3.0)

1 Like

Thanks Mitchell, your update is downloaded and working.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.