ECDF Plot

Error Rate ECDF

Dark theme ECDF showing system error rate distribution

Output
Error Rate 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)
error_rate = np.random.exponential(0.5, 500)

ax.ecdf(error_rate, color='#ef4444', linewidth=2.5)

sla = 1.0
ax.axvline(x=sla, color='#22c55e', linestyle='--', linewidth=2, label=f'SLA: {sla}%')
pct_meeting = np.mean(error_rate <= sla) * 100
ax.text(sla + 0.1, 0.5, f'{pct_meeting:.1f}%\nmeeting SLA', fontsize=10, color='#22c55e')

ax.set_xlabel('Error Rate (%)', fontsize=12, color='white')
ax.set_ylabel('Cumulative Probability', fontsize=12, color='white')
ax.set_title('System Error Rate ECDF', fontsize=16, fontweight='bold', color='white', pad=20)
ax.tick_params(colors='white')
ax.set_xlim(0, 5)
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