Hi,
For a project I am currently working, I need to draw tree map, icicle and sunburst chart types.
I read about using matplotlib for this purpose. According to what I’ve read there is no direct way of drawing these chart types like calling a function.
I found out some open-source python packages using matplotlib to draw tree map and sunburst.
-
squarify (GitHub - laserson/squarify: Pure Python implementation of the squarify treemap layout algorithm)
This usesmatplotlib.axes.Axes.bar
(matplotlib.axes.Axes.bar — Matplotlib 3.5.2 documentation) to draw the tree map. -
sunburst (sunburst/plot.py at master · klieret/sunburst · GitHub)
This usesmatplotlib.patches.Wedge
(matplotlib.patches.Wedge — Matplotlib 3.5.2 documentation) to draw the sunburst chart.
I couldn’t find a package for icicle. But it is similar to the tree map. I believe it would also be possible to draw icicle using a method similar to the tree map.
My question is, “Are these packages drawing those chart types in the best way ?”. I mean is there a better way to support chart types I’ve mentioned above ?
I am bit confused about using patches for drawing charts like sunburst. I feel like using patches for drawing a new chart type is not what patches are intended to be used.
Your help is appreciated. Thank you.