ECDF Plot

Bimodal Distribution ECDF

Light theme ECDF showing bimodal data pattern

Output
Bimodal Distribution 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)
mode1 = np.random.normal(-2, 0.8, 300)
mode2 = np.random.normal(2, 0.8, 300)
bimodal = np.concatenate([mode1, mode2])

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

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