thomasp85 / ggforce

Accelerating ggplot2
https://ggforce.data-imaginist.com
Other
916 stars 106 forks source link

`geom_autohistogram()` not working for continuous scales #297

Closed jantusan closed 9 months ago

jantusan commented 1 year ago

Hello,

I'm having some trouble with the function geom_autohistogram(). It used to work until I updated the tidyverse. I then updated ggforce and my R version but the problem persists.

p <- ggplot(mpg) +
   geom_autopoint() +
   facet_matrix(vars(drv:fl), layer.diag = 2, grid.y.diag = FALSE)

p + geom_autohistogram()

#> Warning messages:
#> 1: Computation failed in `stat_autobin()`
#> Caused by error in `compute_group()`:
#> ! unused argument (width = NULL)  
#> 2: Computation failed in `stat_autobin()`
#> Caused by error in `compute_group()`:
#> ! unused argument (width = NULL) 

geom_autohistogram-problem

It seems to work for discrete scales but not for continuous scales. geom_autodensity() works fine, though.

This is my sessionInfo()

> sessionInfo()
R version 4.2.2 (2022-10-31)
Platform: x86_64-apple-darwin17.0 (64-bit)
Running under: macOS Ventura 13.1

Matrix products: default
LAPACK: /Library/Frameworks/R.framework/Versions/4.2/Resources/lib/libRlapack.dylib

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] ggforce_0.4.1  ggplot2_3.4.1  devtools_2.4.5 usethis_2.1.6 

loaded via a namespace (and not attached):
 [1] tidyselect_1.2.0  remotes_2.4.2     purrr_1.0.1       colorspace_2.1-0  vctrs_0.5.2       generics_0.1.3   
 [7] miniUI_0.1.1.1    htmltools_0.5.4   utf8_1.2.3        rlang_1.0.6       pkgbuild_1.4.0    urlchecker_1.0.1 
[13] later_1.3.0       pillar_1.8.1      glue_1.6.2        withr_2.5.0       tweenr_2.0.2      sessioninfo_1.2.2
[19] lifecycle_1.0.3   stringr_1.5.0     munsell_0.5.0     gtable_0.3.1      htmlwidgets_1.6.1 memoise_2.0.1    
[25] labeling_0.4.2    callr_3.7.3       fastmap_1.1.1     httpuv_1.6.9      ps_1.7.2          fansi_1.0.4      
[31] Rcpp_1.0.10       xtable_1.8-4      promises_1.2.0.1  scales_1.2.1      cachem_1.0.7      pkgload_1.3.2    
[37] mime_0.12         farver_2.1.1      fs_1.6.1          digest_0.6.31     stringi_1.7.12    processx_3.8.0   
[43] dplyr_1.1.0       shiny_1.7.4       polyclip_1.10-4   grid_4.2.2        cli_3.6.0         tools_4.2.2      
[49] magrittr_2.0.3    tibble_3.1.8      profvis_0.3.7     crayon_1.5.2      pkgconfig_2.0.3   ellipsis_0.3.2   
[55] MASS_7.3-58.1     prettyunits_1.1.1 rstudioapi_0.14   R6_2.5.1          compiler_4.2.2