Area Chart
Revenue Breakdown
Stacked area by revenue source with annotations.
Output
Python
import matplotlib.pyplot as plt
import numpy as np
# Data - Revenue by source
quarters = ['Q1', 'Q2', 'Q3', 'Q4']
x = np.arange(len(quarters))
subscriptions = [45, 52, 58, 65]
services = [25, 28, 32, 35]
products = [20, 22, 25, 28]
other = [10, 8, 10, 12]
# Figure - LIGHT THEME
fig, ax = plt.subplots(figsize=(10, 6), facecolor='#ffffff')
ax.set_facecolor('#ffffff')
# Stacked area with NEON colors
ax.stackplot(x, subscriptions, services, products, other,
labels=['Subscriptions', 'Services', 'Products', 'Other'],
colors=['#F5276C', '#27D3F5', '#6CF527', '#F5B027'], alpha=0.8)
# Annotations
for i, (s, sv, p, o) in enumerate(zip(subscriptions, services, products, other)):
total = s + sv + p + o
ax.annotate(f'${total}M', (i, total + 2), ha='center', fontsize=10,
color='#1f2937', fontweight='bold')
# Styling
ax.set_xlabel('Quarter', color='#1f2937', fontsize=11)
ax.set_ylabel('Revenue ($M)', color='#1f2937', fontsize=11)
ax.set_title('Quarterly Revenue Breakdown', color='#1f2937', fontsize=14, fontweight='bold', pad=15)
ax.set_xticks(x)
ax.set_xticklabels(quarters)
ax.tick_params(colors='#374151', labelsize=9)
for spine in ax.spines.values():
spine.set_color('#e5e7eb')
ax.spines['top'].set_visible(False)
ax.spines['right'].set_visible(False)
ax.yaxis.grid(True, color='#f3f4f6', linewidth=0.5)
ax.legend(loc='upper left', facecolor='#ffffff', edgecolor='#e5e7eb', labelcolor='#1f2937')
plt.tight_layout()
plt.show()
Library
Matplotlib
Category
Basic Charts
More Area Chart examples
☕