I have the following dataframe:
df <- data.frame(word = c("text1","text2","text3","text3","text3","text3","text3","text3","text3","text3","text3","text3","text3","text3",
"text3","text3","text3","text3","text3","text3"),
freq = c(6500,6400,4500,4400,4000,3800,3300,2900,2300,1200,900,2496,5203,3507,724,1047,725,5739,3927,4085),
stringsAsFactors = FALSE)
and create the following wordcloud:
cloud2 <- wordcloud(words = df$word, min.freq = 1500,freq = df$freq,random.order=FALSE,
random.color = FALSE, rot.per=0.35, colors= brewer.pal(8,"Dark2"), scale = c(3,0),
vfont=c("sans serif","plain"))
Somehow, the different words have very much space between. So one or two words often are not completely visible.
Is there a possibility to remove the large distances?
In other wordclouds like in this link, the words are very close to each other.
used packages:
library(tm)
library(RColorBrewer)
library(wordcloud)