Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Study titles vertical not horizontal #81

Closed
rachaelmburke opened this issue Jun 15, 2020 · 8 comments
Closed

Study titles vertical not horizontal #81

rachaelmburke opened this issue Jun 15, 2020 · 8 comments
Assignees
Labels
bug Something isn't working

Comments

@rachaelmburke
Copy link

Hi,

Thanks so much for making this amazing package. Thank you!

I'm not sure if this is a bug or if I'm doing something wrong, but I'm using the code pretty much 'out of the box', so not sure what I could be doing wrong.

In all the traffic light plots the labels for my papers are vertical, not horizontal. This means you basically can't read the names of the papers as they get cut off the edges.

In all you pictures / documentation the screenshots show horizontal study labels.

Have I done something wrong or did something odd sneak in at the last update?

To Reproduce

library(robvis)
rob_traffic_light(data_rob2,tool="ROB2")

Returns this....
Screenshot 2020-06-15 at 23 26 14

(from my computer screen - look at the direction of text on the labels)

I was expecting...

Screenshot 2020-06-15 at 23 26 43

(from the documentation)

Desktop (please complete the following information):

  • OS: 10.15.4
  • Browser: RStudio v1.2, R 4.0

Additional context
Add any other context about the problem here.

@rachaelmburke rachaelmburke added the bug Something isn't working label Jun 15, 2020
@mcguinlu
Copy link
Owner

Hi @rachaelmburke ,

Thanks for your message - this is a known issue, and it is due to changes in the way the ggplot2 package orientates the labels of facet levels since V3.3.0 of that package.

If you install the development version of robvis via the code below, and make sure you have the most current version of ggplot2 (via install.packages("ggplot2")), it should work as expected:

install.packages("devtools")
devtools::install_github("mcguinlu/robvis")

Please let me know if that doesn't work. For reference, the fix should be added to the CRAN version of robvis in the coming weeks (though I said that a few weeks ago too, so fingers crossed I actually get around to it this time)!

@mcguinlu
Copy link
Owner

Hi @rachaelmburke, I'm just doing a clean-out of Issues related to this project, and as I haven't heard anything back from you, I'm going to close this for the time being. Please feel free to re-open it if you encounter any further issues/the fix above doesn't work!

@mcguinlu mcguinlu mentioned this issue Jul 17, 2020
1 task
@Kumereng
Copy link

Thanks this helps.

@paulsharpeY
Copy link

Works for me.

@mcguinlu mcguinlu pinned this issue Sep 7, 2020
@mcguinlu mcguinlu unpinned this issue Oct 30, 2020
@mcguinlu mcguinlu pinned this issue Oct 30, 2020
@mcguinlu mcguinlu unpinned this issue Nov 20, 2020
@mcguinlu mcguinlu pinned this issue Nov 20, 2020
@mcguinlu mcguinlu unpinned this issue Nov 24, 2020
@mcguinlu mcguinlu pinned this issue Feb 15, 2021
@mcguinlu mcguinlu unpinned this issue Jun 21, 2022
@elliott-taylor1
Copy link

Hi, I am experiencing the same issue re: study labels. Is there another solution for this as I am not having any luck with the solution mentioned above. Kind regards, Elliott

@mcguinlu
Copy link
Owner

Hey @elliott-taylor1,

It might be a case that you also need to update ggplot2 to the latest version.

Use the following to update ggplot2, and then try robvis again?

install.packages("ggplot2")

If that doesn't work, would you mind running:

sessionInfo()

and copy/pasting the output, so that I can try and debug the issue?

@mcguinlu mcguinlu reopened this Jun 13, 2023
@mcguinlu mcguinlu pinned this issue Jun 13, 2023
@rehrenk
Copy link

rehrenk commented Sep 5, 2023

I'm having this issue as well - I installed both ggplot2 and robvis last week so they should be up to date. I also tried running devtools::install_github("mcguinlu/robvis") and got the following error message:

Error in utils::download.file(url, path, method = method, quiet = quiet, :
download from 'https://api.github.com/repos/mcguinlu/robvis/tarball/HEAD' failed

My output from sessionInfo() is:
R version 4.3.1 (2023-06-16)
Platform: aarch64-apple-darwin20 (64-bit)
Running under: macOS Ventura 13.4

Matrix products: default
BLAS: /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib
LAPACK: /Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/lib/libRlapack.dylib; LAPACK version 3.11.0

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

time zone: America/New_York
tzcode source: internal

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

other attached packages:
[1] ggplot2_3.4.3 readxl_1.4.3 pacman_0.5.1 robvis_0.3.0

loaded via a namespace (and not attached):
[1] gtable_0.3.4 dplyr_1.1.2 compiler_4.3.1 tidyselect_1.2.0 tidyr_1.3.0 scales_1.2.1
[7] yaml_2.3.7 fastmap_1.1.1 R6_2.5.1 labeling_0.4.3 generics_0.1.3 knitr_1.43
[13] tibble_3.2.1 munsell_0.5.0 pillar_1.9.0 rlang_1.1.1 utf8_1.2.3 xfun_0.40
[19] cli_3.6.1 withr_2.5.0 magrittr_2.0.3 digest_0.6.33 grid_4.3.1 rstudioapi_0.15.0
[25] lifecycle_1.0.3 vctrs_0.6.3 evaluate_0.21 glue_1.6.2 farver_2.1.1 cellranger_1.1.0
[31] fansi_1.0.4 colorspace_2.1-0 rmarkdown_2.24 purrr_1.0.2 tools_4.3.1 pkgconfig_2.0.3
[37] htmltools_0.5.6

I would appreciate any ideas you have about what I need to do to get the study titles horizontal - thank you in advance!

@befriendabacterium
Copy link

befriendabacterium commented Feb 14, 2024

I also got the same error as @rehrenk so could not download the fixed dev version. A quick workaround if you have to rely on the CRAN version is to add 'theme(strip.text.y.left = element_text(angle = 0))' to your rob figure ggplot object so it flips the study labels:

data <- rbind(data_rob2, data_rob2)
data$Study <- paste("Study",seq(1,18))

# Plot with reduced point size
test<-rob_traffic_light(data, tool = "ROB2", psize = 10)
test+
  theme(strip.text.y.left = element_text(angle = 0))
``

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

7 participants