2024-09-29 01:35:46 发布
网友
我正在使用Kaplan Meierfitter方法并拟合数据。我正在使用plot显示图表。我希望输出为JSON,而不是显示图表。 下面是我的步骤
kmf=KaplanMeierFitter() kmf.fit(x,y,label='Kaplan Meier Estimate') kmf.plot(ci_show=False)
如果只想保存绘图,可以执行以下操作:
ax = kmf.plot() ax.get_figure().savefig("savefig.png")
如果只想保存绘图,可以执行以下操作:
相关问题 更多 >
编程相关推荐