Question
Informatics Practices Question on Plotting Data using Matplotlib
Arrange the following statements to create a bar chart:
(A) import matplotlib.pyplot as plt
(B) y=[50, 60, 70] (C) plt.plot(x, y) plt.show()
(D) plt.bar(x, y) plt.show()
(E) x=['Mon', 'Tue', 'Wed']
Choose thecorrect answer from the options given below:
A
(A), (E), (B), (D)
B
(A), (E), (B), (C)
C
(A), (B), (C), (D)
D
(A), (B), (E), (C)
Answer
(A), (E), (B), (D)
Explanation
Solution
The correct option is(A): (A), (E), (B), (D)