TreeMap(树图) 树图是一种常见的表达『层级数据』『树状数据』的可视化形式。它主要用面积的方式,便于突出展现出『树』的各层级中重要的节点。 import json with open("treemap_data.json", "r", encoding="utf-8") as f: data = json.load(f)