Given the words and their frequencies and the area of ββscreen real estate, what are some good approaches to installing a tag cloud in space? I can manipulate two variables:
- Font size (both absolute and gradient)
- Word count
All I can think of requires an iteration, for example, setting an upper bound on the number of words, and then a binary search by font size, until the words just fit the area. I would rather have an analytical solution.
One of the complications of my situation is that the clouds are resizable, so the algorithm should be able to handle 100x100 pixels or 1000x1000 pixels quite well.
Edit: I had to say that this is for a rich client application, and not for the Internet (hence the possibility of resizing). In addition, I was hoping to hear some experiences like "no one ever sees more than 100 words in a tag cloud, so don't bother showing them."
user-interface tag-cloud
Kent Beck
source share