In Python, while using the matplotlib library for data visualization, which…

2026

In Python, while using the matplotlib library for data visualization, which function of the matplotlib.pyplot module is used to display the plotted graph on the screen?

  1. A.

    show_plot()

  2. B.

    display()

  3. C.

    render()

  4. D.

    show()

Attempted by 448 students.

Show answer & explanation

Correct answer: D

In matplotlib.pyplot, the function used to display a plotted graph on the screen is:

show()

After creating a plot (using plot(), bar(), etc.), you must call plt.show() to actually render and display the graph.

Explore the full course: Bpsc