From f19d9a1993956d1ac6cdcc2d4ab78cf2d7f1c3ff Mon Sep 17 00:00:00 2001 From: ycanerol Date: Fri, 30 Jun 2017 12:40:08 +0200 Subject: [PATCH] Add dashed lines that pass (0,0) --- onoffplotter_dimos.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/onoffplotter_dimos.py b/onoffplotter_dimos.py index 311f785..a5614b4 100644 --- a/onoffplotter_dimos.py +++ b/onoffplotter_dimos.py @@ -256,6 +256,8 @@ plt.subplot(2, 2, 2) plt.plot(np.linspace(-1, 1), np.linspace(-1, 1), '--', alpha=.4, color='black') +plt.axvline(0, linestyle='dashed', alpha=.2, color='gray') +plt.axhline(0, linestyle='dashed', alpha=.2, color='gray') plt.plot(all_f, all_c, '.', alpha=.5) plt.text(1, -1.05, 'r = {:4.2}'.format(r_cf), fontsize=r_fontsize, horizontalalignment='right') @@ -270,6 +272,8 @@ plt.subplot(2, 2, 3) #plt.plot(all_f, all_o, '.', alpha=.5) plt.plot(np.linspace(-1, 1), np.linspace(-1, 1), '--', alpha=.4, color='black') +plt.axvline(0, linestyle='dashed', alpha=.2, color='gray') +plt.axhline(0, linestyle='dashed', alpha=.2, color='gray') plt.plot(f_npf, o_npf, '.', alpha=.5) plt.plot(f_pf, o_pf, '.', alpha=.5) plt.text(1, -0.81, r'$r_{{total}}$ = {:4.2}'.format(r_of), @@ -289,6 +293,8 @@ plt.subplot(2, 2, 4) #plt.plot(all_c, all_o, '.', alpha=.5) plt.plot(np.linspace(-1, 1), np.linspace(-1, 1), '--', alpha=.4, color='black') +plt.axvline(0, linestyle='dashed', alpha=.2, color='gray') +plt.axhline(0, linestyle='dashed', alpha=.2, color='gray') plt.plot(c_npf, o_npf, '.', alpha=.5) plt.plot(c_pf, o_pf, '.', alpha=.5) plt.text(1, -0.81, r'$r_{{total}}$ = {:4.2}'.format(r_co), @@ -307,5 +313,6 @@ #plt.tight_layout() plt.subplots_adjust(top=0.9) plt.savefig('/Users/ycan/Documents/official/gottingen/lab rotations/\ -LR3 Gollisch/figures/{}'.format(exp_name), dpi=200) +LR3 Gollisch/figures/{}'.format(exp_name), dpi=200, bbox_inches='tight', + pad_inches=0.0) plt.show()