Graph Matplotlib To Show Total Count In The Histogram Bins
I am attempting to show a histogram. The array below is the count for each individual bin of the histogram. binVals = [0,5531608,6475325,1311915,223000,609638,291151,449434,1398731
Solution 1:
I think you're plotting the wrong thing. Matplotlib will calculate the histogram itself. It now plots that you have 14 bins with a value between 0 and 250,000, 3 with a value between 250,000 and 500,000 etc. If you calculate the histogram yourself, use a bar() plot, or let Matplotlib calculate the histogram for you.
For the tick labels, use set_xticklabels(["Under 600", "600-700",...], rotation = "vertical")
(I made the comments an answer, so it can be marked as answered)
Post a Comment for "Graph Matplotlib To Show Total Count In The Histogram Bins"