-
Notifications
You must be signed in to change notification settings - Fork 7
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
Minor proposal for readability of CI lines in the zipper plot #55
Conversation
Hi @lorenzo-guizzaro and thank you for this PR. Could you paste some examples here to show the different looks under the Thanks! |
library(ggplot2)
#> Warning: package 'ggplot2' was built under R version 4.3.2
library(devtools)
#> Warning: package 'devtools' was built under R version 4.3.2
#> Loading required package: usethis
#> Warning: package 'usethis' was built under R version 4.3.2
load_all("../rsimsum/")
#> ℹ Loading rsimsum
#> Warning: package 'testthat' was built under R version 4.3.2
data("relhaz", package = "rsimsum")
s1 <- simsum(
data = relhaz, estvarname = "theta", se = "se", true = -0.50,
methodvar = "model", by = c("n", "baseline"), x = TRUE
)
#> 'ref' method was not specified, Cox set as the reference
autoplot(s1, zoom = .3, type = "zip", ci_colors = 3) autoplot(s1, zoom = .3, type = "zip", ci_colors = 2) autoplot(s1, zoom = .3, type = "zip", ci_colors = 1) Created on 2023-12-07 with reprex v2.0.2 |
Ok, looks good, thanks! I have a few suggestion for the implementation:
What do you think about the above? |
Thank you Alessandro, your ideas make much more sense and are best practice ;) library(ggplot2)
#> Warning: package 'ggplot2' was built under R version 4.3.2
library(devtools)
#> Warning: package 'devtools' was built under R version 4.3.2
#> Loading required package: usethis
#> Warning: package 'usethis' was built under R version 4.3.2
load_all("../rsimsum/")
#> ℹ Loading rsimsum
#> Warning: package 'testthat' was built under R version 4.3.2
data("relhaz", package = "rsimsum")
s1 <- simsum(
data = relhaz, estvarname = "theta", se = "se", true = -0.50,
methodvar = "model", by = c("n", "baseline"), x = TRUE
)
#> 'ref' method was not specified, Cox set as the reference
autoplot(s1, zoom = .3, type = "zip", zip_ci_colors = c("green", "red", "blue")) autoplot(s1, zoom = .3, type = "zip", zip_ci_colors = c("green", "red")) autoplot(s1, zoom = .3, type = "zip", zip_ci_colors = c("yellow")) autoplot(s1, zoom = .3, type = "zip") Created on 2023-12-08 with reprex v2.0.2 |
Looks good – thanks 👍 Once the checks run I can merge this PR! |
Hi there,
while using this (great!) package, I have had some difficulties in seeing the CI lines of the zipper plot.
Thinking of changing their color to a more visible one, I have also thought to perhaps giving an option to make it clear whether there is optimal coverage or not. Please disregard if it does not make sense. In any case, thanks for making this package available!