How is grayscale image data represented?
As a 2D array where each pixel stores a tuple of intensity values
How is RGB(A) image data represented?
As a 3D array: 2 spatial dimensions plus 1 color-channel dimension (red, green, blue, optional alpha).
What is the file suffix and key property of JPEG?
.jpg or .jpeg; pixel-based raster graphics with lossy compression (data lost on save).
What is the file suffix and key property of PNG?
.png; pixel-based raster graphics with lossless compression (no data lost).
What is the file suffix and key property of SVG?
.svg
vector-based graphics drawn from specifications;
no resolution loss when zooming;
lossless compression;
natively supported by matplotlib
When is SVG preferred?
For images where resolution matters and vector design is possible (e.g., line plots, histograms, diagrams).
What is a matplotlib backend?
The system-specific engine that renders plots. Different backends support interactivity, animations, or 3D plots.
Why might a plot look different on different operating systems?
Because different backends are used depending on the OS.
Difference between interactive and non-interactive modes in matplotlib?
Interactive shows plots immediately; non-interactive requires explicit show commands.
What is a Figure in matplotlib?
The overall window or canvas for plotting; supports interaction and can be saved as an image file.
What is an Axes in matplotlib?
The object inside a figure where data is actually plotted. A figure can contain multiple Axes, and you can draw to each multiple times.
How is ‘Axis’ different from ‘Axes’ in matplotlib terminology?
Axis refers to number lines (x-axis, y-axis), whereas Axes refers to the plotting area object.
An alpha channel in RGB images represents …?
opacity