示例#1
0
    the_label = cb.ax.set_ylabel("latitude (deg)", rotation=270)
    axis0a.set_title("partial scene latitude")
    fig0a.savefig("plots/partial_lat.png")

    fig0b = plt.figure(2)
    fig0b.clf()
    axis0b = fig0b.add_subplot(111)
    im = axis0b.contourf(partLons)
    cb = plt.colorbar(im)
    the_label = cb.ax.set_ylabel("longitude (deg)", rotation=270)
    axis0b.set_title("partial scene longitude")
    fig0b.savefig("plots/partial_lon.png")

    numlatbins = 60
    numlonbins = 120
    bin_lats = binit(-30.5, -27, numlatbins, -999, -888)
    bin_lons = binit(-101, -94, numlonbins, -999, -888)

    #
    # use ravel() to turn 2-d arrays into 1-d arrays
    #
    lat_count, lat_index, lowlats, highlats = bin_lats.do_bins(partLats.ravel())
    lon_count, lon_index, lowlons, highlons = bin_lons.do_bins(partLons.ravel())
    #
    # check to make sure that the binit histogram agrees with matplotlib hist
    #
    fig1 = plt.figure(3)
    fig1.clf()
    fig1.subplots_adjust(hspace=0.3)
    axis1 = fig1.add_subplot(211)
    axis2 = fig1.add_subplot(212)
示例#2
0
    axis0a.set_title('partial scene latitude')
    fig0a.savefig('plots/partial_lat.png')
    
    fig0b=plt.figure(2)
    fig0b.clf()
    axis0b=fig0b.add_subplot(111)
    im=axis0b.contourf(partLons)
    cb=plt.colorbar(im)
    the_label=cb.ax.set_ylabel('longitude (deg)',rotation=270)
    axis0b.set_title('partial scene longitude')
    fig0b.savefig('plots/partial_lon.png')

    north,south,east,west=meta_data['nsew']
    numlatbins=200
    numlonbins=200
    bin_lats=binit(south,north,numlatbins,-999,-888)
    bin_lons=binit(west,east,numlonbins,-999,-888)

    ## #
    ## # use ravel() to turn 2-d arrays into 1-d arrays
    ## #
    lat_count,lat_index,lowlats,highlats=bin_lats.do_bins(partLats.ravel())    
    lon_count,lon_index,lowlons,highlons=bin_lons.do_bins(partLons.ravel())    
    #
    # check to make sure that the binit histogram agrees with matplotlib hist
    #
    fig1=plt.figure(3)
    fig1.clf()
    fig1.subplots_adjust(hspace=0.3)
    axis1=fig1.add_subplot(211)
    axis2=fig1.add_subplot(212)