-
Notifications
You must be signed in to change notification settings - Fork 113
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Lettercloud skips words #16
Comments
The size in wordcloud2 is not responsive. If the size of the word is larger than the space, it would not show in the wordcloud. |
I had this problem myself, and I wanted to share my solution. My two data frames had over 1500 words, with about half of them being used only once, and the top words in both data frames having a frequency count of several hundred. When I set the size to 0.3 so that wordcloud2 would display my top words, then the other words were displayed in such a tiny font that they were both unreadable and didn't even fill up my custom figure. I solved this by taking the square root of all of my word frequencies, which evened out the extreme polarity between 1 instance of use and 400 instances of use of words. My word clouds still require me to set the size fairly small, but they now show the top words just fine, the less popular words aren't too tiny, and the size difference between the smallest and largest isn't as extreme. Beautiful package, thank you, Lchiffon! |
The adaptation offered by @aeluro gives very nice results visually. |
Square root solved my problem entirely and I overcame the "wrong" tooltip with the following bit of JS: $(document).on("mousemove", '#canvas', function(){ |
When I use letterCloud, it doesn't display all the high frequency words. The longer words I try to spell in letterCloud, the more words are missing. I notice that it is the same in the vignette https://cran.r-project.org/web/packages/wordcloud2/vignettes/wordcloud.html. The letterCloud for "R" doesn't display "Oil" and "Said" that appears to be the words with highest frequencies (displayed in the wordclouds above). The same for the "WORDCLOUD2" example in the vignette.
The text was updated successfully, but these errors were encountered: