#设置图例
line1=ax1.plot(lat,lat,'r',linewidth=1,label='latitude(degrees_north)')
plt.legend((line1),['latitude(degrees_north)'],bbox_to_anchor=(0.5, -0.15),loc='lower center')
显示不全:‘latitude(degrees_north)’只会显示l,加上[],将其变为列表,即可全部显示
设置在坐标轴下方:loc=‘lower centor’会显示在坐标轴上方,子图下方中间,用bbox_to_anchor=(0.5, -0.15)调整方位,0.5表示水平方向,-0.15表示垂直方向。自己慢慢调就行,一般垂直方向-0.1到-0.2之间,具体自己慢慢试(如果设置后后看不见了,说明你的子图设置的太小了,figsize再设大点)