Skip to content

Commit

Permalink
Add cycler dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
mdshw5 authored May 29, 2018
1 parent 64bda0e commit c9cb9f7
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions fastqp/plots.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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))
Expand Down Expand Up @@ -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))
Expand Down

0 comments on commit c9cb9f7

Please sign in to comment.