ProjectMOSAIC / ggformula

Provides a formula interface to 'ggplot2' graphics.
Other
38 stars 11 forks source link

Warning about use of `size` aesthetic #163

Open luebby opened 1 year ago

luebby commented 1 year ago
suppressPackageStartupMessages(library(mosaic))
gf_lm(length ~ width,
      data = mosaicData::KidsFeet,
      color = ~biggerfoot, alpha = 0.2)
#> Warning: Using the `size` aesthetic with geom_line was deprecated in ggplot2 3.4.0.
#> ℹ Please use the `linewidth` aesthetic instead.
#> This warning is displayed once every 8 hours.
#> Call `lifecycle::last_lifecycle_warnings()` to see where this warning was
#> generated.

sessionInfo()
#> R version 4.3.0 (2023-04-21)
#> Platform: x86_64-pc-linux-gnu (64-bit)
#> Running under: Ubuntu 22.04.2 LTS
#> 
#> Matrix products: default
#> BLAS:   /usr/lib/x86_64-linux-gnu/blas/libblas.so.3.10.0 
#> LAPACK: /usr/lib/x86_64-linux-gnu/lapack/liblapack.so.3.10.0
#> 
#> locale:
#>  [1] LC_CTYPE=de_DE.UTF-8       LC_NUMERIC=C              
#>  [3] LC_TIME=de_DE.UTF-8        LC_COLLATE=de_DE.UTF-8    
#>  [5] LC_MONETARY=de_DE.UTF-8    LC_MESSAGES=de_DE.UTF-8   
#>  [7] LC_PAPER=de_DE.UTF-8       LC_NAME=C                 
#>  [9] LC_ADDRESS=C               LC_TELEPHONE=C            
#> [11] LC_MEASUREMENT=de_DE.UTF-8 LC_IDENTIFICATION=C       
#> 
#> time zone: Europe/Berlin
#> tzcode source: system (glibc)
#> 
#> attached base packages:
#> [1] stats     graphics  grDevices utils     datasets  methods   base     
#> 
#> other attached packages:
#> [1] mosaic_1.8.4.2    mosaicData_0.20.3 ggformula_0.10.4  dplyr_1.1.2      
#> [5] Matrix_1.5-4.1    ggplot2_3.4.2     lattice_0.21-8   
#> 
#> loaded via a namespace (and not attached):
#>  [1] styler_1.9.1       utf8_1.2.3         generics_0.1.3     tidyr_1.3.0       
#>  [5] stringi_1.7.12     hms_1.1.3          digest_0.6.31      magrittr_2.0.3    
#>  [9] evaluate_0.21      grid_4.3.0         fastmap_1.1.1      R.oo_1.25.0       
#> [13] R.cache_0.16.0     R.utils_2.12.2     purrr_1.0.1        fansi_1.0.4       
#> [17] scales_1.2.1       tweenr_2.0.2       cli_3.6.1          labelled_2.11.0   
#> [21] rlang_1.1.1        polyclip_1.10-4    R.methodsS3_1.8.2  munsell_0.5.0     
#> [25] reprex_2.0.2       withr_2.5.0        yaml_2.3.7         tools_4.3.0       
#> [29] colorspace_2.1-0   mosaicCore_0.9.2.1 forcats_1.0.0      vctrs_0.6.2       
#> [33] R6_2.5.1           ggridges_0.5.4     lifecycle_1.0.3    stringr_1.5.0     
#> [37] fs_1.6.2           ggstance_0.3.6     MASS_7.3-60        pkgconfig_2.0.3   
#> [41] pillar_1.9.0       gtable_0.3.3       glue_1.6.2         Rcpp_1.0.10       
#> [45] ggforce_0.4.1      haven_2.5.2        xfun_0.39          tibble_3.2.1      
#> [49] tidyselect_1.2.0   rstudioapi_0.14    knitr_1.42         farver_2.1.1      
#> [53] htmltools_0.5.5    labeling_0.4.2     rmarkdown_2.21     compiler_4.3.0

Created on 2023-05-24 with reprex v2.0.2

Unfortunatly I can't find a fix. Sorry!

rpruim commented 1 year ago

@luebby , looks like I missed this while I was traveling. The root cause is a change in naming in ggplot2. I've fixed most of these, but seems to have slipped through. I'll investigate.

For now, you can hide this message by explicitly setting the line width, a la

gf_lm(length ~ width,
       data = mosaicData::KidsFeet,
       color = ~biggerfoot, alpha = 0.2, linewidth = 1)