From c9cb9f795f4d69e36e24da6b741165747f051b19 Mon Sep 17 00:00:00 2001 From: Matt Shirley Date: Tue, 29 May 2018 13:41:23 -0400 Subject: [PATCH] Add cycler dependency --- fastqp/plots.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/fastqp/plots.py b/fastqp/plots.py index c2ed462..685df0d 100644 --- a/fastqp/plots.py +++ b/fastqp/plots.py @@ -10,6 +10,7 @@ import matplotlib.mlab as mlab import scipy.stats from matplotlib.colors import LinearSegmentedColormap +from cycler import cycler from six.moves import map from six import BytesIO try: @@ -383,7 +384,7 @@ def nucplot(positions, nucs, counts, filename, fig_kw): max_depth = sum(tuple(counts[1].values())) cmap = mpl.cm.get_cmap(name='Set1') colors = [cmap(i) for i in np.linspace(0, 1, len(nuc_order))] - mpl.rcParams['axes.prop_cycle'] = mpl.cycler(color=colors) + mpl.rcParams['axes.prop_cycle'] = cycler(color=colors) fig, axes = plt.subplots( nrows=1, subplot_kw={legend_bg_color_kw: 'white'}, **fig_kw) nuc_percent = defaultdict(lambda: defaultdict(int)) @@ -528,7 +529,7 @@ def kmerplot(positions, counts, filename, top_kmers, fig_kw): top_kmers = [None] cmap = mpl.cm.get_cmap(name='Set1') colors = [cmap(i) for i in np.linspace(0, 1, len(top_kmers))] - mpl.rcParams['axes.prop_cycle'] = mpl.cycler(color=colors) + mpl.rcParams['axes.prop_cycle'] = cycler(color=colors) fig, axes = plt.subplots( nrows=1, subplot_kw={legend_bg_color_kw: 'white'}, **fig_kw) kmer_percent = defaultdict(lambda: defaultdict(int))