Questions tagged [ggpairs]

71 questions
2
votes
1 answer

Ggpairs barDiag with normal curve

I am using the ggpairs from ggplot2. I need to get an histogram in the diagonal for the ggpairs, but want to superimpose the normal density curve using the mean and sd of the data. I read the help…
JPMD
  • 644
  • 1
  • 7
  • 19
2
votes
1 answer

Is there an R function to export the correlations showed in a correlation matrix?

I have created a correlation matrix with ggpairs, with my data grouped by factor. However I can't extract the correlations presented (I'm interested in the contribution of each factor to the overall correlation, as well as it's significance) I…
1
vote
1 answer

x-axis text disappears after customizing ggpairs plot

I want to create a correlation matrix with ggpairs. I only need the lower part. The upper and diagonal parts are not relevant. Furthermore, I want to keep the final plot simple and therefore remove the axis labels at the top left and bottom right,…
ChrisAl
  • 13
  • 3
1
vote
0 answers

adding significance level to ggpairs

I wish you can help me. I want to modify the ggpairs output for the following code: install.packages("GGally") library(GGally) cor.iris= ggpairs(iris, aes(color=iris$Species, alpha=0.5)) cor.iris conucting t-test and adding the significance…
maya zadok
  • 23
  • 4
1
vote
0 answers

ggpairs: Remove y axis label for only one plot

Helllo, I have made a correlation plot with ggpairs but I would like to remove the y axis labels in the first plot and then have a common range for the y axis for all the other plots (0 -1). The code I used is: ggpairs(predMatrixVal,labeller =…
lola
  • 145
  • 1
  • 9
1
vote
1 answer

Add p-value and/or 95% CI in the text of a correlation matrix / pairs plot

Is it possible to add in the text of the correlation matrix plot the exact p-value and/or 95% CI, next to where the point estimate is mentioned, by adding something to this code? I welcome solutions using other packages too. ggpairs(baseline2,…
jtjtjtjt
  • 105
  • 6
1
vote
0 answers

How to resolve ggpairs error for unused argument?

The following code I have run a number of times without any issue, but recently it is throwing an error message: ggpairs(df_scatterplot, columns = c(2:5, 14), lower = list(continuous = wrap("smooth", method = "lm")), ) The…
Tathagato
  • 348
  • 1
  • 11
1
vote
2 answers

R ggpairs rotate whole matrix

Okay so I'm trying to make a scatterplot matrix with ggpairs (see example below). But I want the whole matrix to be rotated counter-clockwise 90 degrees. And with this, I then want to rotate the axis text. Anytime I try to add any theme() onto…
hsandborn
  • 11
  • 3
1
vote
1 answer

ggpairs, color by group but single regression line

Given the following ggpairs plotting: data(iris) ggpairs(iris[1:4], lower=list( mapping = aes(color=iris$Species), continuous = wrap("points", size=0.7) ) ) Which results in: How can I add single…
r0bt
  • 383
  • 3
  • 12
1
vote
1 answer

ggpairs formatting for points only

I'm looking to increase the size of the points AND outline them in black while keeping the line weight the same across the remaining plots. library(ggplot2) library(GGally) pp <- ggpairs(pp.sed, columns = c(1,2), aes(color=pond.id, alpha = 0.5)) + …
Geomicro
  • 303
  • 3
  • 13
1
vote
0 answers

Change font and text size in ggpairs plot

this is my code for a ggpairs plot: library(ggplot2) library(tidyr) library(GGally) ggpairs(data = Food, mapping = aes(color = "darkorange"), columns = 2:4, upper = "blank", diag = "blank", …
1
vote
1 answer

Adding R^2 and P-value in ggpairs (GGally) composed of LM and GAM scatterplot

i'm new to R and stackoverflow I've been looking for the code to present R^2 and P-value in paired graph particularly for gam (upper) and lm (lower). However, i stuck with this code: library(tidyverse) # plotting and manipulation library(grid) #…
1
vote
0 answers

GGally ggpairs plot, y-axis of the first variable is labelled with wrong values, though x-axis is correct

I did a GGally-ggpairs-plot (see below) with now having the following issue: The y-axis of the first variable PdKeyT is labelled with the incorrect values (yellow), instead should be labelled with values according to its x-axis from minus 25 to plus…
jaysigg
  • 201
  • 1
  • 7
1
vote
1 answer

Remove the loess smooth standard error gray area (or apply alpha to it)

The following code returns the plot below. Is there a way to remove the standard error gray area or apply alpha to it so it's not so saturated? Especially the case where many lines are plotted this can interfere in the visualization.…
Adel
  • 181
  • 2
  • 14
1
vote
1 answer

How to get R^2 with ggpairs?

How to make ggpairs report the upper corner with R^2 instead of correlation? library(GGally) ggpairs(mtcars[c("mpg", "disp", "hp", "drat", "wt", "qsec")])
ju.
  • 1,016
  • 1
  • 13
  • 34