Open abubelinha opened 1 year ago
This is a good suggestion! I'll try to add the feafure when I'm free.
In my opinion, on the other hand, treemap is useful to compare the relative difference between groups, but not to obtain the absolute values. If we want to the absolute values, maybe adding values in the labels is an alternative choice.
Anyway, thanks for your suggestion!
Sure. That was just my use case (I know my target audience will look for numeric info in the axes. I need to use the labels for something different).
I opened this issue just in case other people could need to do it too.
Thanks!
El mar., 7 feb. 2023 16:31, chenyulue @.***> escribió:
This is a good suggestion! I'll try to add the feafure when I'm free.
In my opinion, on the other hand, treemap is useful to compare the relative difference between groups, but not to obtain the absolute values. If we want to the absolute values, maybe adding values in the labels is an alternative choice.
Anyway, thanks for your suggestion!
— Reply to this email directly, view it on GitHub https://github.com/chenyulue/matplotlib-extra/issues/3#issuecomment-1420969699, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAFKUQRPHRCWLYWKFSWZCCLWWJTE3ANCNFSM6AAAAAAUNA5J7U . You are receiving this because you authored the thread.Message ID: @.***>
I've been looking at the examples here.
Changing
ax.axis('off')
toax.axis('on')
we see those numerical scales, but they go from 0 to 100 by default, which is not very realistic:Ideally, the product of both axis lengths (thus 100 x 100) should be equal to the total summed area of all boxes (which is not 10000 in the example graphs, as US GDP value alone is 15684750). We cannot use width x height of each box to know the real GDP value for that country.
But we can correct axes x and y upper limits, so their product equals that total area sum of all boxes:
This way we can calculate any box GDP by its area (width x height). I think this is useful, so there could be an option to autocalculate norm_x and norm_y this way.