adayim / consort

Create CONSORT diagrams for clinical studies.
Other
31 stars 4 forks source link

four arms box cropping #15

Closed shug0131 closed 1 year ago

shug0131 commented 1 year ago

When creating a diagram for a 4-armed trial, the right-most box, for withdrawals is flush with the edge of the plot and the right hand edge to the boxis no longer visible in the output. It seems to want to do this, even when I make the width of the txt smaller- the right box is extended to make it flush with the plot.

adayim commented 1 year ago

Maybe this is the version problem as well?

shug0131 commented 1 year ago

sessionInfo() R version 4.1.1 (2021-08-10) Platform: x86_64-w64-mingw32/x64 (64-bit) Running under: Windows 10 x64 (build 19044)

Matrix products: default

locale: [1] LC_COLLATE=English_United Kingdom.1252 LC_CTYPE=English_United Kingdom.1252 [3] LC_MONETARY=English_United Kingdom.1252 LC_NUMERIC=C [5] LC_TIME=English_United Kingdom.1252

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

other attached packages: [1] ggalluvial_0.12.5 tab_5.1.1 progress_1.2.2 xlsx_0.6.5 consort_1.2.0 [6] mice_3.14.0 boot_1.3-28 survival_3.3-1 eudract_0.10.1 rvest_1.0.2 [11] xml2_1.3.3 knitr_1.39 rmarkdown_2.14 tidyr_1.2.0 magrittr_2.0.3 [16] ggplot2_3.3.6 dplyr_1.0.9 readxl_1.4.0 cctu_0.7.4 nlme_3.1-157 [21] broom.mixed_0.2.9.4

loaded via a namespace (and not attached): [1] httr_1.4.3 viridisLite_0.4.0 splines_4.1.1 xlsxjars_0.6.1 renv_0.15.5 cellranger_1.1.0 [7] globals_0.15.0 pillar_1.7.0 backports_1.4.1 lattice_0.20-45 glue_1.6.2 digest_0.6.29 [13] colorspace_2.0-3 survey_4.2-1 htmltools_0.5.2 Matrix_1.4-1 pkgconfig_2.0.3 broom_0.8.0 [19] listenv_0.8.0 purrr_0.3.4 webshot_0.5.3 scales_1.2.0 svglite_2.1.0 tibble_3.1.7 [25] farver_2.1.0 generics_0.1.2 ellipsis_0.3.2 withr_2.5.0 furrr_0.3.1 cli_3.3.0 [31] crayon_1.5.1 evaluate_0.15 future_1.26.1 fansi_1.0.3 parallelly_1.31.1 MASS_7.3-57 [37] forcats_1.0.0 tools_4.1.1 data.table_1.14.2 prettyunits_1.1.1 mitools_2.4 hms_1.1.1 [43] lifecycle_1.0.1 stringr_1.4.0 munsell_0.5.0 kableExtra_1.3.4 compiler_4.1.1 systemfonts_1.0.4 [49] rlang_1.0.2 grid_4.1.1 rstudioapi_0.13 labeling_0.4.2 gtable_0.3.0 codetools_0.2-18 [55] DBI_1.1.3 R6_2.5.1 gridExtra_2.3 fastmap_1.1.0 utf8_1.2.2 rJava_1.0-6 [61] stringi_1.7.6 parallel_4.1.1 Rcpp_1.0.8.3 vctrs_0.4.1 tidyselect_1.1.2 xfun_0.31

consort_plot function(data, orders, side_box, allocation = NULL, labels = NULL, dist = 0.02, cex = 0.8){ require(grid)

options(boxGrobTxt = gpar(color = "black", cex = cex), boxGrob = gpar(color = "black", cex = cex), connectGrobArrow = arrow(length = unit(0.1, "inches"), type = "cl

From: Alim Dayim @.> Sent: 07 June 2023 14:22 To: adayim/consort @.> Cc: Simon Bond @.>; Author @.> Subject: Re: [adayim/consort] four arms box cropping (Issue #15)

Maybe this is the version problem as well?

— Reply to this email directly, view it on GitHubhttps://github.com/adayim/consort/issues/15#issuecomment-1580810345, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AC3IFD2NRHF57X36NBTNNTLXKB553ANCNFSM6AAAAAAY3AAAZA. You are receiving this because you authored the thread.Message ID: @.***>