0

I am trying to create a word cloud in R, but it is hard to read because all of the words overlap one another. Below is an example of my problem.

df <- data.frame(c("word1","word2","word3","word4","word5","word6","word7","word8","word9"),c(.1,.2,.3,.7,0,.2,.4,.6,.5))
names(df) <- c('text','freq')
wordcloud(words=df$text,freq=df$freq,min.freq=.2,
          max.words=10,random.order=FALSE,rot.per=0.15,
          colors=brewer.pal(8, "Dark2"))

When I run this code, the words slightly overlap one another. With the real data that I'm using, this problem is much worse (and the words much less readable). Any ideas would be very appreciated!

Lily
  • 1
  • 1
    When I run your code, I got no overlap at all. Can you add a screenshot and your `sessionInfo()` and maybe some infos about the device (RStudio, png, pdf, ...) that you are printing on? – lukeA Mar 21 '17 at 20:40
  • 1
    Thanks for the quick response @lukeA! Now that I try to attach an image, I'm noticing that it must just be a viewing problem in RStudio and not a problem with R, since exported images do not have the overlap problem. (I am also not allowed to post images, since I'm a new user.) I'm okay with dealing with the overlap in RStudio, so will consider this solved :). – Lily Mar 21 '17 at 21:06

0 Answers0