Master programming syntax, solve interactive challenges & run live code in Syntaxis Explore Arena →
menu_book Course Curriculum (Matplotlib) expand_more
Matplotlib / Figure Basics

Histogram

Learn Histogram in Matplotlib with a dedicated explanation, a topic-specific example, edge guidance, and a mastery check.

12 min read • Beginner
matplotlib-006.py
python
import matplotlib.pyplot as plt
import numpy as np
rng=np.random.default_rng(42); values=rng.normal(100,15,500)
fig,ax=plt.subplots(); ax.hist(values,bins=20); plt.show()
What to watch
Content source & attribution
Original Syntaxis Content · Original Syntaxis Content