ECDF Plot

Page Load Time ECDF

Light theme ECDF for website performance metrics

Output
Page Load Time ECDF
Python
import matplotlib.pyplot as plt
import numpy as np

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

np.random.seed(42)
load_times = np.random.lognormal(0.8, 0.5, 1000)

ax.ecdf(load_times, color='#0891b2', linewidth=2.5)

good = 2
poor = 4
ax.axvline(x=good, color='#22c55e', linestyle='--', linewidth=2, label=f'Good (<{good}s)')
ax.axvline(x=poor, color='#ef4444', linestyle='--', linewidth=2, label=f'Poor (>{poor}s)')

ax.set_xlabel('Load Time (seconds)', fontsize=12, color='#1f2937')
ax.set_ylabel('Cumulative Probability', fontsize=12, color='#1f2937')
ax.set_title('Page Load Time ECDF', fontsize=16, fontweight='bold', color='#1f2937', pad=20)
ax.set_xlim(0, 10)
ax.legend(loc='lower right')
ax.grid(True, alpha=0.3)

for spine in ['top', 'right']:
    ax.spines[spine].set_visible(False)

plt.tight_layout()
Library

Matplotlib

Category

Statistical

Did this help you?

Support PyLucid to keep it free & growing

Support