ProfessorLeVesseur commited on
Commit
8f3be09
·
verified ·
1 Parent(s): f4a07f9

Update visualization.py

Browse files
Files changed (1) hide show
  1. visualization.py +1 -6
visualization.py CHANGED
@@ -15,7 +15,7 @@ class Visualization:
15
  ax.text(0, sessions_held / 2, str(sessions_held), ha='center', va='center', color='white', fontweight='bold', fontsize=14)
16
  ax.text(0, sessions_held + sessions_not_held / 2, str(sessions_not_held), ha='center', va='center', color='black', fontweight='bold', fontsize=14)
17
 
18
- ax.set_ylabel('# of Sessions Held')
19
  ax.set_title('', fontsize=16)
20
  handles, labels = ax.get_legend_handles_labels()
21
  ax.legend(handles[::-1], labels[::-1])
@@ -48,8 +48,6 @@ class Visualization:
48
  )
49
  engagement_bars = ax.bar(
50
  [i + bar_width / 2 for i in index],
51
- # student_metrics_df['Engagement (%)'], # REMOVED REMOVED
52
- # width=bar_width, label='Engagement (%)', # REMOVED REMOVED
53
  student_metrics_df['Engaged (%)'],
54
  width=bar_width, label='Engaged (%)',
55
  color='#3AB0FF', alpha=0.7
@@ -71,10 +69,7 @@ class Visualization:
71
  ax.fill_betweenx(y=[80, 90], x1=x_min, x2=x_max, color='#3AB0FF', alpha=0.2, label='Engagement Goal: ≥ 80%')
72
 
73
  # Add horizontal lines for thresholds and averages
74
- # ax.axhline(y=90, color='#005288', linestyle=':', linewidth=1.5, label=f'Attendance Threshold: ≥ 90%')
75
- # ax.axhline(y=80, color='#3AB0FF', linestyle=':', linewidth=1.5, label=f'Engagement Threshold: ≥ 80%')
76
  ax.axhline(y=attendance_avg_stats, color='#005288', linestyle='--', linewidth=1.5, label=f'Attendance Average: {attendance_avg_stats}%')
77
- # ax.axhline(y=engagement_avg_stats, color='#3AB0FF', linestyle='--', linewidth=1.5, label=f'Engagement Average: {engagement_avg_stats}%') # REMOVED REMOVED
78
  ax.axhline(y=engagement_avg_stats, color='#3AB0FF', linestyle='--', linewidth=1.5, label=f'Engaged Average: {engagement_avg_stats}%')
79
 
80
  # Set the x-limits to ensure the fill covers the entire plot width
 
15
  ax.text(0, sessions_held / 2, str(sessions_held), ha='center', va='center', color='white', fontweight='bold', fontsize=14)
16
  ax.text(0, sessions_held + sessions_not_held / 2, str(sessions_not_held), ha='center', va='center', color='black', fontweight='bold', fontsize=14)
17
 
18
+ ax.set_ylabel('# of Sessions')
19
  ax.set_title('', fontsize=16)
20
  handles, labels = ax.get_legend_handles_labels()
21
  ax.legend(handles[::-1], labels[::-1])
 
48
  )
49
  engagement_bars = ax.bar(
50
  [i + bar_width / 2 for i in index],
 
 
51
  student_metrics_df['Engaged (%)'],
52
  width=bar_width, label='Engaged (%)',
53
  color='#3AB0FF', alpha=0.7
 
69
  ax.fill_betweenx(y=[80, 90], x1=x_min, x2=x_max, color='#3AB0FF', alpha=0.2, label='Engagement Goal: ≥ 80%')
70
 
71
  # Add horizontal lines for thresholds and averages
 
 
72
  ax.axhline(y=attendance_avg_stats, color='#005288', linestyle='--', linewidth=1.5, label=f'Attendance Average: {attendance_avg_stats}%')
 
73
  ax.axhline(y=engagement_avg_stats, color='#3AB0FF', linestyle='--', linewidth=1.5, label=f'Engaged Average: {engagement_avg_stats}%')
74
 
75
  # Set the x-limits to ensure the fill covers the entire plot width