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

cannot plot data with km.plot #8

Open
giansalvo opened this issue Jun 9, 2023 · 1 comment
Open

cannot plot data with km.plot #8

giansalvo opened this issue Jun 9, 2023 · 1 comment

Comments

@giansalvo
Copy link

giansalvo commented Jun 9, 2023

myeloma_kaplan_clean.csv
Thanks for your work. I'm using Pycharm and I'm not able to plot for my data. Please see attached file.
Is there a way to save the plot instead of showing it?

Fixed by adding plt.show()

@erdogant
Copy link
Owner

erdogant commented Jun 23, 2024

I added a small example in the documentationpages to save plots. I also added the visible input parameter and dpi. Update to the latest version with:

pip install -U kaplanmeier

import kaplanmeier as km
import pandas as pd

df = pd.read_csv(r'myeloma_kaplan_clean.csv', sep=';')
results = km.fit(df['time'], df['died'], df['sex'])
fig, ax = km.plot(results, visible=True, savepath='fig.png')

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