def plot_survival(self, ax=None): if ax is None: ax = pl.figure().add_subplot(111) from arsenal.maths import cdf ts = np.array(self.times) xs = np.linspace(0, ts.max(), 1000) ax.plot(xs, 1-cdf(ts)(xs), label=self.name) ax.legend(loc='best'); ax.set_xscale('log'); ax.set_yscale('log')
def plot_survival(self): from arsenal.maths import cdf ts = np.array(self.times) xs = np.linspace(0, ts.max(), 1000) pl.plot(xs, 1 - cdf(ts)(xs), label=self.name) pl.legend(loc='best') pl.xscale('log') pl.yscale('log')