Skip to content

Commit

Permalink
Changed normed to density in Matplotlib hist plots.
Browse files Browse the repository at this point in the history
  • Loading branch information
donovan-h-parks committed May 4, 2020
1 parent 6438d9a commit b08edd7
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion checkm/plot/codingDensityPlots.py
Expand Up @@ -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)')

Expand Down
2 changes: 1 addition & 1 deletion checkm/plot/gcPlots.py
Expand Up @@ -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)')

Expand Down
2 changes: 1 addition & 1 deletion checkm/plot/tetraDistPlots.py
Expand Up @@ -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)')

Expand Down
4 changes: 2 additions & 2 deletions scripts/simEvaluateBiasHistograms.py
Expand Up @@ -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--')
Expand Down

0 comments on commit b08edd7

Please sign in to comment.