Matplot Lib MCQs with answers Page - 8

Here, you will find a collection of MCQ questions on Matplot Lib. Go through these questions to enhance your preparation for upcoming examinations and interviews.

To check the correct answer, simply click the View Answer button provided for each question.

Have your own questions to contribute? Click the button below to share your MCQs with others!

+ Add Question

A

Admin • 832.27K Points
Coach

Q. What does 'ax = fig.add_subplot(2,2,1)' do?

  • (A) Creates a subplot at position (2,2,1) in a 3D layout
  • (B) Adds a subplot in a 2x2 grid at the 1st position
  • (C) Creates 2 subplots in one row
  • (D) Adds multiple subplots to one figure

A

Admin • 832.27K Points
Coach

Q. Which of the following saves the figure in vector format?

  • (A) plt.savefig('plot.png')
  • (B) plt.savefig('plot.jpeg')
  • (C) plt.savefig('plot.svg')
  • (D) plt.savefig('plot.bmp')

A

Admin • 832.27K Points
Coach

Q. Which Matplotlib function displays a contour plot?

  • (A) plt.plot_surface()
  • (B) plt.contour()
  • (C) plt.isosurface()
  • (D) plt.mesh()

A

Admin • 832.27K Points
Coach

Q. What is the default figure DPI in Matplotlib?

  • (A) 72
  • (B) 80
  • (C) 100
  • (D) 150

A

Admin • 832.27K Points
Coach

Q. How do you turn off axis ticks and labels?

  • (A) plt.axis('off')
  • (B) plt.clear_axis()
  • (C) plt.hide_axis()
  • (D) plt.turn_off_axis()

A

Admin • 832.27K Points
Coach

Q. What does 'plt.cm' in Matplotlib refer to?

  • (A) Color map module
  • (B) Central marker
  • (C) Column management
  • (D) Custom marker

A

Admin • 832.27K Points
Coach

Q. Which of the following is NOT a valid colormap in Matplotlib?

  • (A) viridis
  • (B) plasma
  • (C) inferno
  • (D) sparkle

A

Admin • 832.27K Points
Coach

Q. Which parameter is used to make a histogram cumulative?

  • (A) density=True
  • (B) cumulative=True
  • (C) stacked=True
  • (D) agg=True

A

Admin • 832.27K Points
Coach

Q. Which argument specifies transparency in plt.plot()?

  • (A) alpha
  • (B) opacity
  • (C) transparency
  • (D) faded

A

Admin • 832.27K Points
Coach

Q. Which of the following commands sets a logarithmic scale on the y-axis?

  • (A) plt.yscale('log')
  • (B) plt.logscale('y')
  • (C) plt.setscale('y', 'log')
  • (D) plt.set_log_y(True)

Add MCQ in this Category

If you want to share an MCQ question in this category, it's a great idea! It will be helpful for many other students using this website.

Share Your MCQ