Logo

statsmodels.graphics.correlation.plot_corr

statsmodels.graphics.correlation.plot_corr(dcorr, xnames=None, ynames=None, title=None, normcolor=False, ax=None)[source]

Plot correlation of many variables in a tight color grid.

This creates a new figure

Parameters:

dcorr : ndarray

correlation matrix

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.

title : None or string

title for figure. If None, then default is added. If title=’‘, then no title is added

normcolor : bool

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.

ax : Matplotlib AxesSubplot instance, optional

If ax is None, then a figure is created. If an axis instance is given, then only the main plot but not the colorbar is created.

Returns:

fig : Matplotlib figure instance

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

Previous topic

statsmodels.graphics.boxplots.beanplot

Next topic

statsmodels.graphics.correlation.plot_corr_grid

This Page