Matplotlib defines figure dimensions physically in inches (`figsize=(width, height)`) and resolution in Dots Per Inch (`dpi`). Pixel resolution is: $\text{Pixels} = \text{Inches} \times \text{DPI}$.
Ordering a photograph print: specifying the physical print size (8x10 inches) and print resolution (300 DPI).
Width in Pixels = `figsize[0] * dpi`. Height in Pixels = `figsize[1] * dpi`.
plt.figure(figsize=(10, 6), dpi=150)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 figure with `figsize=(8, 4)` and `dpi=100`, plot `[1, 2, 3]` and title it 'Custom Size'.
✓ figsize✓ dpiTest your understanding to unlock the lesson completion badge