Example #1
0
def beautifyFVD(isStoringXMax=False, ylabel=True):
    """Formats the figure of the run length distribution.

    This function is to be used with :py:func:`plotFVDistr`

    :param bool isStoringMaxF: if set to True, the first call
                               :py:func:`beautifyFVD` sets the global
                               :py:data:`fmax` and all subsequent call
                               will have the same maximum xlim
    :param bool ylabel: if True, y-axis will be labelled.

    """
    a = plt.gca()
    a.set_xscale('log')

    if isStoringXMax:
        global fmax
    else:
        fmax = None

    if not fmax:
        xmin, fmax = plt.xlim()
    plt.xlim(1e-8, fmax)  # 1e-8 was 1.
    # axisHandle.invert_xaxis()
    a.set_xlabel('log10 of Df')  # / Dftarget
    if ylabel:
        a.set_ylabel('proportion of trials')
    logxticks(limits=plt.xlim())
    beautifyECDF()
    if not ylabel:
        a.set_yticklabels(())
Example #2
0
def beautify():
    """Format the figure of the run length distribution.

    Used in conjunction with plot method (obsolete/outdated, see functions ``beautifyFVD`` and ``beautifyRLD``).

    """
    # raise NotImplementedError('this implementation is obsolete')
    plt.subplot(121)
    axisHandle = plt.gca()
    axisHandle.set_xscale('log')
    axisHandle.set_xlabel('log10 of FEvals / DIM')
    axisHandle.set_ylabel('proportion of trials')
    # Grid options
    logxticks()
    beautifyECDF()

    plt.subplot(122)
    axisHandle = plt.gca()
    axisHandle.set_xscale('log')
    xmin, fmax = plt.xlim()
    plt.xlim(1., fmax)
    axisHandle.set_xlabel('log10 of Df / Dftarget')
    beautifyECDF()
    logxticks()
    axisHandle.set_yticklabels(())
    plt.gcf().set_size_inches(16.35, 6.175)
Example #3
0
def beautifyFVD(isStoringXMax = False, ylabel = True):
    """Formats the figure of the run length distribution.

    This function is to be used with :py:func:`plotFVDistr`

    :param bool isStoringMaxF: if set to True, the first call
                               :py:func:`beautifyFVD` sets the global
                               :py:data:`fmax` and all subsequent call
                               will have the same maximum xlim
    :param bool ylabel: if True, y-axis will be labelled.

    """
    a = plt.gca()
    a.set_xscale('log')

    if isStoringXMax:
        global fmax
    else:
        fmax = None

    if not fmax:
        xmin, fmax = plt.xlim()
    plt.xlim(1e-8, fmax) # 1e-8 was 1.
    # axisHandle.invert_xaxis()
    a.set_xlabel('log10 of Df') # / Dftarget
    if ylabel:
        a.set_ylabel('proportion of trials')
    logxticks(limits = plt.xlim())
    beautifyECDF()
    if not ylabel:
        a.set_yticklabels(())
Example #4
0
def beautify():
    """Format the figure of the run length distribution.

    Used in conjunction with plot method (obsolete/outdated, see functions ``beautifyFVD`` and ``beautifyRLD``).

    """
    # raise NotImplementedError('this implementation is obsolete')
    plt.subplot(121)
    axisHandle = plt.gca()
    axisHandle.set_xscale('log')
    axisHandle.set_xlabel('log10 of FEvals / DIM')
    axisHandle.set_ylabel('proportion of trials')
    # Grid options
    logxticks()
    beautifyECDF()

    plt.subplot(122)
    axisHandle = plt.gca()
    axisHandle.set_xscale('log')
    xmin, fmax = plt.xlim()
    plt.xlim(1., fmax)
    axisHandle.set_xlabel('log10 of Df / Dftarget')
    beautifyECDF()
    logxticks()
    axisHandle.set_yticklabels(())
    plt.gcf().set_size_inches(16.35, 6.175)
def beautify():
    """Customize figure presentation."""

    #plt.xscale('log') # Does not work with matplotlib 0.91.2
    a = plt.gca()
    a.set_xscale('log')
    #Tick label handling

    plt.xlabel('log10 of (ERT / ERTref)')
    plt.ylabel('Proportion of functions')
    logxticks()
    beautifyECDF()
Example #6
0
def beautify():
    """Customize figure presentation."""

    #plt.xscale('log') # Does not work with matplotlib 0.91.2
    a = plt.gca()
    a.set_xscale('log')
    #Tick label handling

    plt.xlabel('log10 of (ERT / ERTref)')
    plt.ylabel('Proportion of functions')
    logxticks()
    beautifyECDF()
Example #7
0
def beautify():
    """Customize figure presentation."""

    #plt.xscale('log') # Does not work with matplotlib 0.91.2
    a = plt.gca()
    a.set_xscale('log')
    #Tick label handling
    plt.xlim(xmin=1e-0)

    plt.xlabel('log10 of (# f-evals / dimension)')
    plt.ylabel('Proportion of function+target pairs')
    ppfig.logxticks()
    pprldistr.beautifyECDF()
Example #8
0
def beautify():
    """Customize figure presentation."""

    #plt.xscale('log') # Does not work with matplotlib 0.91.2
    a = plt.gca()
    a.set_xscale('log')
    #Tick label handling
    plt.xlim(xmin=1e-0)

    plt.xlabel('log10 of (# f-evals / dimension)')
    plt.ylabel('Proportion of function+target pairs')
    ppfig.logxticks()
    pprldistr.beautifyECDF()
Example #9
0
def beautifyRLD(xlimit_max = None):
    """Format and save the figure of the run length distribution.

    After calling this function, changing the boundaries of the figure
    will not update the ticks and tick labels.

    """
    a = plt.gca()
    a.set_xscale('log')
    a.set_xlabel('log10 of FEvals / DIM')
    a.set_ylabel('proportion of trials')
    logxticks()
    if xlimit_max:
        plt.xlim(xmax = xlimit_max ** 1.0) # was 1.05
    plt.xlim(xmin = runlen_xlimits_min)
    plt.text(plt.xlim()[0], plt.ylim()[0], single_target_values.short_info, fontsize = 14)
    beautifyECDF()
Example #10
0
def beautify():
    """Customize figure presentation."""

    # plt.xscale('log') # Does not work with matplotlib 0.91.2
    a = plt.gca()
    a.set_xscale("log")
    # Tick label handling
    plt.xlim(xmin=1e-0)

    global divide_by_dimension
    if divide_by_dimension:
        plt.xlabel("log10 of (# f-evals / dimension)", fontsize=label_fontsize)
    else:
        plt.xlabel("log10 of # f-evals", fontsize=label_fontsize)
    plt.ylabel("Proportion of function+target pairs", fontsize=label_fontsize)
    ppfig.logxticks()
    pprldistr.beautifyECDF()
Example #11
0
def beautifyRLD(xlimit_max=None):
    """Format and save the figure of the run length distribution.
    
    After calling this function, changing the boundaries of the figure
    will not update the ticks and tick labels.
    
    """
    a = plt.gca()
    a.set_xscale('log')
    a.set_xlabel('log10 of FEvals / DIM')
    a.set_ylabel('proportion of trials')
    logxticks()
    if xlimit_max:
        plt.xlim(xmax=xlimit_max ** 1.0)  # was 1.05
    plt.xlim(xmin=runlen_xlimits_min)
    plt.text(plt.xlim()[0], plt.ylim()[0], single_target_values.short_info, fontsize=14)
    beautifyECDF()