I have two graphs in one plot but for some reason the legend, x-label rotation and tight layout only applies to the 2nd graph and not the first?
figure, axis = plt.subplots(1,2,figsize=(9,7))
x2 = ['A','B','C']
Y1 = [90,80,100]
Y2 = [70,100,200]
axis[0].scatter(x2,Y1, c = 'pink',label='salary')
axis[1].scatter(x2,Y2, c = 'orange',label='overtime')
plt.xticks(rotation = 45)
plt.tight_layout()
plt.legend()
I can duplicate the code and put it underneath the first graph but is there a better way.