<jupyter_start><jupyter_text>Simple histogram plot[Matplotlib's example](https://matplotlib.org/stable/gallery/statistics/histogram_features.htmlsome-features-of-the-histogram-hist-function) for histogram plots.<jupyter_code>import numpy as np
import matplotlib.pyplot as plt

np.random.seed(19680801)

# example data
mu = 100  # mean of distribution
sigma = 15  # standard deviation of distribution
x = mu + sigma * np.random.randn(437)

num_bins = 50

fig, ax = plt.subplots()

# the histogram of the data
n, bins, patches = ax.hist(x, num_bins, density=True)

# add a 'best fit' line
y = (1 / (np.sqrt(2 * np.pi) * sigma)) * np.exp(-0.5 * (1 / sigma * (bins - mu)) ** 2)
ax.plot(bins, y, "--")
ax.set_xlabel("Smarts")
ax.set_ylabel("Probability density")
ax.set_title(r"Histogram of IQ: $\mu=100$, $\sigma=15$")

# Tweak spacing to prevent clipping of ylabel
fig.tight_layout()
plt.show()<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.1476655808903366, 'fraction_numerical': 0.031487513572204126, 'mean_word_length': 4.872611464968153, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 1, '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}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '224412', 'license': 'MIT', 'n_tokens_mistral': 373, 'n_tokens_neox': 335, 'n_words': 83, 'path': 'notebooks/Plots/2-HistogramPlot.ipynb', 'repo_name': 'aperezhortal/nb_gallery_notebooks', 'size': '921'}