tidyverts / feasts

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

`max_col` appears to be ignored when set to 0 #150

Closed wkdavis closed 2 years ago

wkdavis commented 2 years ago

It looks like setting max_col = 0 does not remove colors from gg_season() as per the documentation.

library(feasts)
#> Loading required package: fabletools
tsibbledata::aus_production %>% 
  gg_season(Cement, max_col = 0)

tsibbledata::aus_production %>% 
  gg_season(Cement, max_col = 0, labels = "none")

Created on 2022-05-18 by the reprex package (v2.0.1)

mitchelloharawild commented 2 years ago

Thanks for reporting this. This argument was misdocumented after transitioning to a continuous default colour guide instead of showing now colours. I've restored its functionality as documented, but changed the default value to be Inf (since the continuous guide is a desirable default). A new argument max_col_discrete is added to control the threshold for discrete and continuous colour guides.

library(feasts)
#> Loading required package: fabletools
tsibbledata::aus_production %>% 
  gg_season(Cement, max_col = 0)

Created on 2022-08-24 by the reprex package (v2.0.1)