R Graph Gallery

Correlation Ellipses

The corrgram function produces a graphical display of a correlation matrix, called a correlogram. The cells of the matrix can be shaded or colored to show the correlation value.

See the corrgram package.

Social


Discussion

comments powered by Disqus

R Code

# Load datasets first
require( corrgram )

data(baseball)

vars2 <- c("Assists","Atbat","Errors","Hits","Homer","logSal",
           "Putouts","RBI","Runs","Walks","Years")

corrgram(baseball[,vars2], order=TRUE,
         main="Baseball correlation ellipses",
         panel=panel.ellipse, 
		 text.panel=panel.txt, 
		 diag.panel=panel.minmax)