# Histogram

*noun*

say it: **“HIS-tuh-gram”** **/ˈhɪstəˌɡræm/**

A chart of touching bars that shows how many values fall in each range, so you can see how numbers are spread out.

## What is a **histogram**?

A **histogram** splits one column of numbers into ranges and draws a bar for how many values fall in each, with the
bars touching. It shows how the values are spread: where most of them sit, how far they reach, and whether a few big
ones pull the average up. In matplotlib, `ax.hist()` draws one.

```python
import matplotlib.pyplot as plt
fig, ax = plt.subplots()
ax.hist(orders["order_total"], bins=range(0, 55, 5))   # a bar for $0-5, $5-10 and so on
ax.set_xlabel("Order total ($)")
ax.set_ylabel("Number of orders")
```

## In a sentence

- “The **histogram** showed most orders were under $15.”
- “A **histogram** of wait times made the few very long waits stand out.”

Level: Apprentice · [More Python terms at this level](https://www.ask-codey.com/glossary?category=python&level=2)

Updated: November 19, 2026

Source: https://www.ask-codey.com/glossary/histogram
