, level=0.9, varnames=None, ell_kwds=None, plot_kwds=None, add_titles=False, keep_ticks=False, fig=None)[source]

Create a grid of scatter plots with confidence ellipses.

ell_kwds, plot_kdes not used yet

looks ok with 5 or 6 variables, too crowded with 8, too empty with 1

  • data (array_like) – Input data.

  • level (scalar, optional) – Default is 0.9.

  • varnames (list of str, optional) – Variable names. Used for y-axis labels, and if add_titles is True also for titles. If not given, integers[1] are used.

  • ell_kwds (dict, optional) – UNUSED

  • plot_kwds (dict, optional) – UNUSED

  • add_titles (bool, optional) – Whether or not to add titles to each subplot. Default is False. Titles are constructed from varnames.

  • keep_ticks (bool, optional) – If False (default), remove all axis ticks.

  • fig (Matplotlib figure instance, optional) – If given, this figure is simply returned. Otherwise a new figure is created.


fig – If fig is None, the created figure. Otherwise fig itself.

Return type

Matplotlib figure instance


>>> import statsmodels.api as sm
>>> import matplotlib.pyplot as plt
>>> import numpy as np
>>> from import scatter_ellipse
>>> data = sm.datasets.statecrime.load_pandas().data
>>> fig = plt.figure(figsize=(8,8))
>>> scatter_ellipse(data, varnames=data.columns, fig=fig)

..plot :: plots/