Logo

statsmodels.graphics.correlation.plot_corr_grid

statsmodels.graphics.correlation.plot_corr_grid(dcorrs, titles=None, ncols=2, normcolor=False, xnames=None, ynames=None, fig=None)[source]

Create a grid of correlation plots.

Parameters :

dcorrs : list, iterable of ndarrays

list of correlation matrices

titles : None or iterable of strings

list of titles for the subplots

ncols : int

number of columns in the subplot grid. Layout is designed for two or three columns.

normcolor : bool or tuple

If false (default), then the color coding range corresponds to the lowest and highest correlation (automatic choice by matplotlib). If true, then the color range is normalized to (-1, 1). If this is a tuple of two numbers, then they define the range for the color bar.

xnames : None or list of strings

labels for x axis. If None, then the matplotlib defaults are used. If it is an empty list, [], then not ticks and labels are added.

ynames : None or list of strings

labels for y axis. If None, then the matplotlib defaults are used. If it is an empty list, [], then not ticks and labels are added.

fig : Matplotlib figure instance, optional

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

Returns :

fig : Matplotlib figure instance

If ax is None, the created figure. Otherwise the figure to which ax is connected.

Notes

Possible extension for options, suppress labels except first column and last row.

Previous topic

statsmodels.graphics.correlation.plot_corr

Next topic

statsmodels.graphics.plot_grids.scatter_ellipse

This Page