Skip to content
Plotly templates

Kaplan-Meier Survival

Survival curves with step traces — Prism replacement.

Template previewPlotly
Rendering…

Make it your own.

{
  "data":[
    {"type":"scatter","mode":"lines","line":{"shape":"hv","width":3,"color":"#1f47f5"},
     "name":"Treatment","x":[0,5,10,15,20,25,30,35,40,45],"y":[1,0.95,0.92,0.88,0.84,0.82,0.78,0.75,0.72,0.7]},
    {"type":"scatter","mode":"lines","line":{"shape":"hv","width":3,"color":"#dc2626"},
     "name":"Control","x":[0,5,10,15,20,25,30,35,40,45],"y":[1,0.9,0.78,0.66,0.55,0.45,0.38,0.32,0.25,0.2]}
  ],
  "layout":{"title":"Kaplan-Meier survival","xaxis":{"title":"Time (months)"},"yaxis":{"title":"Survival probability","range":[0,1]}}
}