#!/usr/bin/env python # Wenchang Yang (wenchang@princeton.edu) # Fri Apr 16 10:23:13 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_heatmap_corr_liz_lmr2019_tfrMDRTROP18702000 import wyplot as plot_lmr2019hu from fig_heatmap_corr_liz_lmr2019MH_tfrMDRTROP18702000 import wyplot as plot_lmr2019mh from fig_heatmap_corr_liz_lmr2018_tfrMDRTROP18702000 import wyplot as plot_lmr2018hu from fig_heatmap_corr_liz_lmr2018MH_tfrMDRTROP18702000 import wyplot as plot_lmr2018mh from shared import labelax # if __name__ == '__main__': tt.check('end import') # #start from here if __name__ == '__main__': from wyconfig import * #my plot settings figsize= 16,6.6 fig,axes = plt.subplots(2, 2, figsize=figsize, sharex=True, sharey=True, dpi=100) ax = axes[0,0] plot_lmr2019hu(ax=ax) ax = axes[0,1] plot_lmr2019mh(ax=ax) ax = axes[1,0] plot_lmr2018hu(ax=ax) ax = axes[1,1] plot_lmr2018mh(ax=ax) for ax,title in zip(axes.flat, ['LMR2.1 HU', 'LMR2.1 MH', 'LMR2.0 HU', 'LMR2.0 MH']): ax.set_title(title) for ax in axes[0,:]: ax.set_xlabel('') fig.suptitle('Heatmaps of correlations between sedimentary reconstructions of TCs and LMR HUs/MHs') #for ax,label in zip(axes.flat, list('abcd')): # 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()