Skip to content

Commit 69e8822

Browse files
authored
Update analyze-baseball-stats-with-pandas-and-matplotlib.mdx
1 parent 812cc96 commit 69e8822

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

projects/analyze-baseball-stats-with-pandas-and-matplotlib/analyze-baseball-stats-with-pandas-and-matplotlib.mdx

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -269,26 +269,31 @@ plt.figure(figsize=(10, 6))
269269
plt.plot(league_avg_hr.index,
270270
league_avg_hr.values,
271271
label='League Average',
272+
color='orange',
272273
linestyle='--'
273274
)
274275

275276
plt.plot(
276277
rockies_hr.index,
277278
rockies_hr.values,
278279
label='Colorado Rockies'
280+
color='#33006F'
279281
)
280282

281-
plt.title('Colorado Rockies Home Runs vs League Average')
283+
plt.title('Colorado Rockies Home Runs vs. League Average')
282284
plt.xlabel('Year')
283285
plt.ylabel('Home Runs')
284286
plt.legend()
285287

288+
plt.grid(True)
286289
plt.show()
287290
```
288291

292+
The official purple for the Colorado Rockies is `##33006F`, so we used that above. 💜
293+
289294
The graph should look like:
290295

291-
![The graph](https://raw.githubusercontent.com/codedex-io/projects/refs/heads/main/projects/analyze-baseball-stats-with-pandas-and-matplotlib/colorado-rockies.png)
296+
![The graph](https://raw.githubusercontent.com/codedex-io/projects/refs/heads/main/projects/analyze-baseball-stats-with-pandas-and-matplotlib/colorado-rockies-vs-league-average.png)
292297

293298
As expected, the altitude in Denver has caused some pretty high home run numbers!
294299

0 commit comments

Comments
 (0)