Skip to content

[Bug]: g_km: x-axis alignment for plot and table #1428

@somb2025

Description

@somb2025

What happened?

Hello,
The axis for the plot and table are aligned when no xticks are specified as shown below:

library(dplyr)
library(tern)
library(ggplot2)

df <- tern_ex_adtte %>%
  filter(PARAMCD == "OS") %>%
  mutate(is_event = CNSR == 0)
variables <- list(tte = "AVAL", is_event = "is_event", arm = "ARMCD")

g_km(df = df, variables = variables)

Image

However, when the xticks are specified, the plot and table are no longer aligned. Please can you look into this?

g_km(df = df, variables = variables, xticks = c(1000, 2000))
Image

Thank you.

sessionInfo()

Relevant log output

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingsme

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions