title: Wordcloud of bigram using Python
body: <p>I am generating a word cloud directly from the text file using Wordcloud packge in python. 
  Here is the code that I am re-using from stckoverflow:</p>
  
  <pre><code>import matplotlib.pyplot as plt
  from wordcloud import WordCloud, STOPWORDS
  
  
  def random_color_func(word=None, font_size=None, position=None, orientation=None, font_path=None, random_state=None):
      h = int(360.0 * 45.0 / 255.0)
      s = int(100.0 * 255.0 / 255.0)
      l = int(100.0 * float(random_state.randint(60, 120)) / 255.0)
  
      return "hsl({}, {}%, {}%)".format(h, s, l)
  
  file_content=open ("xyz.txt").read()
  
  wordcloud = WordCloud(font_path = r'C:\Windows\Fonts\Verdana.ttf',
                              stopwords = STOPWORDS,
                              background_color = 'white',
                              width = 1200,
                              height = 1000,
                              color_func = random_color_func
                              ).generate(file_content)
  
  plt.imshow(wordcloud,interpolation="bilinear")
  plt.axis('off')
  plt.show()
  </code></pre>
  
  <p>It is giving me wordcloud of single words. Is there any parameter in WordCloud() function to pass n-gram without formating the text file.</p>
  
  <p>I want word cloud of bigram. Or words attached with underscore in display. Like:
  machine_learning ( Machine and Learning would be 2 different words)</p>