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]: g_lineplot: Allow users to control the relative height of the plot vs. table sections #1334

Open
3 tasks done
kathrinflunkert opened this issue Oct 21, 2024 · 0 comments
Assignees

Comments

@kathrinflunkert
Copy link

Feature description

It looks like tern renders the relative height of the plot/table sections using cowplot::plot_grid that has rel_heights argument defaulted to 1 (i.e. both sections are of the same height). The tern::g_lineplot function simply uses the default with no way to control it. This leads to very unfortunate layouts when e.g. there is only one arm to display. It would be good if the user could decide if there should indeed be a 1:1 ratio for the plot and the table space or rather 2:1, 3:1 etc.

Example:

library(chevron)
library(dplyr)

data <- syn_data

data$adlb <- data$adlb %>% 
  filter(ACTARM == 'A: Drug X') 
data$adlb$ACTARM <- droplevels(data$adlb$ARM)
  
data$adsl <- data$adsl %>% 
  filter(ACTARM == 'A: Drug X')
data$adsl$ACTARM <- droplevels(data$adsl$ARM)

run(mng01, data, dataset = "adlb",  table = c("n", "mean"))

Result:
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.
@edelarua edelarua self-assigned this Oct 21, 2024
Melkiades added a commit that referenced this issue Nov 1, 2024
…t & font size (#1335)

# Pull Request

Fixes #1333 and #1334

---------

Co-authored-by: 27856297+dependabot-preview[bot]@users.noreply.github.com <27856297+dependabot-preview[bot]@users.noreply.github.com>
Co-authored-by: Davide Garolini <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants