tidyverts / feasts

Feature Extraction And Statistics for Time Series
https://feasts.tidyverts.org/
291 stars 23 forks source link

Adjust gg_season() base plot aesthetics #134

Closed mitchelloharawild closed 3 years ago

mitchelloharawild commented 3 years ago

Assuming future layers to a have a data column id is unreasonable and generally requires users to set inherit.params = FALSE.

mitchelloharawild commented 3 years ago

Closing as I no longer think this is an appropriate change. For more custom graphics, the user should produce their own plot directly with ggplot2 or other plotting libraries.

Keeping the base aesthetics as they are allows additional layers to appropriately inherit the colours and position mappings:

library(feasts)
#> Loading required package: fabletools
library(tsibble)
#> 
#> Attaching package: 'tsibble'
#> The following objects are masked from 'package:base':
#> 
#>     intersect, setdiff, union
library(dplyr)
#> 
#> Attaching package: 'dplyr'
#> The following objects are masked from 'package:stats':
#> 
#>     filter, lag
#> The following objects are masked from 'package:base':
#> 
#>     intersect, setdiff, setequal, union
library(ggplot2)
tourism %>% 
  summarise(Trips = sum(Trips)) %>% 
  rename(`index with spaces` = Quarter) %>% 
  gg_season(labels = "both") + 
  geom_point()
#> Plot variable not specified, automatically selected `y = Trips`

Created on 2021-05-06 by the reprex package (v1.0.0)