Recall & Review
beginner
What does DPI stand for in matplotlib?
DPI stands for Dots Per Inch. It controls the resolution of the saved figure, affecting how sharp or detailed the image looks.
Click to reveal answer
beginner
How does increasing DPI affect the saved image in matplotlib?
Increasing DPI makes the image sharper and more detailed by increasing the number of dots per inch, but it also increases the file size.
Click to reveal answer
beginner
Which matplotlib function parameter controls the DPI of a saved figure?
The 'dpi' parameter in the savefig() function controls the resolution of the saved image.
Click to reveal answer
beginner
True or False: DPI affects the size of the figure displayed on screen in matplotlib.
False. DPI mainly affects the resolution of saved images, not the size of the figure displayed on screen.
Click to reveal answer
intermediate
How can you set the DPI for a figure when creating it in matplotlib?
You can set the DPI by passing the 'dpi' argument when creating a figure, like plt.figure(dpi=150), to control resolution from the start.
Click to reveal answer
What does increasing DPI do to a matplotlib saved image?
✗ Incorrect
Increasing DPI increases the number of dots per inch, making the image sharper and larger in file size.
Which parameter controls DPI when saving a figure in matplotlib?
✗ Incorrect
The dpi parameter in savefig() sets the resolution of the saved image.
Does DPI affect the figure size shown on screen in matplotlib?
✗ Incorrect
DPI mainly affects the resolution of saved images, not the on-screen figure size.
How do you set DPI when creating a new figure in matplotlib?
✗ Incorrect
You set DPI at figure creation with plt.figure(dpi=150).
What happens if you save a matplotlib figure with a low DPI?
✗ Incorrect
Low DPI means fewer dots per inch, causing a blurry or pixelated saved image.
Explain what DPI means in matplotlib and how it affects your saved images.
Think about how many dots fit in one inch of your image.
You got /3 concepts.
Describe how to set DPI both when creating a figure and when saving it in matplotlib.
There are two places where DPI can be controlled.
You got /2 concepts.