def sstmaps2(): from data_load import gen_models from smapFuncts import sstMap, texDat fig, axes = plt.subplots(2,2,figsize = (16,12)) models = gen_models(cc = 0.95, quick = True) for phase, ax in zip(['lanina', 'neutneg', 'neutpos', 'elnino'], axes.ravel()): print phase fig, ax, m = sstMap(models[phase], cmap = mpl.cm.inferno, fig = fig, ax = ax) fig, ax, m = texDat(fig = fig, ax = ax, m = m) if phase == 'lanina': title = 'La Nina' if phase == 'elnino': title = 'El Nino' if phase == 'neutpos': title = 'Neutral-Positive' if phase == 'neutneg': title = 'Neutral-Negative' ax.set_title(title, fontsize = 18, fontweight = 'bold') fig.savefig('/Users/bz/Desktop/Feb20Response/images/sst_corr') plt.close(fig) return
def sstmaps(): from data_load import gen_models from smapFuncts import sstMap, texDat fig, ax = plt.subplots(1,1,figsize = (4,3)) models = gen_models(cc = 0.95, quick = True) for phase in ['allyears']:#,'lanina', 'neutneg', 'neutpos', 'elnino']: print phase fig, ax = plt.subplots(1,1,figsize = (8,4)) fig, ax, m = sstMap(models[phase], cmap = mpl.cm.inferno, fig = fig, ax = ax) fig, ax, m = texDat(fig = fig, ax = ax, m = m) if phase == 'allyears': title = 'All Years' ax.add_patch(mpl.patches.Rectangle((0.30, 0.5), 0.2, 0.2, fill = False)) if phase == 'lanina': title = 'La Nina' if phase == 'elnino': title = 'El Nino' if phase == 'neutpos': title = 'Neutral-Positive' if phase == 'neutneg': title = 'Neutral-Negative' ax.set_title(title, fontsize = 18, fontweight = 'bold') fig.savefig('/Users/bz/Desktop/Feb20Response/images/aysst') plt.close(fig) return