Exemple #1
0
def plot5(curs):
    f=P.gcf()
    ax1=f.add_axes((.12,.53,.85,.45))
    ax2=f.add_axes((.12,.09,.85,.45))
    mtot,massfrac=gettable(curs,cols='mtot,massfrac',where='mtot NOTNULL AND agn=0 AND massfrac NOTNULL AND bpara2 >3',table='sball')
    mtot=N.log10(mtot)
    X=N.arange(8,11.4,0.2,dtype='f')
    mean=sdss.averbins(X,mtot,massfrac,median=True)
    ax1.hexbin(mtot,massfrac,cmap=P.cm.bone_r,gridsize=(50,80))
    ax1.plot(X[4:-1],mean[4:-1],'k-o',lw=2, markeredgecolor='w', markeredgewidth=1.5)
    #ax1.plot(X[4:-1],mean[4:-1],'',lw=12)

    #massfrac=masked_where(massfrac<0.03,massfrac)
    #mean=sdss.averbins(X,mtot,massfrac,median=True)
    #ax1.plot(X[4:-1],mean[4:-1],'y--D')

    ax1.set_ylabel(r'$\mathrm{mass\,\,fraction}$')
    ax1.axis((8.4,11.2,-.001,0.15))
    ax1.text(8.7,0.13,r'$\mathrm{starbursts,\,\, b > 3}$',fontsize=11)

    mtot,massfrac=gettable(curs,cols='mtot,massfrac',where='mtot NOTNULL AND agn=0 AND massfrac NOTNULL',table='pball')
    mtot=N.log10(mtot)
    X=N.arange(8,11.4,0.2,dtype='f')
    mean=sdss.averbins(X,mtot,massfrac,median=True)
    ax2.hexbin(mtot,massfrac,cmap=P.cm.bone_r,gridsize=(50,80))
    ax2.plot(X[4:-1],mean[4:-1],'k-o',lw=2, markeredgecolor='w', markeredgewidth=1.5)
    ax2.set_ylabel(r'$\mathrm{mass\,\,fraction}$')
    ax2.set_xlabel(r'$\log_{10}({\cal M}_{tot})$')
    ax2.axis((8.4,11.2,-.001,0.15))
    ax2.text(8.7,0.13,r'$\mathrm{postbursts}$',fontsize=11)
Exemple #2
0
def plot10(curs):
    Ha_h,Hb_h,z = gettable(curs,cols='Ha_h,Hb_h,z',where='Mr < -18 and Mr > -20',table='sball')

    P.plot(z,Ha_h/Hb_h,'.b')
    P.grid()
    x=N.arange(0,0.4,0.005)
    y=sdss.averbins(x,z,Ha_h/Hb_h)
    P.plot(x,y,'or')
    P.xlabel('z')
    P.ylabel('Ha/Hb')