I do not know how I can modify the output image provide by lifelines since I am unfamiliar with "cph.plot_covariate_groups". Unfortunately, there seems no detailed description about it in the link here; https://lifelines.readthedocs.io/en/latest/Survival%20Regression.html .
What I am looking for is, (1) how to shorten the event days (X axis), I do not want to show such a long days for the survival curve. Ideally, 4000 is the best. (2) Also, if possible, I would like to remove the baseline survival curve from my image. (3) I am also hoping if I could change the color of the survival curves from orange/blue to others.
import pandas as pd
from lifelines import AalenAdditiveFitter, CoxPHFitter, KaplanMeierFitter
data = pd.read_csv("cluster label.csv", index_col=0)
cph = CoxPHFitter()
cph.fit(data, duration_col="time", event_col="status")
cph.plot_covariate_groups('label', [0,1])
This is all possible. Information about specific functions and methods are available on the docs page: https://lifelines.readthedocs.io/en/latest/References.html
So try this:
cph.plot_covariate_groups('label', [0,1],
plot_baseline=False,
cmap='coolwarm'
)
plt.xlim(0, 4000)