From ce58fbc957bcbe7a3688a69073448ca472a7ced5 Mon Sep 17 00:00:00 2001 From: Erik Bernhardsson Date: Thu, 15 Aug 2019 15:23:52 -0400 Subject: [PATCH] reset color cycle between plots, for multiple models --- convoys/plotting.py | 1 + 1 file changed, 1 insertion(+) diff --git a/convoys/plotting.py b/convoys/plotting.py index af2bd37..f94ebcf 100644 --- a/convoys/plotting.py +++ b/convoys/plotting.py @@ -69,6 +69,7 @@ def plot_cohorts(G, B, T, t_max=None, model='kaplan-meier', # Plot t = numpy.linspace(0, t_max, 1000) _, y_max = ax.get_ylim() + ax.set_prop_cycle(None) # Reset to first color for i, group in enumerate(specific_groups): j = groups.index(group) # matching index of group