ECDF Plot

Memory Usage ECDF

Dark theme ECDF for application memory consumption

Output
Memory Usage ECDF
Python
import matplotlib.pyplot as plt
import numpy as np

fig, ax = plt.subplots(figsize=(10, 6), facecolor='#0a0a0f')
ax.set_facecolor('#0a0a0f')

np.random.seed(42)
memory_mb = np.random.lognormal(6, 0.6, 800)

ax.ecdf(memory_mb, color='#06b6d4', linewidth=2.5)

warning = 500
critical = 1000
ax.axvline(x=warning, color='#fbbf24', linestyle='--', linewidth=2, label=f'Warning: {warning}MB')
ax.axvline(x=critical, color='#ef4444', linestyle='--', linewidth=2, label=f'Critical: {critical}MB')

ax.set_xlabel('Memory Usage (MB)', fontsize=12, color='white')
ax.set_ylabel('Cumulative Probability', fontsize=12, color='white')
ax.set_title('Application Memory Usage', fontsize=16, fontweight='bold', color='white', pad=20)
ax.tick_params(colors='white')
ax.set_xlim(0, 1500)
ax.legend(facecolor='#1a1a2f', edgecolor='#333', labelcolor='white')
ax.grid(True, alpha=0.2, color='white')

for spine in ax.spines.values():
    spine.set_color('#333')

plt.tight_layout()
Library

Matplotlib

Category

Statistical

Did this help you?

Support PyLucid to keep it free & growing

Support