ProfessorLeVesseur commited on
Commit
99e3c0f
·
verified ·
1 Parent(s): 8436af1

Update visualization.py

Browse files
Files changed (1) hide show
  1. visualization.py +3 -0
visualization.py CHANGED
@@ -52,6 +52,9 @@ class Visualization:
52
  height = bar.get_height()
53
  ax.text(bar.get_x() + bar.get_width() / 2, height, f'{height:.0f}%', ha='center', va='bottom', color='black')
54
 
 
 
 
55
  # Highlight the range 80-89 for "Engagement Goal" and 90-100 for "Attendance Goal"
56
  ax.fill_betweenx(y=[80, 89], x1=x_min, x2=x_max, color='#3AB0FF', alpha=0.2, label='Engagement Goal')
57
  ax.fill_betweenx(y=[90, 100], x1=x_min, x2=x_max, color='#005288', alpha=0.2, label='Attendance Goal')
 
52
  height = bar.get_height()
53
  ax.text(bar.get_x() + bar.get_width() / 2, height, f'{height:.0f}%', ha='center', va='bottom', color='black')
54
 
55
+ # Get the current x-axis limits
56
+ x_min, x_max = ax.get_xlim()
57
+
58
  # Highlight the range 80-89 for "Engagement Goal" and 90-100 for "Attendance Goal"
59
  ax.fill_betweenx(y=[80, 89], x1=x_min, x2=x_max, color='#3AB0FF', alpha=0.2, label='Engagement Goal')
60
  ax.fill_betweenx(y=[90, 100], x1=x_min, x2=x_max, color='#005288', alpha=0.2, label='Attendance Goal')