I'm trying to add a title to a wordcloud2 plot. I found a way to add the title, but it really makes the plot look ugly because the whitespace is way too much.
Here is a dataframe for example:
df <- structure(list(key = c("Hello", "Okay", "Apple", "Orange", "Cheerios",
"Today", "Tomorrow", "Water", "Steve", "Basket"), count = c(52L,
51L, 25L, 21L, 20L, 12L, 12L, 12L, 11L, 9L)), row.names = c(57L,
53L, 20L, 36L, 18L, 3L, 16L, 50L, 13L, 15L), class = "data.frame")
I managed to add a title with htmlwidgets::prependContent, but,there is just way too much whitespace. What can I do to make this look better and remove whitespace?
library(wordcloud2)
wordcloud2(data = df, size=.5, color='random-dark') %>%
htmlwidgets::prependContent(htmltools::tags$h1("Title"))
