I am trying to plot a bar graph where the x-axis represents the first element of each tuple and the y-axis is the second element of each tuple.
Something very similar to this post: Using Counter() in Python to build histogram?
arr = [(0, 152),
     (1, 106),
     (2, 71),
     (3, 89),
     (4, 69),
     (5, 83),
     (6, 139),
     (7, 141),
     (8, 164),
     (9, 75),
     (10, 98)]
How can I do this?
I have this so far:
Input:
plt.bar(counts.items())
Output:
TypeError: <lambda>() takes at least 2 arguments (1 given)
Thanks :)
 
     
    
