DPI

noun

say it: “DEE-pee-EYE” /ˌdiˌpiˈaɪ/

Dots per inch: how many pixels go into each inch of a picture, which sets how sharp it looks when saved.

What does DPI mean when a chart is saved?

DPI, dots per inch, is how many pixels each inch of a saved picture becomes. A Figure 10 inches wide saved at 150 dpi is 1500 pixels wide, sharp on a slide or a printed page. matplotlib's default, 100, is fine on a screen.

fig.savefig("summary.png", dpi=150, bbox_inches="tight")   # 150 pixels for every inch

In a sentence

  • “At 150 DPI, the 10-inch page was 1500 pixels wide.”
  • “The chart looked blurry on the printout until she raised the DPI.”

Level: Apprentice · More Python terms at this level

Updated