Menu

Statistical
Static
26 Python scripts generated for connectivity matrix this week

Connectivity Matrix

Chart overview

A connectivity matrix displays pairwise values - such as functional correlation, structural tract density, or effective connectivity - between all nodes in a network as a colour-coded square matrix.

Key points

  • Neuroimaging researchers use it to characterise whole-brain functional networks from fMRI or structural networks from diffusion MRI tractography.
  • The matrix reveals modular community structure, hubs, and inter-network coupling that underlie cognition.

Example Visualization

Brain region connectivity matrix shown as a symmetric square heatmap with colour-coded pairwise correlation values and brain region labels on both axes

Create This Chart Now

Generate publication-ready connectivity matrixs with AI in seconds. No coding required – just describe your data and let AI do the work.

View example prompt
Example AI Prompt

"Create a brain connectivity matrix from my data. Display pairwise values as a symmetric square heatmap, cluster regions by network, annotate significance with asterisks, use a diverging colormap centred at zero, and format for a journal-quality neuroimaging figure."

How to create this chart in 30 seconds

1

Upload Data

Drag & drop your Excel or CSV file. Plotivy securely processes it in your browser.

2

AI Generation

Our AI analyzes your data and generates the Connectivity Matrix code automatically.

3

Customize & Export

Tweak the design with natural language, then export as high-res PNG, SVG or PDF.

Python Code Example

example.py
import numpy as np
import matplotlib.pyplot as plt
import seaborn as sns

np.random.seed(42)
matrix = np.random.rand(15, 15)
matrix = (matrix + matrix.T) / 2
np.fill_diagonal(matrix, 1)

plt.figure(figsize=(8, 7))
sns.heatmap(matrix, cmap='viridis', vmin=0, vmax=1, square=True)
plt.title('Functional Connectivity Matrix', fontsize=14, fontweight='bold', pad=20)
plt.xlabel('Region', fontsize=12)
plt.ylabel('Region', fontsize=12)
plt.tight_layout()
plt.savefig('plotivy-connectivity-matrix.png', dpi=150)
print("Connectivity matrix generated successfully.")

Opens the Analyze page with this code pre-loaded and ready to execute

Console Output

Output
Connectivity matrix generated successfully.

Common Use Cases

  • 1Visualising resting-state functional connectivity from fMRI BOLD signals
  • 2Displaying structural white-matter connectivity from tractography streamline counts
  • 3Comparing connectivity matrices between patient and control groups
  • 4Identifying large-scale network modules such as default mode and sensorimotor networks

Pro Tips

Sort rows and columns by network affiliation to reveal modular block structure

Use a diverging colormap (e.g. RdBu_r) centred at zero for correlation data

Mask the diagonal and optionally the lower triangle to reduce redundancy

Annotate statistically significant connections with an asterisk overlay

Free Cheat Sheet

Scientific Chart Selection Cheat Sheet

Not sure whether to use a Violin Plot, Box Plot, or Ridge Plot? Download our single-page reference mapping the most-used scientific chart types, exactly when to use them, and the core Matplotlib/Seaborn functions.

Comparison Charts
Distribution Charts
Time Series Data
Common Mistakes
No spam. Unsubscribe anytime.