'Plot of the ordered eigenvalues
Parameters
ncomp : int, optional
Number of components ot include in the plot.  If None, will
included the same as the number of components computed
log_scale : boot, optional
Flag indicating whether ot use a log scale for the y-axis
cumulative : bool, optional
Flag indicating whether to plot the eigenvalues or cumulative
eigenvalues
ax : Matplotlib axes instance, optional
An axes on which to draw the graph.  If omitted, new a figure
is created
Returns
fig : figure
Handle to the figure'

def plot_scree(self, ncomp=None, log_scale=True, cumulative=False, ax=None):

    import statsmodels.graphics.utils as gutils
    (fig, ax) = gutils.create_mpl_ax(ax)
    ncomp = (self._ncomp if (ncomp is None) else ncomp)
    vals = np.asarray(self.eigenvals)
    vals = vals[:self._ncomp]
    if cumulative:
        vals = np.cumsum(vals)
    if log_scale:
        ax.set_yscale('log')
    ax.plot(np.arange(ncomp), vals[:ncomp], 'bo')
    ax.autoscale(tight=True)
    xlim = np.array(ax.get_xlim())
    sp = (xlim[1] - xlim[0])
    xlim += (0.02 * np.array([(- sp), sp]))
    ax.set_xlim(xlim)
    ylim = np.array(ax.get_ylim())
    scale = 0.02
    if log_scale:
        sp = np.log((ylim[1] / ylim[0]))
        ylim = np.exp(np.array([(np.log(ylim[0]) - (scale * sp)), (np.log(ylim[1]) + (scale * sp))]))
    else:
        sp = (ylim[1] - ylim[0])
        ylim += (scale * np.array([(- sp), sp]))
    ax.set_ylim(ylim)
    ax.set_title('Scree    Plot')
    ax.set_ylabel('Eigenvalue')
    ax.set_xlabel('Component    Number')
    fig.tight_layout()
    return fig
