pycounts_bzrudski.plotting ========================== .. py:module:: pycounts_bzrudski.plotting Functions --------- .. autoapisummary:: pycounts_bzrudski.plotting.plot_words Module Contents --------------- .. py:function:: plot_words(word_counts: collections.Counter, n: int = 10) -> matplotlib.container.BarContainer Plot a bar chart of word counts. :param word_counts: Counter object of word counts. :type word_counts: collections.Counter :param n: Plot the top n words. By default, 10. :type n: int, optional :returns: Bar chart of word counts. :rtype: matplotlib.container.BarContainer .. rubric:: Examples >>> from pycounts_bzrudski.pycounts_bzrudski import count_words >>> from pycounts_bzrudski.plotting import plot_words >>> counts = count_words("text.txt") >>> plot_words(counts)