python将plot转换为json

2024-09-29 01:35:46 发布

您现在位置:Python中文网/ 问答频道 /正文

我正在使用Kaplan Meierfitter方法并拟合数据。我正在使用plot显示图表。我希望输出为JSON,而不是显示图表。 下面是我的步骤

kmf=KaplanMeierFitter()

kmf.fit(x,y,label='Kaplan Meier Estimate')

kmf.plot(ci_show=False)

Tags: 数据方法cijsonplot图表步骤label