<commit_before>#!/usr/bin/env python
import numpy as np
from rootpy.plotting import *
import rootpy.root2matplotlib as rplt
import matplotlib.pyplot as plt

# create a normal distribution
mu, sigma = 100, 15
x = mu + sigma*np.random.randn(10000)

# create a histogram with 100 bins from 40 to 160
h = Hist(100,40,160)

# fill
map(h.Fill, x)

# normalize
h /= h.Integral()

h.SetFillStyle("O")
h.SetFillColor("green")
h.SetLineColor("green")

# plot with ROOT
h.GetXaxis().SetTitle('Smarts')
h.GetYaxis().SetTitle('Probability')
h.SetTitle("Histogram of IQ: #mu=100, #sigma=15")
h.Draw("hist")

# plot with matplotlib
rplt.hist(h, alpha=0.75)
plt.xlabel('Smarts')
plt.ylabel('Probability')
plt.title(r'$\mathrm{Histogram\ of\ IQ:}\ \mu=100,\ \sigma=15$')
plt.show()<commit_msg>updates<commit_after>#!/usr/bin/env python
import numpy as np
from rootpy.plotting import *
import rootpy.root2matplotlib as rplt
import matplotlib.pyplot as plt

# create a normal distribution
mu, sigma = 100, 15
x = mu + sigma*np.random.randn(10000)

# create a histogram with 100 bins from 40 to 160
h = Hist(100,40,160)

# fill
map(h.Fill, x)

# normalize
h /= h.Integral()

h.SetFillStyle("O")
h.SetFillColor("green")
h.SetLineColor("green")

# plot with ROOT
h.GetXaxis().SetTitle('Smarts')
h.GetYaxis().SetTitle('Probability')
h.SetTitle("Histogram of IQ: #mu=100, #sigma=15")
h.Draw("hist")

# plot with matplotlib
rplt.hist(h, alpha=0.75, histtype="stepfilled")
plt.xlabel('Smarts')
plt.ylabel('Probability')
plt.title(r'$\mathrm{Histogram\ of\ IQ:}\ \mu=100,\ \sigma=15$')
plt.show()
{'fraction_non_alphanumeric': 0.165710643722116, 'fraction_numerical': 0.05098789037603569, 'mean_word_length': 5.28, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3926412', 'n_tokens_mistral': 692, 'n_tokens_neox': 603, 'n_words': 146}