Subscribe Bookmark RSS Feed

Does anybody know which algorithm JMP uses to create tree map?

demo

Community Trekker

Joined:

Apr 18, 2014

It seems to be pivot-by-middle proposed by Ben Shneiderman, but I'm not sure. Does anybody know this?

Thanks!

1 ACCEPTED SOLUTION

Accepted Solutions
JohnPonte

Staff

Joined:

Jun 17, 2013

Solution

It actually is a variation on Split. It recursively divides the space, splitting the rectangle in the larger dimension. The variation is that it doesn't split in half but rather it uses the golden ratio. This algorithm preserves the order of the data but it does result in some rectangles with a larger aspect ratio.

We are looking at new tiling algorithms for a future version of JMP.

4 REPLIES
JohnPonte

Staff

Joined:

Jun 17, 2013

Solution

It actually is a variation on Split. It recursively divides the space, splitting the rectangle in the larger dimension. The variation is that it doesn't split in half but rather it uses the golden ratio. This algorithm preserves the order of the data but it does result in some rectangles with a larger aspect ratio.

We are looking at new tiling algorithms for a future version of JMP.

demo

Community Trekker

Joined:

Apr 18, 2014

Thank you. I'm trying to reproduce the treemap produced by JMP. While the treemap produced by me and that by JMP are similar overall, there are some difference.

Let me show you an example. I used the first twenty rows in Cities.jmp which is used by JMP to show the feature of treemap.

index  city                         POP 

1ALBANY846
2ALBUQUERQUE486
3ATLANTA2657
4ATLANTIC CITY303
5BALTIMORE2303
6BOSTON2842
7BURLINGTON127
8CHARLESTON502
9CHARLOTTE1091
10CHEYENNE76
11CHICAGO6199
12CINCINNATI1438
13CLEVELAND1851
14DENVER1645
15DES MOINES385
16DETROIT4362
17DUBUQUE91
18GALVESTON-T.C.211
19HARRISBURG584
20HARTFORD748

All POP sum to 28747, the first nine POP sum to 11157. The ratio is 11157/28747=0.3881, it already exceeded the golden ratio 0.382. However, the treemap produced by JMP further included the tenth datum in the upper part. So my question is that whether JMP uses exactly 0.382 as the split ratio or apart from this ratio, there are other factors affecting which part the datum should belong to(eg. to optimize the aspect ratio).

The two pictures below are produced by JMP and me, respectively. Notice the rectangles in the red area represent the same datum, but in different position. The layout box are both square.

6058_JMP.jpg6060_Matlab.jpg

Thanks

JohnPonte

Staff

Joined:

Jun 17, 2013

The difference is in the aspect ratio we are using. Looking at the code, we are using .39 instead of .382. When I change the code to use .382, I am able to reproduce your treemap. If you use .39 you should be able to reproduce the treemap in JMP.

demo

Community Trekker

Joined:

Apr 18, 2014

Yes, when I use 0.39, the results are the same. Thanks a lot!