Update visualization.py
Browse files- visualization.py +5 -5
visualization.py
CHANGED
|
@@ -55,13 +55,13 @@ class Visualization:
|
|
| 55 |
# Get the current x-axis limits
|
| 56 |
x_min, x_max = ax.get_xlim()
|
| 57 |
|
| 58 |
-
# Highlight the range 80-89 for "Engagement
|
| 59 |
-
ax.fill_betweenx(y=[80, 89], x1=x_min, x2=x_max, color='#3AB0FF', alpha=0.2, label='Engagement
|
| 60 |
-
ax.fill_betweenx(y=[90, 100], x1=x_min, x2=x_max, color='#005288', alpha=0.2, label='Attendance
|
| 61 |
|
| 62 |
# Add horizontal lines for thresholds and averages
|
| 63 |
-
ax.axhline(y=90, color='#005288', linestyle=':', linewidth=1.5, label=f'Attendance Threshold: ≥ 90%')
|
| 64 |
-
ax.axhline(y=80, color='#3AB0FF', linestyle=':', linewidth=1.5, label=f'Engagement Threshold: ≥ 80%')
|
| 65 |
ax.axhline(y=attendance_avg_stats, color='#005288', linestyle='--', linewidth=1.5, label=f'Attendance Average: {attendance_avg_stats}%')
|
| 66 |
ax.axhline(y=engagement_avg_stats, color='#3AB0FF', linestyle='--', linewidth=1.5, label=f'Engagement Average: {engagement_avg_stats}%')
|
| 67 |
|
|
|
|
| 55 |
# Get the current x-axis limits
|
| 56 |
x_min, x_max = ax.get_xlim()
|
| 57 |
|
| 58 |
+
# Highlight the range 80-89 for "Engagement Threshold" and 90-100 for "Attendance Threshold"
|
| 59 |
+
ax.fill_betweenx(y=[80, 89], x1=x_min, x2=x_max, color='#3AB0FF', alpha=0.2, label='Engagement Threshold: ≥ 80%')
|
| 60 |
+
ax.fill_betweenx(y=[90, 100], x1=x_min, x2=x_max, color='#005288', alpha=0.2, label='Attendance Threshold: ≥ 90%')
|
| 61 |
|
| 62 |
# Add horizontal lines for thresholds and averages
|
| 63 |
+
# ax.axhline(y=90, color='#005288', linestyle=':', linewidth=1.5, label=f'Attendance Threshold: ≥ 90%')
|
| 64 |
+
# ax.axhline(y=80, color='#3AB0FF', linestyle=':', linewidth=1.5, label=f'Engagement Threshold: ≥ 80%')
|
| 65 |
ax.axhline(y=attendance_avg_stats, color='#005288', linestyle='--', linewidth=1.5, label=f'Attendance Average: {attendance_avg_stats}%')
|
| 66 |
ax.axhline(y=engagement_avg_stats, color='#3AB0FF', linestyle='--', linewidth=1.5, label=f'Engagement Average: {engagement_avg_stats}%')
|
| 67 |
|