Hello everyone,
I'd like to create a simple word cloud to use as one of a number of programming examples for my students. I obviously do not want to use Mathematica's slick WordCloud function. Here is what I have so far, which isn't very much: the placement of the styled word Howdy at position {4, 4} in a graphics object whose size is 288.
Graphics[Style[Text["Howdy", {4, 4}], FontFamily -> "Palatino",
FontSize -> 22, FontColor -> Orange], ImageSize -> 288]
Suppose that Howdy is the most frequent word in my text, so that, at 22 points, it must display as the biggest in my word cloud. The other, less frequent words will be displayed around it in smaller fonts. That's where I'm stuck. I realize that this is an arrangement or packaging problem, where I need to arrange all of the words in the graphics area in such a way that they do not overlap. But in order to do this I need the location of Howdy as a rectangle that most snugly encloses it (top-left, top-right, bottom-left, bottom right) so that I can place the other words. How should I approach this? Perhaps I should be using something other than the Graphics function?
Regards,
Gregory