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

Bug Report: Truncated at risk number in risk table #216

Open
spiralparagon opened this issue Jun 15, 2024 · 2 comments
Open

Bug Report: Truncated at risk number in risk table #216

spiralparagon opened this issue Jun 15, 2024 · 2 comments

Comments

@spiralparagon
Copy link

spiralparagon commented Jun 15, 2024

Hi! I'm noticing a bug in the risktable, if the number at risk is more than 4 numbers, it seems the first number is being truncated somehow. Compare the following curves from ggsurvplot to ggsurvfit:

bild
bild

It's solveable using the size parameter to add_risktable, but I'm curious if this isn't a bug in relation to how to autodetermine size in relation to being forced in alignment the survival plot. I am using scale_ggsurvfit() in the call.

@ddsjoberg
Copy link
Collaborator

We're not doing anything to detect the width of the at risk numbers being reported. We just ensure the axis lines up. You can use ggplot functions (or scale_ggsurvfit()) to change the padding of the x axis scale or decrease the font size.

@ddsjoberg
Copy link
Collaborator

ACTION: Add a note to the scale_ggsurvfit() documentation indicating that large numbers may appear outside the plot region and include example of how to remedy this in an example.

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

No branches or pull requests

2 participants