Skip to main contentSkip to solution

Which Python library is used for generating charts and graphs?

Solution

✅ Correct Option: 1

matplotlib is Python's standard plotting library. Its pyplot module creates line charts, bar charts, histograms, scatter plots and other graphs.

Typical use: import matplotlib.pyplot as plt, then plt.plot(x, y) and plt.show().


Option 2: pandas is for data analysis with DataFrames. Its .plot() method only calls matplotlib internally.

Option 4: numpy is for numerical arrays and mathematical operations, not for drawing charts.

Option 3: there is no standard Python library called "graphical".

Keyboard Shortcuts

  • Left arrow: Previous question
  • Right arrow: Next question
  • S key: Jump to solution
  • Q key: Jump to question