Home > OS >  how to change color of censor tick and truncate KM curve if number at risk is < 5 using lifelines
how to change color of censor tick and truncate KM curve if number at risk is < 5 using lifelines

Time:08-02

Is it possible to change the colour of the censor tag in lifelines? The code-chunk that I used was

kmf.plot_survival_function(
    show_censors=True,
    censor_styles={'ms': 5, 'marker': '|'},
    at_risk_counts=True,
    ci_show=False
)

And how to truncate when the number at risk falls below a certain limit?

CodePudding user response:

The underlying class that is used in lifelines for drawing the markers is sample with red markers

  • Related