Match List-I with List-II
List-I List-II (A) Drawing a line plot (I) plt.bar(x, height, color = 'blue') (B) Saving a line plot (II) plt.hist(data, bins =20, color='green') (C) Drawing a bargraph (III) plt.plot(x, y, color = 'red') (D) Drawing a histogram (IV) plt.savefig('lineplot.jpg')
Match List-I with List-II
| List-I | List-II |
|---|---|
| (A) Drawing a line plot | (I) plt.bar(x, height, color = 'blue') |
| (B) Saving a line plot | (II) plt.hist(data, bins =20, color='green') |
| (C) Drawing a bargraph | (III) plt.plot(x, y, color = 'red') |
| (D) Drawing a histogram | (IV) plt.savefig('lineplot.jpg') |
Solution
✅ Correct Option: 4
| List I | List II |
|---|---|
| (A) Drawing a line plot | (III) plt.plot(x, y, color = 'red') |
| (B) Saving a line plot | (IV) plt.savefig('lineplot.jpg') |
| (C) Drawing a bargraph | (I) plt.bar(x, height, color = 'blue') |
| (D) Drawing a histogram | (II) plt.hist(data, bins =20, color='green') |
plot = line, bar = bar graph, hist = histogram, savefig = save to a file.
Call plt.savefig() before plt.show(), otherwise the saved image may be blank.
Related questions:
2026: 11 May Shift 2
2026: 13 May Shift 2
2026: 26 May Shift 1