Menu

DATA ANALYSIS

Correlation Heatmap

Create publication-quality correlation matrix heatmaps with significance asterisks, upper-triangle masking, and diverging color scales - from genomics to finance and social science.

Essential Correlation Visualizations

Correlation analysis reveals structure hidden in multivariate data. Whether you are exploring gene co-expression, financial asset returns, or survey responses, the right heatmap variant communicates both strength and significance clearly.

Pearson Heatmap

Full correlation matrix with coefficient annotations and masked upper triangle

Spearman Rank

Non-parametric correlation for non-normal data and ordinal variables

Distance Matrix

Pairwise distance visualization for clustering and dimensionality reduction

Partial Correlation

Control for confounders between variable pairs with conditional independence

Time-Lag Correlation

Auto-correlation over time lags to reveal periodic or delayed relationships

Variable Pairs

Scatter matrix with marginal distributions linking each variable pair

Why Data Scientists Use Plotivy

Automatic Masking

Upper-triangle masking with one setting, no manual indexing or boolean array construction needed.

Significance Asterisks

p-value annotation overlaid on correlation coefficients automatically using scipy stats or pingouin.

Color Scale Control

Diverging palettes (RdBu, coolwarm) with centered zero for clean interpretation of positive and negative correlations.

Clustered Layout

Hierarchical reordering so correlated groups cluster visually, revealing block structure in the matrix.

Pearson Correlation Matrix with Masking

Eight variables with Seaborn heatmap and upper-triangle masking. Edit the number of variables or swap the colormap directly in the editor to see the change instantly.

Live Code Editor
Code EditorPython
Loading editor...
Live Preview

Preparing preview

Running once automatically on first load

Learn by Experimenting

This is a safe playground for learning! Try changing:

  • • Colors: Modify color values to see different palettes
  • • Numbers: Adjust sizes, positions, or data ranges
  • • Labels: Update titles, axis names, or legends

Edit the code, run it, then open the full data visualization tool to continue with your own dataset.

Significance-Annotated Correlation Heatmap

Gene expression correlations with p-value significance stars overlaid on each cell. The RdBu colormap keeps zero centered so positive and negative correlations are instantly distinguishable.

Live Code Editor
Code EditorPython
Loading editor...
Live Preview

Preparing preview

Running once automatically on first load

Learn by Experimenting

This is a safe playground for learning! Try changing:

  • • Colors: Modify color values to see different palettes
  • • Numbers: Adjust sizes, positions, or data ranges
  • • Labels: Update titles, axis names, or legends

Edit the code, run it, then open the full data visualization tool to continue with your own dataset.

Chart gallery

Explore Related Chart Types

Interactive examples with ready-to-run code

Browse all chart types →
Correlation heatmap with diverging color scale and coefficient annotations
Statistical•seaborn, matplotlib
From the chart gallery•Correlation analysis between variables

Heatmap

Represents data values as colors in a two-dimensional matrix format.

Sample code / prompt

import matplotlib.pyplot as plt
import seaborn as sns
import pandas as pd
import numpy as np

# Create correlation matrix for financial metrics
metrics = ['Revenue', 'Profit', 'Expenses', 'ROI', 'Customers', 'AOV', 'Marketing', 'Employees']
correlation_data = np.array([
    [1.00, 0.85, -0.45, 0.72, 0.88, 0.65, 0.72, 0.55],
    [0.85, 1.00, -0.78, 0.92, 0.75, 0.58, 0.63, 0.48],
Violin plot comparing score distributions across 3 groups with inner box plots
Distribution•seaborn, matplotlib
From the chart gallery•Comparing treatment effects across groups

Violin Plot

Combines box plots with kernel density to show distribution shape across groups.

Sample code / prompt

import matplotlib.pyplot as plt
import seaborn as sns
import pandas as pd
import numpy as np
from scipy.stats import f_oneway

# Generate exam score data for 3 groups
np.random.seed(42)
control = np.random.normal(72, 12, 50)
treatment_a = np.random.normal(78, 10, 50)

Ready to Visualize Your Correlations?

Upload your CSV, describe the correlation plot you need, and get publication-ready figures with full Python code in seconds.

Start Free - No Sign-Up