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

KM figures cut off at ends with visr(x_ticks=) #402

Closed
ddsjoberg opened this issue Jun 10, 2022 · 2 comments · Fixed by #437
Closed

KM figures cut off at ends with visr(x_ticks=) #402

ddsjoberg opened this issue Jun 10, 2022 · 2 comments · Fixed by #437
Labels
issue Used for project filtering

Comments

@ddsjoberg
Copy link
Collaborator

When using visr.survfit(x_ticks=) to reduce the range of values shown, the curves a cut off early, rather than being zoomed in on. In the example below, the KM curves are cut off, but you can see from the risk table that them are still patients at risk at 10 years and the lines do not appear.

Perhaps we should use coord zoom rather than xlim?

image

@ddsjoberg ddsjoberg added the issue Used for project filtering label Jun 10, 2022
@timtreis
Copy link
Collaborator

timtreis commented Jun 24, 2022

Played around with it hoping for a quick fix and it looks a bit more complex than a 30 min fix. It seems the line until the end is primarily motivated by the next drop. Would it even be numerically correct to extend the line since at that point we have no data basis for it

@ddsjoberg
Copy link
Collaborator Author

I think if we switch from xlim to coord_cartesian(), the figure will zoom-in to the specified limits after the graph is constructed, rather than delete data outside the limits then build graph. @timtreis and I agree, not a simple fix!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
issue Used for project filtering
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants