ECDF Plot

Multi-Distribution Comparison

Light theme comparing multiple distributions with ECDF

Output
Multi-Distribution Comparison
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)
normal = np.random.normal(0, 1, 500)
uniform = np.random.uniform(-2, 2, 500)
exponential = np.random.exponential(1, 500) - 1

ax.ecdf(normal, color='#3b82f6', linewidth=2, label='Normal')
ax.ecdf(uniform, color='#10b981', linewidth=2, label='Uniform')
ax.ecdf(exponential, color='#f59e0b', linewidth=2, label='Exponential')

ax.set_xlabel('Value', fontsize=12, color='#1f2937')
ax.set_ylabel('Cumulative Probability', fontsize=12, color='#1f2937')
ax.set_title('Distribution Comparison', fontsize=16, fontweight='bold', color='#1f2937', pad=20)
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