treemap icon indicating copy to clipboard operation
treemap copied to clipboard

Enhancement: add strip algorithm

Open ugroempi opened this issue 7 years ago • 1 comments

Hi Martijn,

I have looked at treemap and its references, and I like the very simple strip approach in Bederson, Shneiderman and Wattenberg (2002), because it perfectly preserves order in a very linear way. I have written a function (strip) that does the calculations, resolving the issue of getting very lean last strips by a quick and dirty check whether the last two strips should be merged. I have checked out its performance against pivotSize and squarified (simulated data, informal checks only). strip seems to do quite well in terms of maximum and average aspect ratio.

I attach the function and functions for checking it out (strip_algorithm_for_treemap_GPLge2.zip); I tried to make the function yield the output that you need, but I don't know treemap well enough to be sure that it fits all treemap requirements; at least it seems to handle the plot's aspect ratio a little differently, but that should be a rescaling issue only. Feel free to use and modify as needed for incorporating this nice little algorithm into treemap.

Best, Ulrike

ugroempi avatar Nov 18 '17 17:11 ugroempi

Thx, I'll take a look at it soon. I'm trying to catch up with the maintenance work:-)

mtennekes avatar Jul 23 '18 12:07 mtennekes