Exemple #1
0
def fig_by_type(pds, plottype, dim, fid):
    if plottype == "overview" or plottype == "overview0":
        return fig_overview(pds, dim, fid)

    fig = figure('%s (%s)'%(fid, plottype))
    ax = fig.add_subplot(111)
    plot_by_type(pds, ax, plottype, dim, fid)
    fig.text(0.9, 0.2, 'F'+fid, horizontalalignment='center', verticalalignment='center', transform=ax.transAxes)
    cplot.legend(ax, loc='lower left')
    return fig
Exemple #2
0
def fig_overview(pds, dim, fid):
    fig = figure('%s (overview)'%(fid))
    fig.text(0.5, 0.5, 'Function '+fid, horizontalalignment='center', verticalalignment='center')
    subplots = []
    # Also potentially interesting (but hard to comprehend):
    # evals2oracle_by_evals
    for (i, plottype) in enumerate(['fval_by_budget', 'rank_by_budget', 'fval2oracle_by_budget']):
        ax = fig.add_subplot(2, 2, 1+i)
        plot_by_type(pds, ax, plottype, dim, fid)
        subplots.append(ax)
    (handles, labels) = subplots[0].get_legend_handles_labels()
    cplot.legend(fig, handles=handles, labels=labels, loc='upper right', ncol=8)
    return fig