Skip to content

Instantly share code, notes, and snippets.

@jyfeather
Created April 24, 2015 20:55
Show Gist options
  • Save jyfeather/936b63cd4ae447000907 to your computer and use it in GitHub Desktop.
Save jyfeather/936b63cd4ae447000907 to your computer and use it in GitHub Desktop.
# corrplot
The R package **corrplot** package is an elegant visualization tool for correlation matrix and confidence interval. It also contains some algorithms to do matrix reordering. In addition, corrplot is good at details, including choosing color, text labels, color labels, layout, etc.
## Installation
You can install the stable version on [CRAN](http://cran.r-project.org/package=corrplot):
```r
install.packages('corrplot', dependencies = TRUE)
```
## Usage
```r
library(corrplot)
?corrplot
example(corrplot)
```
An example for correlation matrix:
```{r,eval=TRUE,out.height=500,out.width=500,fig.align='center',warning=FALSE}
library(corrplot)
M <- cor(mtcars)
corrplot(M, method = "ellipse")
```
For more examples, see its
[vignette](http://cran.r-project.org/web/packages/corrplot/vignettes/corrplot-intro.html).
## License
This package is free and open source software, licenced under GPL
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment