Sunburst Chart

Retail Organization Structure

Dark-themed sunburst chart showing retail company organization from headquarters to regions to store types.

Output
Retail Organization Structure
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 - Regions
region_sizes = [30, 25, 25, 20]
region_labels = ['North America', 'Europe', 'Asia Pacific', 'LATAM']
region_colors = ['#276CF5', '#F5276C', '#6CF527', '#F5B027']

# Outer ring - Store types
store_sizes = [12, 10, 8, 10, 8, 7, 10, 8, 7, 10, 10]
store_colors = ['#276CF5', '#4A8CFF', '#6BA3FF',
                '#F5276C', '#FF5A94', '#FF8CB8',
                '#6CF527', '#8FFF5C', '#B2FF8C',
                '#F5B027', '#FFCC5C']

wedges_outer, _ = ax.pie(store_sizes, radius=1, colors=store_colors,
       wedgeprops=dict(width=0.3, edgecolor='#0a0a0f', linewidth=2))

wedges_inner, _ = ax.pie(region_sizes, radius=0.7, colors=region_colors,
       wedgeprops=dict(width=0.3, edgecolor='#0a0a0f', linewidth=2))

# Add region labels
for i, (wedge, label) in enumerate(zip(wedges_inner, region_labels)):
    ang = (wedge.theta2 - wedge.theta1) / 2 + wedge.theta1
    x = 0.52 * np.cos(np.radians(ang))
    y = 0.52 * np.sin(np.radians(ang))
    ax.text(x, y, label.replace(' ', '\n'), ha='center', va='center', fontsize=8, 
            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, 'RetailCo\n850 Stores', ha='center', va='center',
        fontsize=12, color='white', fontweight='bold')

# Legend
store_labels = ['Flagship', 'Mall', 'Outlet', 'Flagship', 'Street', 'Travel Retail',
                'Flagship', 'Mall', 'Express', 'Flagship', 'Partners']
ax.legend(wedges_outer, store_labels, loc='center left', bbox_to_anchor=(1.05, 0.5),
          fontsize=9, frameon=True, facecolor='#1e293b', edgecolor='#334155',
          labelcolor='white', title='Store Types', title_fontsize=10)

ax.set_title('Retail Organization', fontsize=18, color='#f8fafc',
             fontweight='bold', pad=20)

plt.tight_layout()
plt.show()
Library

Matplotlib

Category

Part-to-Whole

Did this help you?

Support PyLucid to keep it free & growing

Support