Which Python library is used for generating charts and graphs?
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".
Related questions:
2026: 26 May Shift 1
2026: 18 May Shift 2
2026: 11 May Shift 2
2026: 26 May Shift 1