python - Legend overriding x-label and x-ticks -


i have following figure produced plotting multiple subplots pandas dataframe:

enter image description here

you'll notice 2 subplots on left not have x-ticks or x-labels.

here code use plot figure:

plt.suptitle(suptitle,fontsize=fs+6)  ax1 = fig.add_subplot(gs[0:8,0]) title = 'e1 on object a' plt.title('bias vs separation ' + title,fontsize=fs) plt.ylim([(min_mean - 2*min_s_mean)*min_offset,(max_mean + max_s_mean)*max_offset]) plt.xlabel('separation (arcsec)',fontsize=fs) plt.ylabel('residual',fontsize=fs) f_m_e1_a = format_df(means_e1_a,x_min,x_max,means_e1_a.index) f_s_m_e1_a = format_df(s_means_e1_a,x_min,x_max,s_means_e1_a.index) plt.legend(loc=0,prop={'size':leg_fs}) ax1p = f_m_e1_a.t.plot(ax=ax1,style=['k--o','b--o','g--o'],yerr=f_s_m_e1_a.t)  ax2 = fig.add_subplot(gs[11:19,0]) title = 'e1 on object b' plt.title('bias vs separation ' + title,fontsize=fs) plt.ylim([(min_mean - 2*min_s_mean)*min_offset,(max_mean + max_s_mean)*max_offset]) plt.xlabel('separation (arcsec)',fontsize=fs) plt.ylabel('residual',fontsize=fs) f_m_e1_b = format_df(means_e1_b,x_min,x_max,means_e1_b.index) f_s_m_e1_b = format_df(s_means_e1_b,x_min,x_max,s_means_e1_b.index) plt.legend(loc=0,prop={'size':leg_fs}) ax2p = f_m_e1_b.t.plot(ax=ax2,style=['k--o','b--o','g--o'],yerr=f_s_m_e1_b.t)  ax3 = fig.add_subplot(gs[0:8,1]) title = 'e2 on object a' plt.title('bias vs separation ' + title,fontsize=fs) plt.ylim([(min_mean - 2*min_s_mean)*min_offset,(max_mean + max_s_mean)*max_offset]) plt.xlabel('separation (arcsec)',fontsize=fs) plt.ylabel('residual',fontsize=fs) f_m_e2_a = format_df(means_e2_a,x_min,x_max,means_e2_a.index) f_s_m_e2_a = format_df(s_means_e2_a,x_min,x_max,means_e2_a.index) plt.legend(loc=0,prop={'size':leg_fs}) ax3p = f_m_e2_a.t.plot(ax=ax3,style=['k--o','b--o','g--o'],yerr=f_s_m_e2_a.t)  ax4 = fig.add_subplot(gs[11:19,1]) title = 'e2 on object b' plt.title('bias vs separation ' + title,fontsize=fs) plt.ylim([(min_mean - 2*min_s_mean)*min_offset,(max_mean + max_s_mean)*max_offset]) plt.xlabel('separation (arcsec)',fontsize=fs) plt.ylabel('residual',fontsize=fs) f_m_e2_b = format_df(means_e2_b,x_min,x_max,means_e2_b.index) f_s_m_e2_b = format_df(s_means_e2_b,x_min,x_max,s_means_e2_b.index) plt.legend(loc=0,prop={'size':leg_fs}) ax4p = f_m_e2_b.t.plot(ax=ax4,style=['k--o','b--o','g--o'],yerr=f_s_m_e2_b.t) 

i'm doing same thing plots yet why 2 on left not showing x-ticks , x-labels?

i instantiate gridspec object use , figure that's all.

it's not setting style specified, exterior issue @ hand.


Popular posts from this blog