3.6.14.1.3. statsmodels.graphics.utils.create_mpl_fig

statsmodels.graphics.utils.create_mpl_fig(fig=None, figsize=None)[source]

Helper function for when multiple plot axes are needed.

Those axes should be created in the functions they are used in, with fig.add_subplot().

Parameters:

fig : Matplotlib figure instance, optional

If given, this figure is simply returned. Otherwise a new figure is created.

Returns:

fig : Matplotlib figure instance

If fig is None, the created figure. Otherwise the input fig is returned.

See also

create_mpl_ax