Wolfram Function Repository
Instant-use add-on functions for the Wolfram Language
Function Repository Resource:
Plot a nested list of values as a treemap
ResourceFunction["TreemapPlot"][list] generates a treemap plot of the given list. |
"AspectRatio" | 1 | the aspect ratio of the resulting plot |
"Background" | Automatic | the background styling for all nodes |
"ColorFunction" | Automatic | a function f to style the subrectangles, which is called as f[path,area,leafQ] |
"FrameStyle" | Automatic | the edge styling for all nodes, which can be a directive or a function that is given the path of the node |
"ImageWidth" | 500 | the width of the resulting plot |
"LabelPosition" | Left | the position of the labels (Left,Right, or Center) |
"MaximumAspectRatio" | 4 | the maximum aspect ratio that can be used in the layout algorithm |
"Spacing" | 0.1 | amount of padding around branches/levels in the tree |
Make a few simple treemaps:
In[1]:= |
Out[1]= |
Style a treemap:
In[2]:= |
Out[2]= |
Play with the overall aspect and spacings at each depth of the tree:
In[3]:= |
In[4]:= |
Out[4]= |
In[5]:= |
Out[5]= |
In[6]:= |
Out[6]= |
Make a tree map with a specific color gradient:
In[7]:= |
Out[8]= |
This work is licensed under a Creative Commons Attribution 4.0 International License