Skip to content

Labels do not appear in version 0.9.5 #261

Closed
@arodionoff

Description

Summary

Behaviour difference between new vs. old version of your package. The labels are produced with ‘ggrepel’ version 0.9.4, but not with version 0.9.5 on Windows & Ubuntu (I do not have any Mac computer).

Minimal code example

Here is the minimum amount of code needed to demonstrate the issue:

install.packages('apyramid')
library('apyramid')         # Visualize Population Pyramids Aggregated by Age
data(us_2018)
df <- us_2018
df$count <- ifelse(df$gender == 'male', -df$count, df$count)
apyramid::age_pyramid(us_2018, age_group = "age", split_by = "gender", count= 'count') +
    ggrepel::geom_text_repel(data = df, ggplot2::aes(x = age, y = count, label = paste0(percent, '%')), size = 5)

Here is an image of the output produced by the code:

изображение

изображение

Suggestions

Eliminate the reasons for the lack of text output in the new version of the package.

Version information

Here is the output from sessionInfo() in my R session:

**R version 4.4.0 (2024-04-24)**
Platform: x86_64-pc-linux-gnu
Running under: Ubuntu 20.04.6 LTS

Matrix products: default
BLAS/LAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.8.so;  LAPACK version 3.9.0

locale:
 [1] LC_CTYPE=C.UTF-8       LC_NUMERIC=C           LC_TIME=C.UTF-8        LC_COLLATE=C.UTF-8     LC_MONETARY=C.UTF-8   
 [6] LC_MESSAGES=C.UTF-8    LC_PAPER=C.UTF-8       LC_NAME=C              LC_ADDRESS=C           LC_TELEPHONE=C        
[11] LC_MEASUREMENT=C.UTF-8 LC_IDENTIFICATION=C   

time zone: UTC
tzcode source: system (glibc)

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

other attached packages:
[1] apyramid_0.1.3

loaded via a namespace (and not attached):
 [1] RColorBrewer_1.1-3 utf8_1.2.4         R6_2.5.1           tidyselect_1.2.1   farver_2.1.2       magrittr_2.0.3    
 [7] gtable_0.3.5       glue_1.7.0         tibble_3.2.1       pkgconfig_2.0.3    generics_0.1.3     dplyr_1.1.4       
[13] lifecycle_1.0.4    ggplot2_3.5.1      cli_3.6.2          fansi_1.0.6        scales_1.3.0       grid_4.4.0        
[19] vctrs_0.6.5        withr_3.0.0        compiler_4.4.0     tools_4.4.0        munsell_0.5.1      pillar_1.9.0      
[25] Rcpp_1.0.12        colorspace_2.1-0   rlang_1.1.3        **ggrepel_0.9.5**

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions