Sunburst Chart
AWS Account Organization
Dark-themed sunburst chart showing AWS organization structure from root to organizational units to member accounts.
Output
Python
import matplotlib.pyplot as plt
import numpy as np
fig, ax = plt.subplots(figsize=(12, 10), facecolor='#0a0a0f')
ax.set_facecolor('#0a0a0f')
# Inner ring - OUs
ou_sizes = [35, 30, 20, 15]
ou_labels = ['Production', 'Development', 'Security', 'Sandbox']
ou_colors = ['#F54927', '#27D3F5', '#6CF527', '#F5B027']
# Outer ring - Accounts
acct_sizes = [12, 12, 11, 10, 10, 10, 10, 10, 8, 7]
acct_colors = ['#F54927', '#FF6B4A', '#FF8D73',
'#27D3F5', '#5CE8FF', '#8CF2FF',
'#6CF527', '#8FFF5C',
'#F5B027', '#FFCC5C']
wedges_outer, _ = ax.pie(acct_sizes, radius=1, colors=acct_colors,
wedgeprops=dict(width=0.3, edgecolor='#0a0a0f', linewidth=2))
wedges_inner, _ = ax.pie(ou_sizes, radius=0.7, colors=ou_colors,
wedgeprops=dict(width=0.3, edgecolor='#0a0a0f', linewidth=2))
# Add OU labels
for i, (wedge, label) in enumerate(zip(wedges_inner, ou_labels)):
ang = (wedge.theta2 - wedge.theta1) / 2 + wedge.theta1
x = 0.55 * np.cos(np.radians(ang))
y = 0.55 * np.sin(np.radians(ang))
ax.text(x, y, label, ha='center', va='center', fontsize=10,
color='white', fontweight='bold')
centre_circle = plt.Circle((0, 0), 0.4, fc='#0a0a0f', ec='#334155', linewidth=2)
ax.add_artist(centre_circle)
ax.text(0, 0, 'AWS Org\n10 Accounts', ha='center', va='center',
fontsize=12, color='white', fontweight='bold')
# Legend
acct_labels = ['prod-app', 'prod-data', 'prod-network', 'dev-main', 'staging',
'test', 'audit', 'logging', 'experiments', 'poc']
ax.legend(wedges_outer, acct_labels, loc='center left', bbox_to_anchor=(1.05, 0.5),
fontsize=9, frameon=True, facecolor='#1e293b', edgecolor='#334155',
labelcolor='white', title='Accounts', title_fontsize=10)
ax.set_title('AWS Organization', fontsize=18, color='#f8fafc',
fontweight='bold', pad=20)
plt.tight_layout()
plt.show()
Library
Matplotlib
Category
Part-to-Whole
More Sunburst Chart examples
☕