1. Home
  2. Data Science
  3. Matplotlib
  4. Which call makes the y-axis of the current plot logarithmic?

Added 2 Nov 2026

Which call makes the y-axis of the current plot logarithmic?

  1. plt.ylabel('log')
  2. plt.ylog(True)
  3. plt.yscale('log') Correct answer
  4. plt.yaxis('log')

Correct answer

C. plt.yscale('log')

16 views

MCQSEXAM

Explanation

plt.yscale('log'), or ax.set_yscale('log'), is useful for data spanning several orders of magnitude, such as population or COVID case counts.

Reference

Asked in: Data Science Interviews

Preparing for an exam?

Doubts & discussion

Not sure why the answer is C? 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