title: With ggplot2, what code creates bars made of individual words and their count?
body: <p>To convey the relative frequencies of key words, I would like each "bar" in a plot to consist of one of the words repeated vertically by its frequency.  The <code>ggplot</code> code below removes the outline of the bar and the fill, but how can I create a "stack" of words as (or in) a bar according to the word's frequency?  Thus "global" would start at the x-axis and repeat "global" three times vertically, position against 1, 2, and 3 of the y-axis; "local" would stack five times, etc.</p>
  
  <pre><code># a toy data frame
  words &lt;- c("global", "local", "firm")
  freq &lt;- c(3, 5, 6)
  df &lt;-data.frame(cbind(words, freq))
  
  library("ggthemes")
  # a very unimpressive and uninformative plot
  ggplot(df, aes(x = words, y = freq)) +
    geom_bar(stat = "identity", fill = "transparent", colour = "white") +
    theme_tufte()
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/M4nZ3.png" alt="enter image description here"></p>
  
  <p>I tried to use <code>annotation_custom()</code> with a textGrob but couldn't figure out how to repeat the word by its frequency. </p>
  
  <p>Thank you for any guidance.</p>