#!/usr/bin/env python # Wenchang Yang (wenchang@princeton.edu) # Mon Apr 26 15:58:18 EDT 2021 if __name__ == '__main__': from misc.timer import Timer tt = Timer(f'start {__file__}') import sys, os.path, os, glob, datetime import xarray as xr, numpy as np, pandas as pd, matplotlib.pyplot as plt #more imports from fig_map_corr_statmtc_lmeFulllForcingSST import wyplot as plot_fullforcing from fig_map_corr_statmtc_lmeVolcSST import wyplot as plot_volc from fig_map_corr_statmtc_lme0850cntlSST import wyplot as plot_850cntl from shared import labelax # if __name__ == '__main__': tt.check('end import') # #start from here if __name__ == '__main__': from wyconfig import * #my plot settings import cartopy.crs as ccrs proj = ccrs.Robinson(central_longitude=180) dproj = ccrs.PlateCarree() fig, axes = plt.subplots(3, 2, figsize=(8.8, 6), subplot_kw=dict(projection=proj)) ax = axes[0,0] plot_fullforcing(ax=ax, rsst_on=True, regress_on=False) ax = axes[0,1] plot_fullforcing(ax=ax, rsst_on=True, regress_on=True) ax = axes[1,0] plot_volc(ax=ax, rsst_on=True, regress_on=False) ax = axes[1,1] plot_volc(ax=ax, rsst_on=True, regress_on=True) ax = axes[2,0] plot_850cntl(ax=ax, rsst_on=True, regress_on=False) ax = axes[2,1] plot_850cntl(ax=ax, rsst_on=True, regress_on=True) for ax in axes.flat:#[2:]: ax.set_title('') for ax,ylabel in zip(axes.flat[0::2], ['Full Forcing', 'VOLC_GRA', '0850cntl']): ax.text(0-0.05, 0.5, ylabel, transform=ax.transAxes, va='center', ha='center', rotation=90) #for ax,label in zip(axes.flat, list('abcdef')): # labelax(ax, label) #savefig if len(sys.argv) > 1 and sys.argv[1] == 'savefig': figname = __file__.replace('.py', f'.png') wysavefig(figname) tt.check(f'**Done**') plt.show()