Box-and-whisker plots summarize continuous distributions without assuming normality. They display the median line, interquartile range (IQR box), whiskers (1.5x IQR), and outlier dots.
A statistical x-ray of data showing where the middle 50% of values congregate and highlighting extreme anomalies.
1. Minimum (lower whisker), 2. Q1 (25th percentile), 3. Median (orange line), 4. Q3 (75th percentile), 5. Maximum (upper whisker).
plt.boxplot(data, patch_artist=True)By default, Matplotlib draws boxplots as wireframes. `patch_artist=True` fills the box with solid background color.
plt.boxplot(data, patch_artist=True)Avoid the top errors and bad plotting practices that trip up new Python developers
Switch from abstract numbers to relatable Cricket, Cinema & Business charts
Write Matplotlib code to solve the objective and see your live plot render
Create a boxplot for `data = [10, 12, 14, 15, 18, 20, 22, 25, 40]` with `patch_artist=True`.
✓ plt.boxplot✓ patch_artistTest your understanding to unlock the lesson completion badge