pharmaverse / ggsurvfit

http://www.danieldsjoberg.com/ggsurvfit/
Other
67 stars 19 forks source link

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

Open spiralparagon opened 2 weeks ago

spiralparagon commented 2 weeks ago

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 commented 1 week ago

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.