import numpy as np
from matplotlib import pyplot as plt
from nilearn import plotting
fig, ax = plt.subplots(1, 1, figsize=(10, 10))
// Mask the main diagonal for visualization:
np.fill_diagonal(correlation_matrix, 0)
plotting.plot_matrix(correlation_matrix, ax=ax, labels=labels,
vmax=0.8, vmin=-0.8)
After Change
// Mask the main diagonal for visualization:
np.fill_diagonal(correlation_matrix, 0)
plotting.plot_matrix(correlation_matrix, figure=(10, 8), labels=labels[1:],
vmax=0.8, vmin=-0.8, title="No confounds")
plotting.show()