2

I have a shiny app that plots a wordcloud of terms and trying to get it to fit with labels inside the app is difficult. If I expand the screen everything fits but if I don't labels get cut off and it's because of all that extra whitespace that is forcing the labels so far away. Is there a way to remove the whitespace around the cloud? I read somewhere that's its because of the driver chosen for plot (png vs jpeg etc). The code I use for the ui is:

 fluidRow(plotOutput('wordcloud', width = "100%", height = '800'))

enter image description here

enter image description here

Ted Mosby
  • 1,426
  • 1
  • 16
  • 41
  • 1
    The **wordcloud2** package works better with Shiny, but does not have a comparison plot. I'm not completely sure how to control the spacing in the `wordcloud::comparison.cloud()` -- all that `quanteda::textplot_wordcloud(x, comparison = TRUE)` does is to pass the arguments through to that function. – Ken Benoit Feb 15 '18 at 16:42
  • Good to know. Might not be a way around it right now. I'll keep my eyes peeled and report back if I find anything. Thanks Ken! – Ted Mosby Feb 15 '18 at 17:20

0 Answers0