Questions tagged [r-corrplot]

R package `corrplot` provides functions for graphical display of correlation matrices.

corrplot is an R package used for graphical display of a correlation and general numeric matrices. It also contains some algorithms to do matrix reordering.

224 questions
20
votes
4 answers

How to change font size of the correlation coefficient in corrplot?

I am plotting correlation plot with corrplot. I want to plot also the correlation coefficients: require(corrplot) test <- matrix(data = rnorm(400), nrow=20, ncol=20) corrplot(cor(test), method = "color", addCoef.col="grey", order = "AOE") But they…
Tomas
  • 52,167
  • 46
  • 207
  • 345
15
votes
3 answers

Manipulating axis titles in ggpairs (GGally)

I'm using the code below to generate the following chart. # Setup data(airquality) # Device start png(filename = "example.png", units = "cm", width = 20, height = 14, res = 300) # Define chart pairs.chrt <- ggpairs(airquality, …
Konrad
  • 14,406
  • 15
  • 86
  • 141
14
votes
1 answer

How to have R corrplot title position correct?

Code and its output where title is wrongly positioned outside the window page: library('corrplot') #options(error=recover) # http://stackoverflow.com/a/15031603/54964 #debugger() # load("last.dump.rda"); debugger(last.dump) # run if…
Léo Léopold Hertz 준영
  • 119,377
  • 159
  • 417
  • 655
14
votes
3 answers

Error using corrplot

I need help with interpreting an error message using corrplot. Here is my script install.packages("ggplot2") install.packages("corrplot") install.packages("xlsx") library(ggplot2) library(corrplot) library(xlsx) #set working…
jonas
  • 10,523
  • 21
  • 53
  • 71
11
votes
3 answers

R - change size of axis labels for corrplot

I am using the following with corrplot: require("corrplot") ## needs the corrplot package corrplot(cor(lpp_axis1, lpp_axis2), method=c("number"), bg = "grey10", addgrid.col = "gray50", tl.offset = 2, tl.cex=2, tl.col = "black", …
d-cubed
  • 902
  • 5
  • 29
  • 52
9
votes
1 answer

R: Titles cut in half with par()

I have this figure: require(corrplot) par(oma=c(0,0,2,0), mfrow = c(1, 3)) for (country in c("Italy","Germany","Afghanistan")) { corrplot.mixed(cor(data.frame(v1=rnorm(40), v2=rnorm(40), …
CptNemo
  • 5,805
  • 14
  • 46
  • 95
9
votes
1 answer

Correlation Corrplot Configuration

I am newbie in R scripts :-) I need build a correlation matrix and I´am trying to configurate some parameters to adapt the graph. I am using the corrplot package. I Built a corrplot matrix this way: corrplot(cor(d1[,2:14], d1[,2:14]),…
Corintho
  • 133
  • 1
  • 1
  • 4
8
votes
1 answer

length of 'dimnames' [2] not equal to array extent when using corrplot function from a matrix read from a csv file

I wanna read the data from a csv file, save it as a matrix and use it for visualization. data<-read.table("Desktop/Decision_Tree/cor_test_.csv",header = F,sep = ",") data V1 V2 V3 V4 V5 V6 1 1.00 0.00 0.00 0.00 0.00 0 2 0.11 …
Jeffrey Chen
  • 81
  • 1
  • 1
  • 2
8
votes
1 answer

R corrplot change data labels

I am using R corrplot library. It looks amazing, however to produce a really good plot I want to change the labels of rows and columns of the correlation matrix. One solution is to do something like this: cbak <-…
Oleg Titov
  • 1,040
  • 1
  • 8
  • 12
8
votes
3 answers

R return corrplot as object

corrplot plots a correlation matrix, but it does not return a graphical object (grob) I would like to plot several correlation matrices on a single page. For normal plots, I would use grid.arrange from the gridExtra package. However since corrplot…
Jeff
  • 11,233
  • 10
  • 44
  • 85
7
votes
1 answer

R corrplot colors range

I am using corrplot in R to plot a correlation-coefficient matrix, but my correlations range only from 0.95 to 1.00, and I don't know how to set the lower and upper bounds of colors palette. corrplot(segCorr, order = "hclust", tl.cex = .6, …
Peter.k
  • 1,264
  • 13
  • 29
7
votes
1 answer

How to use corrplot with simple matrices

I have a simple 8 by 8 matrix M <- matrix(rnorm(64), nrow=8, ncol=8) How should I transform it to plot it with library(corrplot)? Without transformation the error is: corrplot.mixed(M) Error in corrplot(corr, type = "upper", method = upper, diag…
CptNemo
  • 5,805
  • 14
  • 46
  • 95
6
votes
2 answers

My corrplot does not fit in the screen?

I have made a corrplot of a dataframe df.Unfortunately the corrplot doesn't fit the screen. The top of the corrplot is missing. How can I make it fit in the screen?
user5543269
  • 107
  • 1
  • 2
  • 8
6
votes
1 answer

corrplot parameters in R

I have used the corrplot as below, but as you can see I need to enlarge the font size of numbers inside the circles and then the plot title is not in a correct position and font size(not visible completely) but I can not find the parameters for…
hora
  • 755
  • 5
  • 12
  • 23
5
votes
1 answer

How to remove label names in Corrplot

I am trying to plot a visualization using Corrplot in R. I have several variables in my data frame but when I try to plot the chart it shows as a very shabby visualization. I am not sure how do I remove the names of the variables in the matrix and…
user9580371
1
2 3
14 15