ECDF Plot

Engagement Score ECDF

Light theme ECDF showing user engagement metrics

Output
Engagement Score 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)
engagement = np.clip(np.random.beta(2, 3, 600) * 100, 0, 100)

ax.ecdf(engagement, color='#ec4899', linewidth=2.5)

high_engagement = 60
ax.axvline(x=high_engagement, color='#059669', linestyle='--', linewidth=2, 
           label=f'High engagement (>{high_engagement})')

ax.set_xlabel('Engagement Score (0-100)', fontsize=12, color='#1f2937')
ax.set_ylabel('Cumulative Probability', fontsize=12, color='#1f2937')
ax.set_title('User Engagement Score ECDF', fontsize=16, fontweight='bold', color='#1f2937', pad=20)
ax.set_xlim(0, 100)
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