Skip to content

Warning: Using the size aesthetic with geom_segment was deprecated #88

@isaactpetersen

Description

@isaactpetersen

I receive the following warning when setting quantile_lines = TRUE:

Warning: Using the `size` aesthetic with geom_segment was deprecated in ggplot2 3.4.0.
Please use the `linewidth` aesthetic instead.

Here is a reprex:

library("ggplot2")
library("ggridges")
#> Warning: package 'ggridges' was built under R version 4.2.3

ggplot(iris, aes(x = Sepal.Length, y = Species, fill = factor(after_stat(quantile)))) +
  stat_density_ridges(
    geom = "density_ridges_gradient",
    calc_ecdf = TRUE,
    quantiles = 5,
    quantile_lines = TRUE
  )
#> Picking joint bandwidth of 0.181
#> Warning: Using the `size` aesthetic with geom_segment 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.2.0 (2022-04-22 ucrt)
#> Platform: x86_64-w64-mingw32/x64 (64-bit)
#> Running under: Windows 10 x64 (build 19045)
#> 
#> Matrix products: default
#> 
#> locale:
#> [1] LC_COLLATE=English_United States.utf8 
#> [2] LC_CTYPE=English_United States.utf8   
#> [3] LC_MONETARY=English_United States.utf8
#> [4] LC_NUMERIC=C                          
#> [5] LC_TIME=English_United States.utf8    
#> 
#> attached base packages:
#> [1] stats     graphics  grDevices utils     datasets  methods   base     
#> 
#> other attached packages:
#> [1] ggridges_0.5.4 ggplot2_3.4.3 
#> 
#> loaded via a namespace (and not attached):
#>  [1] compiler_4.2.0    pillar_1.9.0      R.methodsS3_1.8.2 R.utils_2.12.2   
#>  [5] tools_4.2.0       digest_0.6.33     evaluate_0.21     lifecycle_1.0.3  
#>  [9] tibble_3.2.1      gtable_0.3.4      R.cache_0.16.0    pkgconfig_2.0.3  
#> [13] rlang_1.1.1       reprex_2.0.2      cli_3.6.1         rstudioapi_0.15.0
#> [17] yaml_2.3.7        xfun_0.40         fastmap_1.1.1     withr_2.5.0      
#> [21] styler_1.10.1     dplyr_1.1.2       knitr_1.43        generics_0.1.3   
#> [25] fs_1.6.3          vctrs_0.6.3       grid_4.2.0        tidyselect_1.2.0 
#> [29] glue_1.6.2        R6_2.5.1          fansi_1.0.4       rmarkdown_2.24   
#> [33] farver_2.1.1      purrr_1.0.2       magrittr_2.0.3    scales_1.2.1     
#> [37] htmltools_0.5.6   colorspace_2.1-0  labeling_0.4.2    utf8_1.2.3       
#> [41] munsell_0.5.0     R.oo_1.25.0

Created on 2023-08-29 with reprex v2.0.2

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions