1. Home
  2. Data Science
  3. Matplotlib
  4. In plt.figure(figsize=(10, 4)), the numbers specify:

Added 2 Nov 2026

In plt.figure(figsize=(10, 4)), the numbers specify:

  1. Rows and columns of subplots
  2. Font size and line width
  3. Width and height in pixels
  4. Width and height in inches Correct answer

Correct answer

D. Width and height in inches

17 views

MCQSEXAM

Explanation

figsize is in inches. The pixel size is figsize × dpi, so (10, 4) at 100 dpi gives a 1000 × 400 image.

Reference

Asked in: Data Science Interviews

Preparing for an exam?

Doubts & discussion

Not sure why the answer is D? Ask here and get an explanation.

Ask a doubt about this MCQ

Shown after review. No links please.

More Matplotlib MCQs

Practise all Matplotlib MCQs

Similar MCQs