Skip to main contentSkip to solution

Match List-I with List-II

List-IList-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 IList 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.

Keyboard Shortcuts

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