#axes=fig.add_subplot(323) axes=fig.add_subplot(223) plot(axes,'r68') axes.set_xlabel('r68 (deg)') #axes=fig.add_subplot(324) #plot(axes,'eccentricity') #axes.set_xlabel('Eccentricity') #axes=fig.add_subplot(325) #plot(axes,'angle') #axes.set_xlabel('Ellipse Angle (deg)') #axes=fig.add_subplot(326) #plot(axes,'fraction') #axes.set_xlabel('Ring Fraction') prop = matplotlib.font_manager.FontProperties(size=6) plots=[Line2D([0],[0],color=i) for i in all_colors] axes.legend(reversed(plots),reversed(print_names), prop=prop, loc=1, borderaxespad=1) fig.tight_layout() label_axes(fig, borderpad=0.2) save('bias_w44sim')
histogram(axes, data=[2*(ll_gaussian-ll_point), 2*(ll_disk-ll_point)], color=['red' if not bw else '0.6','black']) axes.set_xlabel(r'$\mathrm{TS}_\mathrm{ext}$') prop = matplotlib.font_manager.FontProperties(size=10) axes.set_ylim(0,100) axes.legend([Line2D([0],[0],color='black'),Line2D([0],[0],color='red' if not bw else '0.6')], ['disk','Gaussian'], prop=prop) axes=fig.add_subplot(223) histogram(axes, 2*(ll_elliptical_disk-ll_disk), color='black') axes.set_xlabel(r'$\mathrm{TS}_\mathrm{elliptical\ disk}-\mathrm{TS}_\mathrm{disk}$') axes=fig.add_subplot(224) ts_inc = 2*(ll_elliptical_ring-ll_elliptical_disk) ts_inc = np.where(ts_inc > 0, ts_inc, 0) histogram(axes, ts_inc, color='black') axes.set_xlabel(r'$\mathrm{TS}_\mathrm{elliptical\ ring}-\mathrm{TS}_\mathrm{elliptical\ disk}$') fig.tight_layout() label_axes(fig) save('ts_comparison_w44sim')
print i,pwn axes=grid[i] r = classifier.get_results(pwn) spectrum = r['spectrum'] sed = r['sed_4bpd'] s = SED(sed) s.plot_points(axes=axes, zorder=2.1) sp = SpectrumPlotter(axes=axes) sp.plot(spectrum, autoscale=False, color='red' if not bw else 'grey', zorder=1.9) label_axes(grid) grid[0].set_ylabel('') grid[4].set_ylabel('') for i in range(nrows*ncols): axes=grid[i] #axes.set_xlim_units(10**2*units.MeV,10**5.5*units.MeV) axes.set_xlim(0.1,10**2.5) #axes.set_ylim_units(1e-13*units.erg/units.cm**2/units.s,1e-9*units.erg/units.cm**2/units.s) if i in [0,1,2,3]: axes.set_ylim(1e-13,1e-9) elif i in [4,5]: axes.set_ylim(1e-13,1e-8) else: