Apr-24-2022, 06:06 PM
The below code returns 2 seperate graphs, how can I combine them in one figure?
sns.set()
sns.set_context("notebook")
sns.set_style("darkgrid", {"axes.facecolor":"0.9",'font.family':['Roboto']})
pltsize = (10,7)
yrlsum.plot(x='year', y='TAVG', kind='bar', legend=False, figsize=pltsize,
color=(yrlsum['TAVG'] > 0).map({True:'darkorange', False:'royalblue'}))
yrlsum['MA'] = yrlsum['TAVG'].rolling(window=10).mean()
yrlsum.plot(x='year', y='MA', kind='line', legend=False, figsize=pltsize,
color='black', lw=1)
plt.show()
