-
Notifications
You must be signed in to change notification settings - Fork 164
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
ggsurvplot() and axes offset from the origin #196
Comments
New argument |
Hello, @kassambara How can I make sure the 100% in the figure ? |
@ShixiangWang I was able to fix it by just increasing the y limits. ylim=c(0,1.01) |
@akirosingh Thanks :) |
Hello @kassambara, |
Hey, I ran in to the same problem. The alignment of the risk.table is completely shifted, once you use axis.offset = TRUE. |
(User request by e-mail)
ggsurvplot follow the standard R/ggplot convention of having the axes offset from the origin (I have never understood why this is the case – since basic mathematics you always show x=y=0 as the origin). Normally I would get around this by using yaxs="i" in plot, and I believe there is a similar way with expand limits in ggplot, however when I do this, the axis disappears.
Normally it is a bit of an annoyance, but with Kaplan-Meier plots is actually quite critical – after all we want to see when survival hits y=0 – with the values offset and a large number of patients you aren’t sure if it has hit 0, or there is still someone left! Any advice would be great, and even better if the default in the package was changed at the next update, as those who would want it offset must be in a minority i.e. nobody. Also if someone isn’t fussy, they should get the more accurate version!
The text was updated successfully, but these errors were encountered: