0

I am trying to generate a plot from my data set that gives the correlation between my variables.

I am using the library GGally. here is my one line code.

ggpairs(Imputed_data,  title = "Scatterplot Matrix for the features of data Set")

I am getting a error

_bin()usingbins = 30. Pick better value withbinwidth`.

My data set has 14 variables, 13 are numeric and 1 is a factor variables.

I could understand that there is a problem with declaration of bins, that I should mention (bins=10) But, I am struck how I should do it in my code. I am new to R programming.

Mikz
  • 521
  • 2
  • 8
  • 26

1 Answers1

0

I have dataframe of 33 variables I got a similar question

Following things helped me

Getting errors when plotting using ggpairs

Here it is explained how, to configure ggpair we have to pass bandwidth parameter to stat_bin() using params .

In my case i followed another explanation on https://github.com/ggobi/ggally/issues/184

Following code worked for me

ggpairs(t, aes(colour = V33, alpha = 0.2), lower=list(combo=wrap("facethist",  
binwidth=0.5)))

here i am coloring using a factor variable V33 alpha is 0.2 and bandwidth 0.5

I did not find anywhere what bandwidth does exactly. But in my understanding it should be something regarding size.

shantanu pathak
  • 1,806
  • 16
  • 23