From b08edd7644e439f820253e3b73339d964da048bf Mon Sep 17 00:00:00 2001 From: dparks1134 Date: Tue, 5 May 2020 04:43:35 +1000 Subject: [PATCH] Changed `normed` to `density` in Matplotlib hist plots. --- checkm/plot/codingDensityPlots.py | 2 +- checkm/plot/gcPlots.py | 2 +- checkm/plot/tetraDistPlots.py | 2 +- scripts/simEvaluateBiasHistograms.py | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/checkm/plot/codingDensityPlots.py b/checkm/plot/codingDensityPlots.py index c4ab449..8759451 100644 --- a/checkm/plot/codingDensityPlots.py +++ b/checkm/plot/codingDensityPlots.py @@ -98,7 +98,7 @@ def plotOnAxes(self, fastaFile, distributionsToPlot, axesHist, axesDeltaCD): bins.append(binEnd) binEnd += binWidth - axesHist.hist(data, bins=bins, normed=True, color=(0.5, 0.5, 0.5)) + axesHist.hist(data, bins=bins, density=True, color=(0.5, 0.5, 0.5)) axesHist.set_xlabel('% coding density') axesHist.set_ylabel('% windows (' + str(self.options.cd_window_size) + ' bp)') diff --git a/checkm/plot/gcPlots.py b/checkm/plot/gcPlots.py index af32706..4b5b2cc 100644 --- a/checkm/plot/gcPlots.py +++ b/checkm/plot/gcPlots.py @@ -86,7 +86,7 @@ def plotOnAxes(self, fastaFile, distributionsToPlot, axesHist, axesDeltaGC): bins.append(binEnd) binEnd += binWidth - axesHist.hist(data, bins=bins, normed=True, color=(0.5, 0.5, 0.5)) + axesHist.hist(data, bins=bins, density=True, color=(0.5, 0.5, 0.5)) axesHist.set_xlabel('% GC') axesHist.set_ylabel('% windows (' + str(self.options.gc_window_size) + ' bp)') diff --git a/checkm/plot/tetraDistPlots.py b/checkm/plot/tetraDistPlots.py index 51a6f6e..0deb190 100644 --- a/checkm/plot/tetraDistPlots.py +++ b/checkm/plot/tetraDistPlots.py @@ -91,7 +91,7 @@ def plotOnAxes(self, fastaFile, tetraSigs, distributionsToPlot, axesHist, axesDe bins.append(binEnd) binEnd += binWidth - axesHist.hist(data, bins=bins, normed=True, color=(0.5, 0.5, 0.5)) + axesHist.hist(data, bins=bins, density=True, color=(0.5, 0.5, 0.5)) axesHist.set_xlabel(r'$\Delta$ TD') axesHist.set_ylabel('% windows (' + str(self.options.td_window_size) + ' bp)') diff --git a/scripts/simEvaluateBiasHistograms.py b/scripts/simEvaluateBiasHistograms.py index 223e60c..eda3897 100755 --- a/scripts/simEvaluateBiasHistograms.py +++ b/scripts/simEvaluateBiasHistograms.py @@ -93,8 +93,8 @@ def plot(self): def plotOnAxes(self, axes, beforeCorrection, afterCorrection, xMin, xMax, yMin, yMax, bXLabel): numBins = 100 - n, bins, patches = axes.hist(beforeCorrection, numBins, normed=1, facecolor='blue', alpha=0.25, label='before correction') - n, bins, patches = axes.hist(afterCorrection, numBins, normed=1, facecolor='green', alpha=0.25, label='after correction') + n, bins, patches = axes.hist(beforeCorrection, numBins, density=1, facecolor='blue', alpha=0.25, label='before correction') + n, bins, patches = axes.hist(afterCorrection, numBins, density=1, facecolor='green', alpha=0.25, label='after correction') y = mlab.normpdf(bins, np.mean(beforeCorrection), np.std(beforeCorrection)) axes.plot(bins, y, 'b--')