Skip to content

Conversation

@kassambara
Copy link
Owner

Summary

  • Replace hardcoded grob width indices [2:5] with dynamic panel detection
  • Ensure proper chart/risk table alignment across ggplot2 versions >= 3.5.0
  • Maintain backward compatibility with older ggplot2 versions

Test plan

  • Verify alignment works with ggplot2 3.5.2+
  • Run existing test suite (15 tests pass)
  • Test basic and complex ggsurvplot scenarios
  • Confirm no regressions introduced

Fixes #649 and #675

Replace hardcoded grob width indices [2:5] with dynamic panel detection
to ensure proper alignment across ggplot2 versions. The fix maintains
backward compatibility while resolving misalignment issues.
@kassambara kassambara merged commit c36ccd1 into master Sep 2, 2025
5 checks passed
@kassambara kassambara deleted the fix-649-table-and-surv-align branch September 2, 2025 22:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

misalignment between the chart and the risk table in ggsurvplot

2 participants