def plot_g_m20_cc_a(msF,merF,sk,fk,FIG,xlim,x2lim,ylim,y2lim,Cval,gridf='median_grid',masscut=0.0,**bin_kwargs):

    sfr  = get_all_snap_val(msF,sk,'SFR_Msunperyr')
    mstar  = get_all_snap_val(msF,sk,'Mstar_Msun')
    asym = get_all_morph_val(msF,sk,fk,'ASYM')
    gini = get_all_morph_val(msF,sk,fk,'GINI')
    m20 = get_all_morph_val(msF,sk,fk,'M20')
    cc = get_all_morph_val(msF,sk,fk,'CC')
    
    redshift = msF['nonparmorphs'][sk][fk]['CAMERA0']['REDSHIFT'].value[0]
    
    
    labs=11
    axi = FIG.add_subplot(2,1,1)
    axi.set_ylabel('$C$',labelpad=1,size=labs)
    axi.set_xlabel('$A$',labelpad=1,size=labs)    
    axi.tick_params(axis='both',which='both',labelsize=labs)
    axi.locator_params(nbins=5,prune='both')

    axi.set_xlim(xlim[0],xlim[1])
    axi.set_ylim(ylim[0],ylim[1])


    gi = np.where( (np.isfinite(Cval)==True)*(mstar >= masscut))[0]
    
    res = gth.make_twod_grid(axi,asym[gi],cc[gi],{'x':Cval[gi]},gridf,**bin_kwargs)
    


    axi = FIG.add_subplot(2,1,2)
    axi.set_ylabel('$G$',labelpad=1,size=labs)
    axi.set_xlabel('$M_{20}$',labelpad=1,size=labs)
    axi.tick_params(axis='both',which='both',labelsize=labs)
    axi.locator_params(nbins=5,prune='both')
    axi.set_xlim(x2lim[0],x2lim[1])
    axi.set_ylim(y2lim[0],y2lim[1])

    
    kpc_per_arcsec = illcos.kpc_proper_per_arcmin(redshift).value/60.0
    size_pixels = get_all_morph_val(msF,sk,fk,'RP')
    pix_arcsec  = get_all_morph_val(msF,sk,fk,'PIX_ARCSEC')
    size_kpc = size_pixels*pix_arcsec*kpc_per_arcsec


    
    axi,colorobj = gth.make_twod_grid(axi,m20[gi],gini[gi],{'x':Cval[gi]},gridf,flipx=True,**bin_kwargs)
    axi.annotate('z = {:3.1f}'.format(redshift) ,xy=(0.80,0.05),ha='center',va='center',xycoords='axes fraction',color='black',size=labs)
    axi.annotate(fk                             ,xy=(0.80,0.15),ha='center',va='center',xycoords='axes fraction',color='black',size=labs)
    if masscut > 0.0:
        axi.annotate('$log_{10} M_{*} > $'+'{:4.1f}'.format(np.log10(masscut)),xy=(0.80,0.25),ha='center',va='center',xycoords='axes fraction',color='black',size=labs)
    
    return colorobj
def plot_sfr_radius_mass(msF,merF,sk,fk,FIG,xlim,ylim,rlim,Cval,gridf='median_grid',**bin_kwargs):

    sfr  = get_all_snap_val(msF,sk,'SFR_Msunperyr')
    mstar  = get_all_snap_val(msF,sk,'Mstar_Msun')
    
    
    redshift = msF['nonparmorphs'][sk][fk]['CAMERA0']['REDSHIFT'].value[0]
    
    
    labs=11
    axi = FIG.add_subplot(2,1,1)
    axi.set_ylabel('$log_{10}$ SFR [$M_{\odot} yr^{-1}$]',labelpad=1,size=labs)    
    axi.tick_params(axis='both',which='both',labelsize=labs)
    axi.locator_params(nbins=5,prune='both')

    axi.set_xlim(xlim[0],xlim[1])
    axi.set_ylim(ylim[0],ylim[1])


    gi = np.where(np.isfinite(Cval)==True)[0]
    
    res = gth.make_twod_grid(axi,np.log10(mstar[gi]),np.log10(sfr[gi]),{'x':Cval[gi]},gridf,**bin_kwargs)
    


    axi = FIG.add_subplot(2,1,2)
    axi.set_ylabel('$log_{10}\ R_p$ [$kpc$]',labelpad=1,size=labs)
    axi.set_xlabel('$log_{10}\ M_{*} [M_{\odot}]$',labelpad=1,size=labs)
    axi.tick_params(axis='both',which='both',labelsize=labs)
    axi.locator_params(nbins=5,prune='both')
    axi.set_xlim(xlim[0],xlim[1])
    axi.set_ylim(rlim[0],rlim[1])

    
    kpc_per_arcsec = illcos.kpc_proper_per_arcmin(redshift).value/60.0

    size_pixels = get_all_morph_val(msF,sk,fk,'RP')
    pix_arcsec  = get_all_morph_val(msF,sk,fk,'PIX_ARCSEC')

    size_kpc = size_pixels*pix_arcsec*kpc_per_arcsec

    axi,colorobj = gth.make_twod_grid(axi,np.log10(mstar[gi]),np.log10(size_kpc[gi]),{'x':Cval[gi]},gridf,**bin_kwargs)
    axi.annotate('z = {:3.1f}'.format(redshift) ,xy=(0.80,0.05),ha='center',va='center',xycoords='axes fraction',color='black',size=labs)
    axi.annotate(fk                             ,xy=(0.80,0.15),ha='center',va='center',xycoords='axes fraction',color='black',size=labs)

    return colorobj