Seaborn - World Cup Data - set_palette() not working

I can only set the palette when using that parameter in the sns.barplot( palette=‘pastel’) fucniton. If I use sns.set_palette(‘pastel’) nothing happens. It worked in earlier exercises so I’m not sure what’s diferent here. I’ve tried putting sns.set_palette() before/after the sns.barplot and creating the figure and none have fixed it.
Link to exercise: https://www.codecademy.com/paths/visualize-data-with-python/tracks/advanced-graphing-in-python/modules/seaborn-dvp/projects/world-cup-viz


import codecademylib3_seaborn

from matplotlib import pyplot as plt

import pandas as pd

import seaborn as sns

df = pd.read_csv('WorldCupMatches.csv')

df_goals = pd.read_csv('goals.csv')

df['Total Goals'] = df['Home Team Goals'] + df['Away Team Goals']

#print(df_goals.head())

#set styling

sns.set_style('whitegrid')

sns.set_context('notebook', font_scale=1.25)

f, ax = plt.subplots(figsize=(12,7))

sns.set_palette('rocket')

#plot 1 - using set_palette() has no effect

sns.barplot(data=df, x='Year', y='Total Goals')

ax.set_title('Average Number Of Goals Scored In World Cup Matches By Year')

plt.xticks(rotation=30)

plt.show()

#plot 2 - using palette parameter here works

f, ax2 = plt.subplots(figsize=(12,7))

ax2 = sns.boxplot(data=df_goals, x='year', y='goals', palette='Spectral')

ax2.set_title('Box Plot Of Goals Scored in World Cup Matches By Year')

plt.show()

I think you just have to use the palette = " " parameter for each plot, rather than setting a default color palette.

Ex:

Summary
sns.set_style("whitegrid")
sns.set_context('notebook', font_scale=1.5)
f, ax =plt.subplots(figsize=(12, 7))
plt.xticks(rotation=70)

ax = sns.barplot(data= df, x = 'Year', y='Total Goals', palette ='colorblind')
ax.set_title('Average Goals by Year, FIFA World Cup- 1930-2014')

plt.show()

https://seaborn.pydata.org/generated/seaborn.color_palette.html#seaborn.color_palette