3

I'm not able to change the diagonal plots in a ggpair-plot. I would like to change their appearance in general and maybe starting by leaving them blank. This is how I think it should be:

ggpairs(data=df,
             columns=1:3,
             diag = list(discrete = "blank"),
             title="APD pool",
             mapping=ggplot2::aes(colour = Irradiated)
            ) 

but it ends with a density curve(?!) in the diagonal elements. Due to Robin's comment I tried it with

ggpairs(data=df,
             columns=1:3,
             diag = list(continous = "blank"),
             title="APD pool",
             mapping=ggplot2::aes(colour = Irradiated)
            ) 

but it doesn't change.

Plot

What am I doing wrong? Thank you!

Reference: https://rdrr.io/cran/GGally/man/ggpairs.html

Ben
  • 1,432
  • 4
  • 20
  • 43

1 Answers1

6

You spelled continuous wrongly. Your code spelt it "continous" instead.

When you use diag, you have to pass in a list that may only contain the variables continuous, discrete, and na. When you assign a value to continuous, it can only be exactly one of

  • 'densityDiag'
  • 'barDiag'
  • 'blankDiag'

So instead of diag = list(continous = "blank") you want to have diag = list(continuous = "blankDiag") instead. That would do the trick: enter image description here

onlyphantom
  • 8,606
  • 4
  • 44
  • 58