varshasharma01 commited on
Commit
b25c03e
·
verified ·
1 Parent(s): 10e8fea

Update src/streamlit_app.py

Browse files
Files changed (1) hide show
  1. src/streamlit_app.py +3 -3
src/streamlit_app.py CHANGED
@@ -173,7 +173,7 @@ if analysis_mode == "Overview":
173
  .sort_index(key=lambda s: s.map(lambda x: int(x) if str(x).isdigit() else x))
174
  )
175
 
176
- fig1, ax1 = plt.subplots(figsize=(8, 4))
177
  ax1.plot(season_counts.index.astype(str), season_counts.values,
178
  marker='o', color='#1f77b4', linewidth=2)
179
  ax1.set_xlabel("Season", fontsize=11)
@@ -200,7 +200,7 @@ if analysis_mode == "Overview":
200
  colors = plt.cm.viridis_r(
201
  [i / max(len(team_runs) - 1, 1) for i in range(len(team_runs))]
202
  )
203
- ax2.barh(team_runs.index[::-1], team_runs.values[::-1], color=colors[::-1])
204
  ax2.set_xlabel("Total Runs", fontsize=11)
205
  ax2.set_ylabel("Team", fontsize=11)
206
  ax2.xaxis.set_major_formatter(
@@ -219,7 +219,7 @@ if analysis_mode == "Overview":
219
 
220
  fig3, ax3 = plt.subplots(figsize=(12, 4))
221
  run_counts = df_filtered['runs_total'].value_counts().sort_index()
222
- ax3.bar(run_counts.index.astype(str), run_counts.values, color='orange', alpha=0.8)
223
  ax3.set_xlabel("Runs per Ball", fontsize=11)
224
  ax3.set_ylabel("Frequency", fontsize=11)
225
  ax3.grid(axis='y', alpha=0.3)
 
173
  .sort_index(key=lambda s: s.map(lambda x: int(x) if str(x).isdigit() else x))
174
  )
175
 
176
+ fig1, ax1 = plt.subplots(figsize=(8, 5))
177
  ax1.plot(season_counts.index.astype(str), season_counts.values,
178
  marker='o', color='#1f77b4', linewidth=2)
179
  ax1.set_xlabel("Season", fontsize=11)
 
200
  colors = plt.cm.viridis_r(
201
  [i / max(len(team_runs) - 1, 1) for i in range(len(team_runs))]
202
  )
203
+ ax2.barh(team_runs.index[::-1], team_runs.values[::-1], color=colors[::1])
204
  ax2.set_xlabel("Total Runs", fontsize=11)
205
  ax2.set_ylabel("Team", fontsize=11)
206
  ax2.xaxis.set_major_formatter(
 
219
 
220
  fig3, ax3 = plt.subplots(figsize=(12, 4))
221
  run_counts = df_filtered['runs_total'].value_counts().sort_index()
222
+ ax3.bar(run_counts.index.astype(str), run_counts.values, color='pink', alpha=0.8)
223
  ax3.set_xlabel("Runs per Ball", fontsize=11)
224
  ax3.set_ylabel("Frequency", fontsize=11)
225
  ax3.grid(axis='y', alpha=0.3)