'Plot the coefficients of determination
Parameters
endog_labels : boolean, optional
Whether or not to label the endogenous variables along the x-axis
of the plots. Default is to include labels if there are 5 or fewer
endogenous variables.
fig : Matplotlib Figure instance, optional
If given, subplots are created in this figure instead of in a new
figure. Note that the grid will be created in the provided
figure using `fig.add_subplot()`.
figsize : tuple, optional
If a figure is created, this argument allows specifying a size.
The tuple is (width, height).
Notes
Produces a `k_factors` x 1 plot grid. The `i`th plot shows a bar plot
of the coefficients of determination associated with factor `i`. The
endogenous variables are arranged along the x-axis according to their
position in the `endog` array.
See Also
coefficients_of_determination'

def plot_coefficients_of_determination(self, endog_labels=None, fig=None, figsize=None):

    from statsmodels.graphics.utils import _import_mpl, create_mpl_fig
    _import_mpl()
    fig = create_mpl_fig(fig, figsize)
    spec = self.specification
    if (endog_labels is None):
        endog_labels = (spec.k_endog <= 5)
    coefficients_of_determination = self.coefficients_of_determination
    plot_idx = 1
    locations = np.arange(spec.k_endog)
    for coeffs in coefficients_of_determination.T:
        ax = fig.add_subplot(spec.k_factors, 1, plot_idx)
        ax.set_ylim((0, 1))
        ax.set(title=('Factor    %i' % plot_idx), ylabel='$R^2$')
        bars = ax.bar(locations, coeffs)
        if endog_labels:
            width = bars[0].get_width()
            ax.xaxis.set_ticks((locations + (width / 2)))
            ax.xaxis.set_ticklabels(self.model.endog_names)
        else:
            ax.set(xlabel='Endogenous    variables')
            ax.xaxis.set_ticks([])
        plot_idx += 1
    return fig
