Josh
Josh

Reputation: 12791

Visualizing the full cross-correlation matrix

When plotting a cross-correlation matrix in seaborn is there any way to visualize the full matrix ? I know it's symmetric, but rendering the full matrix makes it easier to visually inspect it.

enter image description here

Upvotes: 1

Views: 2308

Answers (2)

Rafael Magalhães
Rafael Magalhães

Reputation: 111

Remove the 'mask' lines in the code. They are the ones that put empty values in the upper part of the matrix.

# Generate a mask for the upper triangle
mask = np.zeros_like(corr, dtype=np.bool)
mask[np.triu_indices_from(mask)] = True

This is what masks the upper triangle.

Upvotes: 0

mwaskom
mwaskom

Reputation: 49022

Not currently, though I have a more general purpose heatmap function in the works.

Upvotes: 1

Related Questions