File Exchange

image thumbnail

Correlation circles

version (4.55 KB) by David Legland
Display correlation matrix using colored circles


Updated 26 Feb 2014

View License

The goal of this function is to nicely visualize correlations within a data table.
The function computes the correlation matrix of the data, and represents each correlation coefficient with a colored disc: the radius is proportional to the absolute value of correlation, and the color represents the sign of the correlation (red=positive, blue=negative). Variables with low correlation are represented by a small green or yellow disc.

Example of use:
load cities
correlationCircles(ratings, 'varNames', categories)

It is inspired by the contribution of Taiyun Wei for R:

Cite As

David Legland (2020). Correlation circles (, MATLAB Central File Exchange. Retrieved .

Comments and Ratings (4)


Wei Wu

Good work!

And would you please add a legend bar to show the range of the color?

Marko Peric

Really useful!


Exactly what I was looking for, thank you.

MATLAB Release Compatibility
Created with R2009b
Compatible with any release
Platform Compatibility
Windows macOS Linux