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

Plot on preexisting Axes #10

Closed
adamvis opened this issue Jun 21, 2024 · 2 comments
Closed

Plot on preexisting Axes #10

adamvis opened this issue Jun 21, 2024 · 2 comments

Comments

@adamvis
Copy link

adamvis commented Jun 21, 2024

At the moment "plot" method directly plots stdout. It would be better to accept an ax parameter (as for pandas) to direct plot output to

@erdogant
Copy link
Owner

Agree. I created a update. The new version can have an ax as input parameter now.
pip install -U kaplanmeier

import kaplanmeier as km
# Example data
df = km.example_data()
# Fit
results = km.fit(df['time'], df['Died'], df['group'])
# Plot
fig, ax = km.plot(results)
fig, ax = km.plot(results, ax=ax)

@adamvis adamvis closed this as completed Jun 24, 2024
@adamvis
Copy link
Author

adamvis commented Jun 24, 2024

Thanks for the update!

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