fig, ax = plt.subplots(2,2, figsize=(5,4), sharex=True, sharey='row')
constant_df = df[df['scenario'] == 'SerialConstant']
ax[0,0].errorbar(constant_df.ta.values, constant_df.ta_est.values,
yerr=2*constant_df.se_ta_est, capsize=2, lw=2, linestyle='none', color='blue', zorder=5)
ax[0,0].scatter(constant_df.ta.values, constant_df.ta.values, color='red', s=20, marker='+', zorder=1)
# Plot estimates of Ne
ax[1,0].errorbar(constant_df.ta.values, constant_df.Ne_est.values,
yerr=2*constant_df.se_Ne_est, capsize=2, lw=2, linestyle='none', color='blue')
growth_df = df[df['scenario'] == 'TennessenEuropean']
ax[0,1].errorbar(growth_df.ta.values, growth_df.ta_est.values,
yerr=2*growth_df.se_ta_est, capsize=2, lw=2, linestyle='none', color='blue', zorder=5)
ax[0,1].scatter(growth_df.ta.values, growth_df.ta.values, color='red', marker='+', zorder=1)
# Plot estimates of Ne
ax[1,1].errorbar(growth_df.ta.values, growth_df.Ne_est.values,
yerr=2*growth_df.se_Ne_est, capsize=2, lw=2, linestyle='none', color='blue')
ax[1,0].axhline(1e4, linestyle='--', color='orange')
ax[1,1].axhline(6958., linestyle='--', color='orange')
ax[0,0].set_xlim(-1,1e5)
ax[0,0].set_title(r'Constant $N_e$', fontsize=12)
ax[0,1].set_title(r'Tennessen et al. 2012', fontsize=12)
ax[0,0].set_ylabel(r'$\hat{t}_a$', fontsize=14)
ax[1,0].set_ylabel(r'$\hat{N}_e$', fontsize=14)
ax[0,0].set_xscale('symlog')
label_multipanel(ax[0,:], ['A','B'], fontsize=14, fontweight='bold', va='top', ha='right')
debox(ax[0,0]); debox(ax[0,1]);
debox(ax[1,0]); debox(ax[1,1]);
fig.text(0.55, -0.01, r'$t_a$ (generations)', fontsize=14, va='center', ha='center')
plt.tight_layout()
plt.savefig(supp_figdir + 'lstsq_constant_growth.pdf', bbox_inches='tight', dpi=300)