How to make a sunburst plot in R or Python?

Python version of sunburst diagram using matplotlib bars in polar projection: import numpy as np import matplotlib.pyplot as plt def sunburst(nodes, total=np.pi * 2, offset=0, level=0, ax=None): ax = ax or plt.subplot(111, projection=’polar’) if level == 0 and len(nodes) == 1: label, value, subnodes = nodes[0] ax.bar([0], [0.5], [np.pi * 2]) ax.text(0, 0, label, ha=”center”, … Read more