pylyrics2.plot_cloud
Module Contents
Functions
|
Creates a wordcloud of most occuring words in a string or list of strings |
- pylyrics2.plot_cloud.plot_cloud(song, file_path, max_font_size=30, max_words=120, background_color='black')[source]
Creates a wordcloud of most occuring words in a string or list of strings
- Parameters
song (dictionary) – with artist as dictionary key and song_title as value. Both key and value are strings.
file_path (str) – The location to save the file without file format
max_font_size (int, optional) – maximum font size
max_words (int, optional) – maximum number of words to be included in wordcloud
background_color (str, optional) – background color
- Returns
A wordcloud image supported by matplotlib
- Return type
image
Example
>>> from pylyrics2 import plot_cloud >>> plot_cloud(song, file_path, max_font_size=30, max_words=100, background_color='black')