ewbins = Bins([0.6, 5.0]) labels = ['0.6 < Wr$_{2796}$ < 5'] colors = 'g' symbols = 'o' offsets = [0] for i in range(len(labels)): dNdz, dNdz_er, n = find_dndz_vs_rho(rho, ab['MgII'], iMgII_from_id, ewbins.edges[i], ewbins.edges[i + 1]) y = np.log10(dNdz) ylo = np.log10(dNdz - dNdz_er) yhi = np.log10(dNdz + dNdz_er) errplot(rbin.cen + offsets[i], y, (ylo, yhi), ax=ax, fmt=colors[i] + symbols[i], label=labels[i]) for j in range(len(n)): puttext(rbin.cen[j], 0.03 + i * 0.03, str(n[j]), ax, color=colors[i], fontsize=10, xcoord='data', ha='center') ax.legend(frameon=0) ax.set_xlabel('Cluster-absorber impact par. (proper Mpc)') ax.set_ylabel(r'$dN/dz\ (MgII)$')
ax.set_title(run_id) ewbins = Bins([0.6, 5.0]) labels = ['0.6 < Wr$_{2796}$ < 5'] colors = 'g' symbols = 'o' offsets = [0] for i in range(len(labels)): dNdz, dNdz_er, n = find_dndz_vs_rho( rho, ab['MgII'], iMgII_from_id, ewbins.edges[i], ewbins.edges[i+1]) y = np.log10(dNdz) ylo = np.log10(dNdz - dNdz_er) yhi = np.log10(dNdz + dNdz_er) errplot(rbin.cen + offsets[i], y, (ylo, yhi), ax=ax, fmt=colors[i]+symbols[i], label=labels[i]) for j in range(len(n)): puttext(rbin.cen[j], 0.03 + i*0.03, str(n[j]), ax, color=colors[i], fontsize=10, xcoord='data', ha='center') ax.legend(frameon=0) ax.set_xlabel('Cluster-absorber impact par. (proper Mpc)') ax.set_ylabel(r'$dN/dz\ (MgII)$') # skip last bin, where not all pairs are measured. ax.set_xlim(rbin.edges[0] - rbin.halfwidth[0], rbin.edges[-2] + rbin.halfwidth[-1]) make_log_xlabels(ax) make_log_ylabels(ax) #fig3.savefig(run_id + '/dNdz_vs_rho.png') plt.show()
ax = fig.add_axes((left, 0.6, right-left, 0.35)) Z0, Z1 = -2.8 - 0.75, -2.8 + 0.75 r0,r1=-300,400 ax.fill([r0,r0,r1,r1], [Z0,Z1,Z1,Z0], lw=0, color='0.7') ax.text(100, -2.4, 'IGM' ,ha='center',va='center') ax.text(220, -0.35, 'ISM (cb58)',ha='center',va='center',fontsize=14) Z0, Z1 = -0.11, -0.52 r0,r1=-300,400 ax.fill([r0,r0,r1,r1], [Z0,Z1,Z1,Z0], lw=0, color='orange', alpha=0.3) v = V['Z'] errplot(dv, v['val'], (v['val']-v['erlo'], v['val']+v['erhi']), ax=ax, lw=1, ms=10) ax.set_ylabel('$Z/Z_\odot$') ax.set_xlabel('Velocity (km/s)') ax.xaxis.get_label().set_fontsize(font2+1) for t in ax.get_xticklabels(): t.set_fontsize(font1+2) make_log_ylabels(ax) #ax.set_xticklabels('') ax.set_xlim(-140,360) ax.set_ylim(-2.7,0.19) for t in ax.get_yticklabels(): t.set_fontsize(font1+2) ax.yaxis.get_label().set_fontsize(font2+2) ######################################### # make the remaining smaller plots