'plot data from a `CMADataLogger` (using the files written by the logger).
Arguments
`fig`
figure number, by default 325
`iabscissa`
``0==plot`` versus iteration count,
``1==plot`` versus function evaluation number
`iteridx`
iteration indices to plot
Return `CMADataLogger` itself.
Examples
import cma
logger = cma.CMADataLogger()  # with default name
# try to plot the "default logging" data (e.g. from previous fmin calls)
logger.plot() # to continue you might need to close the pop-up window
# once and call plot() again.
# This behavior seems to disappear in subsequent
# calls of plot(). Also using ipython with -pylab
# option might help.
cma.savefig(\'fig325.png\')  # save current figure
logger.closefig()
Dependencies: matlabplotlib/pylab.'

def plot(self, fig=None, iabscissa=1, iteridx=None, plot_mean=True, foffset=1e-19, x_opt=None, fontsize=10):

    dat = self.load(self.name_prefix)
    try:
        from matplotlib.pylab import figure, ioff, ion, subplot, semilogy, hold, plot, grid, axis, title, text, xlabel, isinteractive, draw, gcf
    except ImportError:
        ImportError('could    not    find    matplotlib.pylab    module,    function    plot()    is    not    available')
        return
    if (fontsize and (pylab.rcParams['font.size'] != fontsize)):
        print(((("global    variable    pylab.rcParams['font.size']    set    (from    " + str(pylab.rcParams['font.size'])) + ')    to    ') + str(fontsize)))
        pylab.rcParams['font.size'] = fontsize
    if fig:
        figure(fig)
    else:
        figure(325)
    self.fighandle = gcf()
    if (iabscissa not in (0, 1)):
        iabscissa = 1
    interactive_status = isinteractive()
    ioff()
    dat.x = dat.xmean
    if (not plot_mean):
        try:
            dat.x = dat.xrecent
        except:
            pass
    if (len(dat.x) < 2):
        print('not    enough    data    to    plot')
        return {}
    if (iteridx is not None):
        dat.f = dat.f[np.where([(x in iteridx) for x in dat.f[:, 0]])[0], :]
        dat.D = dat.D[np.where([(x in iteridx) for x in dat.D[:, 0]])[0], :]
        iteridx.append(dat.x[((-1), 1)])
        dat.x = dat.x[np.where([(x in iteridx) for x in dat.x[:, 0]])[0], :]
        dat.std = dat.std[np.where([(x in iteridx) for x in dat.std[:, 0]])[0], :]
    if (iabscissa == 0):
        xlab = 'iterations'
    elif (iabscissa == 1):
        xlab = 'function    evaluations'
    if (dat.x.shape[1] < 100):
        minxend = int((1.06 * dat.x[((-2), iabscissa)]))
        dat.x[((-1), iabscissa)] = minxend
        idx = np.argsort(dat.x[(-2), 5:])
        idx2 = np.argsort(idx)
        if (x_opt is None):
            dat.x[((-1), (5 + idx))] = np.linspace(np.min(dat.x[:, 5:]), np.max(dat.x[:, 5:]), (dat.x.shape[1] - 5))
        else:
            dat.x[((-1), (5 + idx))] = np.logspace(np.log10(np.min(abs(dat.x[:, 5:]))), np.log10(np.max(abs(dat.x[:, 5:]))), (dat.x.shape[1] - 5))
    else:
        minxend = 0
    if (len(dat.f) == 0):
        print('nothing    to    plot')
        return
    ioff()
    subplot(2, 2, 1)
    self.plotdivers(dat, iabscissa, foffset)
    subplot(2, 2, 2)
    hold(False)
    if (x_opt is not None):
        semilogy(dat.x[:, iabscissa], (abs(dat.x[:, 5:]) - x_opt), '-')
    else:
        plot(dat.x[:, iabscissa], dat.x[:, 5:], '-')
    hold(True)
    grid(True)
    ax = array(axis())
    axis(ax)
    ax[1] -= 1e-06
    if (dat.x.shape[1] < 100):
        yy = np.linspace((ax[2] + 1e-06), (ax[3] - 1e-06), (dat.x.shape[1] - 5))
        idx = np.argsort(dat.x[(-1), 5:])
        idx2 = np.argsort(idx)
        if (x_opt is not None):
            semilogy([dat.x[((-1), iabscissa)], ax[1]], [abs(dat.x[(-1), 5:]), yy[idx2]], 'k-')
            semilogy(np.dot(dat.x[((-2), iabscissa)], [1, 1]), array([(ax[2] + 1e-06), (ax[3] - 1e-06)]), 'k-')
        else:
            plot(np.dot(dat.x[((-2), iabscissa)], [1, 1]), array([(ax[2] + 1e-06), (ax[3] - 1e-06)]), 'k-')
        for i in range(len(idx)):
            text(dat.x[((-1), iabscissa)], dat.x[((-1), (5 + i))], ((('x(' + str(i)) + ')=') + str(dat.x[((-2), (5 + i))])))
    i = 2
    while ((i < len(dat.f)) and (dat.f[(- i)][0] == dat.f[(-1)][0])):
        i += 1
    title((((((('Object    Variables    (' + ('mean' if plot_mean else 'curr    best')) + ',    ') + str((dat.x.shape[1] - 5))) + '-D,    popsize~') + (str(int(((dat.f[(-1)][1] - dat.f[(- i)][1]) / (dat.f[(-1)][0] - dat.f[(- i)][0])))) if ((len(dat.f.T[0]) > 1) and (dat.f[(-1)][0] > dat.f[(- i)][0])) else 'NA')) + ')'))
    subplot(2, 2, 3)
    hold(False)
    semilogy(dat.D[:, iabscissa], dat.D[:, 5:], '-b')
    hold(True)
    grid(True)
    ax = array(axis())
    axis(ax)
    title('Scaling    (All    Main    Axes)')
    xlabel(xlab)
    subplot(2, 2, 4)
    hold(False)
    dat.std[:, 5:] = np.transpose((dat.std[:, 5:].T / dat.std[:, 2].T))
    if ((1 < 2) and (dat.std.shape[1] < 100)):
        minxend = int((1.06 * dat.x[((-2), iabscissa)]))
        dat.std[((-1), iabscissa)] = minxend
        idx = np.argsort(dat.std[(-2), 5:])
        idx2 = np.argsort(idx)
        dat.std[((-1), (5 + idx))] = np.logspace(np.log10(np.min(dat.std[:, 5:])), np.log10(np.max(dat.std[:, 5:])), (dat.std.shape[1] - 5))
        dat.std[((-1), iabscissa)] = minxend
        yy = np.logspace(np.log10(ax[2]), np.log10(ax[3]), (dat.std.shape[1] - 5))
        idx = np.argsort(dat.std[(-1), 5:])
        idx2 = np.argsort(idx)
        plot(np.dot(dat.std[((-2), iabscissa)], [1, 1]), array([np.min(dat.std[(-2), 5:]), np.max(dat.std[(-2), 5:])]), 'k-')
        hold(True)
        for i in xrange(len(idx)):
            text(dat.std[((-1), iabscissa)], dat.std[((-1), (5 + i))], ('    ' + str(i)))
    semilogy(dat.std[:, iabscissa], dat.std[:, 5:], '-')
    grid(True)
    title('Standard    Deviations    in    All    Coordinates')
    xlabel(xlab)
    draw()
    if interactive_status:
        ion()
        draw()
    show()
    return self
