2

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. enter image description here 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)
nississippi
  • 327
  • 2
  • 17
  • from the R-Tag Info: "R is a free, open-source programming language and software environment for statistical computing, bioinformatics, visualization and general computing. Provide minimal, reproducible, representative example(s) with your questions. Use dput() for data and **specify all non-base packages with library calls.** Do not embed pictures for data or code, use indented code blocks. For statistics questions, use http://stats.stackexchange.com." – Andre Elrico Sep 05 '18 at 10:55
  • Does [T H I S](https://stackoverflow.com/questions/30061563/directlabels-avoid-clipping-like-xpd-true) get you anywhere? – Andre Elrico Sep 05 '18 at 10:58
  • Thank you for the advice @AndreElrico. I added the used packages. Unfortunately your link could not help for this problem. It doesn't remove the large spaces between the words. – nississippi Sep 06 '18 at 14:26

1 Answers1

0

No problems here.

R version 3.4.1 (2017-06-30)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 7 x64 Service Pack 1


other attached packages:
wordcloud_2.5 

enter image description here

Roman
  • 17,008
  • 3
  • 36
  • 49
  • Mhm is it possbile that it depends on the screensize? I tried it now some more times in completely new R sessions and projects, but I always have the same problem... What do you exactly made with the package wordcloud_2.5? – nississippi Sep 06 '18 at 14:25