AI engineering glossary · NumPy pandas visualization
What is DPI (savefig)?
savefig (also called DPI, dots per inch): The Matplotlib call that writes a figure to an image or document file such as PNG, SVG or PDF. The dpi setting controls resolution in pixels per inch, and bbox_inches='tight' trims empty margins. It is used to export charts for reports and slides.
savefig: an example
fig.savefig('sales.png', dpi=200, bbox_inches='tight') writes a sharp PNG of the chart.
Related terms
More NumPy pandas visualization terms
Where you learn it
savefig is part of the AI Engineering Program, which teaches it with notes, a hands-on lab and an exam. The first lesson is free.