statsmodels.graphics.correlation.plot_corr(dcorr, xnames=None, ynames=None, title=None, normcolor=False, ax=None, cmap='RdYlBu_r')
[source]
Plot correlation of many variables in a tight color grid.
Parameters: |
|
---|---|
Returns: |
fig – If |
Return type: |
Matplotlib figure instance |
>>> import numpy as np >>> import matplotlib.pyplot as plt >>> import statsmodels.graphics.api as smg
>>> hie_data = sm.datasets.randhie.load_pandas() >>> corr_matrix = np.corrcoef(hie_data.data.T) >>> smg.plot_corr(corr_matrix, xnames=hie_data.names) >>> plt.show()
© 2009–2012 Statsmodels Developers
© 2006–2008 Scipy Developers
© 2006 Jonathan E. Taylor
Licensed under the 3-clause BSD License.
http://www.statsmodels.org/stable/generated/statsmodels.graphics.correlation.plot_corr.html