Skip to content
Plotly templates

Math — Plot: Kaplan–Meier Survival

A step-wise survival curve.

Template previewPlotly
Rendering…

Make it your own.

{
  "data": [
    {"type":"scatter","mode":"lines+markers","name":"survival","line":{"color":"#2563eb","width":3,"shape":"hv"},
     "x":[0,2,4,6,8,10,12],"y":[1.0,0.9,0.8,0.65,0.5,0.4,0.35]}
  ],
  "layout": {"title":"Kaplan-Meier survival","xaxis":{"title":"time (months)"},"yaxis":{"title":"survival probability"}}
}