Plot correlation of many variables in a tight color grid.
Parameters : | dcorr : ndarray
xnames : list of str, optional
ynames : list of str, optional
title : str, optional
normcolor : bool or tuple of scalars, optional
ax : Matplotlib AxesSubplot instance, optional
cmap : str or Matplotlib Colormap instance, optional
|
---|---|
Returns : | fig : Matplotlib figure instance
|
Examples
>>> import numpy as np
>>> import matplotlib.pyplot as plt
>>> import statsmodels.api as sm
>>> hie_data = sm.datasets.randhie.load_pandas()
>>> corr_matrix = np.corrcoef(hie_data.data.T)
>>> sm.graphics.plot_corr(corr_matrix, xnames=hie_data.names)
>>> plt.show()