Skip to content

Conversation

@kassambara
Copy link
Owner

Summary

  • Fixes ggplot2 3.5.0 aesthetic length warning when using surv.median.line = "hv" or "h" with multiple survival curves
  • Resolves issue by creating single-row dataframe for horizontal median line instead of using scalar aesthetics with multi-row data

Test plan

  • Reproduced the original warning with multiple survival curves
  • Verified fix eliminates the warning
  • Tested all median line options (hv, h, v, none) work correctly
  • Ensured no visual regression in plot output
  • Ran package test suite with no failures

Closes #643

- Resolve warning when using surv.median.line = "hv"/"h" with multiple curves
- Create single-row dataframe for horizontal line to avoid scalar aesthetic with multi-row data
@kassambara kassambara merged commit 4e9ecfb into master Sep 2, 2025
5 checks passed
@kassambara kassambara deleted the fix-643-surv-med-warnings branch September 2, 2025 20:24
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.

surv.median.line triggers warnings in ggplot2 3.5.0

2 participants