Plotting correlations matrices in R Package

Correlations matrices give us relevant information, but sometimes it is hard to visualize them.

R Package provides several functions to plot correlations matrices. Following there is a very simple but effective solution for plotting a correlation matrix using package “corrplot”.


data <- array(data=runif(100, min=-1, max=1)
 , dim=c(10,10)
 , dimnames=list(paste("A", 1:10, sep=""), paste("B", 1:10, sep="")));

corrplot(data, type="full", order="hclust", tl.col="black",

And this is the plot:


Positive correlations are displayed in blue and negative correlations in red color. Color intensity and the size of the circle are proportional to the correlation coefficients. The legend color shows the correlation coefficients and the corresponding colors.

Further examples can be found at

This entry was posted in Data Mining and tagged , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s