Пример #1
0
            axtitle = 'Control'
        elif plot=='RUC':
            axtitle = ''
        else:
            axtitle = plot.replace('_',' ')
        ax.set_title(axtitle)
    if len(plotlist)==13:
        axes.flat[-2].axis('off')
    
    axes.flat[-1].axis('off')
    if vrbl=='cref' or 'strongestwind':
        axes.flat[1].axis('off')

    # axes.flat[-1].colorbar(cb)
    # plt.colorbar(cb,cax=cax)
    # plt.colorbar(cb,cax=axes.flat[-1],use_gridspec=True)
    fig.tight_layout(h_pad=0.01)
    fig.subplots_adjust(wspace = 0.1, hspace = 0.1)

    if vrbl is not 'sstrongestwind':
        cbar_ax = fig.add_axes([0.81,0.12,0.16,0.023])
        cb1 = plt.colorbar(cb,cax=cbar_ax,orientation='horizontal')#,extend='both')
        cb1.set_label('Comp. Reflectivity (dBZ)')

    sp_fname = p.create_fname(vrbl,utc=tstr,level=lv,f_prefix=IC,f_suffix=enstype)
    sp_fpath = os.path.join(sp_outdir,sp_fname)
    utils.trycreate(sp_outdir)
    fig.savefig(sp_fpath)
    plt.close(fig)
    print(("Saving figure to {0}".format(sp_fpath)))
Пример #2
0
        ax.set_title(axtitle)
    if len(plotlist) == 13:
        axes.flat[-2].axis('off')

    axes.flat[-1].axis('off')
    if vrbl == 'cref' or 'strongestwind':
        axes.flat[1].axis('off')

    # axes.flat[-1].colorbar(cb)
    # plt.colorbar(cb,cax=cax)
    # plt.colorbar(cb,cax=axes.flat[-1],use_gridspec=True)
    fig.tight_layout(h_pad=0.01)
    fig.subplots_adjust(wspace=0.1, hspace=0.1)

    if vrbl is not 'sstrongestwind':
        cbar_ax = fig.add_axes([0.81, 0.12, 0.16, 0.023])
        cb1 = plt.colorbar(cb, cax=cbar_ax,
                           orientation='horizontal')  #,extend='both')
        cb1.set_label('Comp. Reflectivity (dBZ)')

    sp_fname = p.create_fname(vrbl,
                              utc=tstr,
                              level=lv,
                              f_prefix=IC,
                              f_suffix=enstype)
    sp_fpath = os.path.join(sp_outdir, sp_fname)
    utils.trycreate(sp_outdir)
    fig.savefig(sp_fpath)
    plt.close(fig)
    print(("Saving figure to {0}".format(sp_fpath)))