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

[Feature Request]: Align table and plot in g_lineplot #1152

Closed
3 tasks done
crystalluckett-sanofi opened this issue Dec 4, 2023 · 0 comments · Fixed by #1153
Closed
3 tasks done

[Feature Request]: Align table and plot in g_lineplot #1152

crystalluckett-sanofi opened this issue Dec 4, 2023 · 0 comments · Fixed by #1153
Assignees

Comments

@crystalluckett-sanofi
Copy link

Feature description

Currently, the table is misaligned vertically with the figure. The table entries are slightly to the right of the axis breaks on the figure at first but eventually resolve.

library(nestcolor)

adsl <- tern_ex_adsl
adlb <- tern_ex_adlb %>% dplyr::filter(ANL01FL == "Y", PARAMCD == "ALT", AVISIT != "SCREENING")
adlb$AVISIT <- droplevels(adlb$AVISIT)
adlb <- dplyr::mutate(adlb, AVISIT = forcats::fct_reorder(AVISIT, AVISITN, min))
adlb_f <- dplyr::filter(adlb, ARMCD != "ARM A" | AVISIT == "BASELINE")
g_lineplot(adlb_f, table = c("n", "mean"))

image

I believe this can be easily resolved by adding the option align = 'v' to

cowplot::plot_grid(p, tbl, ncol = 1)

i.e., cowplot::plot_grid(p, tbl, ncol = 1):

image

Code of Conduct

  • I agree to follow this project's Code of Conduct.

Contribution Guidelines

  • I agree to follow this project's Contribution Guidelines.

Security Policy

  • I agree to follow this project's Security Policy.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants