Navigation
Synopsis Treemap layout.
Function Figure treemap(Figures nodes, FProperty props...)
Description Takes a list of nodes and and draws a treemap, see TreeMapping. The nodes can be arbitrary figures and each node should specify its area, through the area property. If the treemapping algorithm assigns a size to a figure that is smaller than its minimal size then a box (with the same properties) is drawn instead of the actual figure.
Examples
t = treemap([box(area(10),fillColor("green")),
	     box(area(20),fillColor("red")),
	     box(text("jada"),area(10)),
            box(vcat([
            	text("nested"),
            	treemap([box(area(5),fillColor("purple")),box(area(10),fillColor("orange"))])
            ],shrink(0.9)),area(30),fillColor("lightblue"))
     ]);
render(t);
treemap 1
Is this page unclear, or have you spotted an error? Please add a comment below and help us to improve it. For all other questions and remarks, visit ask.rascal-mpl.org.