from os import path
from scipy.misc import imread
import matplotlib.pyplot as plt
import random
from wordcloud import WordCloud, STOPWORDS
text = 'all your base are belong to us all of your base base base'
wordcloud = WordCloud(font_path='/Library/Fonts/Verdana.ttf',
    relative_scaling=1.0, stopwords='to of').generate(text)
plt.imshow(wordcloud)
plt.axis('off')
plt.show()
How to create a word cloud from a corpus in Python?