Python matplotlib demo: Use the result of collections counter and make histogram (bar plot)

Published: 29 May 2023
on channel: Thomas Blum
73
0

This video extends a previous video in which we used the collections Counter to determine the frequencies (number of occurrences) of letters in a particular poem. In this video we use the matplotlib -- a visualization library in Python -- to make nicer looking histograms than the terminal-level ones produced in the previous video. We prepare the data resulting from the collections counter to meet what was needed by matplotlib. First and foremost, it wanted two lists: one for the labels and one for the heights. We played a little more with colors, grids, and saving the plot to .png and .pdf formats.


Watch video Python matplotlib demo: Use the result of collections counter and make histogram (bar plot) online without registration, duration hours minute second in high quality. This video was added by user Thomas Blum 29 May 2023, don't forget to share it with your friends and acquaintances, it has been viewed on our site 73 once and liked it 0 people.