Questions tagged [ggally]

GGally is designed to be a helper to ggplot2. It contains templates for different plots to be combined into a plot matrix, a parallel coordinate plot function, as well as a function for making a network plot.

GGally is designed to be a helper to . It contains templates for different plots to be combined into a plot matrix, a parallel coordinate plot function, as well as a function for making a network plot.

Repositories

Resources

Vignettes

196 questions
4
votes
2 answers

How do I add shading and color to the confidence intervals in ggplot 2 generated Kaplan-Meier plot?

I would like to have the shading of the confidence intervals for the survival estimates. Now I have black lines. library(survival) library(ggplot2) library(GGally) data(lung) sf.sex <- survfit(Surv(time, status) ~ sex, data = lung) pl.sex <-…
FTF
  • 181
  • 3
  • 11
4
votes
1 answer

How to remove axis scale in ggpairs?

I have a matrix of scatterplots and correlations depicted below. I would like to get rid of the x and y axis (0, 5, 10, 15) numbers that are at each position in the diagonal. I would also like to get rid of the word "Corr:", so that only the…
Carmen Sandoval
  • 2,266
  • 5
  • 30
  • 46
4
votes
3 answers

Arranging GGally plots with gridExtra?

I'd like to arrange my ggpairs plots with arrangeGrob: library(GGally) library(gridExtra) df <- structure(list(var1 = 1:5, var2 = 4:8, var3 = 6:10), .Names = c("var1", "var2", "var3"), row.names = c(NA, -5L), class = "data.frame") p1 <-…
erc
  • 10,113
  • 11
  • 57
  • 88
3
votes
1 answer

GGally: extract data from a plot

I'd like to make a data frame that contains the summarized data (Variables and correlation values) used to generate the ggplot from GGally above. library(ggplot2) library(GGally) data(flea) p <- ggpairs(flea, columns = 2:4) p.2.df <-…
Leprechault
  • 1,531
  • 12
  • 28
3
votes
2 answers

How to display coloured group correlations with scale_colour_manual in ggpairs (R)?

I'm using ggpairs for data with 3 groups. The problem is that not all variables have all groups and therefore, some correlations only need to show 2 groups. Because of the automatic alphabetical ordering of the groups by ggpairs, the colouring is…
lvdb
  • 41
  • 4
3
votes
1 answer

how to define facet axis limits in ggpairs function

Having a ggpairs function, how would one limit range of lower facets to e.g. 0.5 for x and y? library(GGally) xy <- data.frame(matrix(runif(4 * 1000), ncol = 4)) ggpairs(xy)
Roman Luštrik
  • 69,533
  • 24
  • 154
  • 197
3
votes
1 answer

Creating multiple ggplots with dplyr

After creating a plot matrix using GGally::ggpairs(), I would like to store the individual scatter plots for later use. Here is my current code: # load necessary package library(GGally) # loads `ggplot2` library(magrittr) # allows for the use of…
samvoit4
  • 295
  • 2
  • 8
3
votes
0 answers

How to get a single Interactive Correlation scatterplot matrix triangle with R ggpairs and plotly

I am attempting to get an interactive scatterplot matrix for ~5 variables I am interested in seeing how the observations of each correlate with each other, and to spot and identify outliers. The problem is that plotly is behaving unpredictably, in…
andemexoax
  • 323
  • 3
  • 15
3
votes
1 answer

Change diagonal plots in ggpairs

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 =…
Ben
  • 1,432
  • 4
  • 20
  • 43
3
votes
0 answers

GGally::ggpairs - show axes and variable labels

I'm trying to create a matrix plot using GGally::ggpairs that just has scatterplots in the upper portion of the figure: library(ggplot2) library(GGally) data(iris) ggpairs(iris, columns = 1:4, diag = "blank", upper = list(continuous =…
Lucy Wheeler
  • 271
  • 3
  • 17
3
votes
1 answer

Adjust group text aesthetics in ggpairs()

I am using ggpairs() to create scatterplots and correlations for a set of variables. The text on my correlation plots don't fit onto the plot area, as they are horizontally adjusted to end halfway through the plot. I saw on another post how to…
3
votes
0 answers

How can I get ggpairs to display ancova results in upper panels?

I'm making a scatterplot matrix with ggpairs{GGally) as follows, but I'd like to display the p values for each term in my aov results in the upper panels, rather than just the overall and by-species correlation value that comes with the package. How…
3
votes
0 answers

ggpairs change axisLabel font size

When plotting internal axisLabels for ggpairs, if numbers are large, they get cropped off. fakedata <- data.frame(Var1=rnorm(500, 3, 6), Var2=runif(500, 0, 5500), Var3=rpois(500, 6), …
emudrak
  • 789
  • 8
  • 25
3
votes
1 answer

ggpairs fill histograms with white

I would like to get the histograms or bar line in the following plot in white. It's mainly for ink saving concerns. library(GGally) library(ggplot2) data(tips, package = "reshape") pm <- ggpairs(tips[,1:3]) I've tried pm + theme(panel.background =…
DJJ
  • 2,481
  • 2
  • 28
  • 53
3
votes
1 answer

Error in GGally - Make sure your 'columns' values are less than 5

I'm trying to plot the iris dataset using the GGally package > library(GGally) > ggpairs(iris, columns=c("Sepal.Length", "Sepal.Width", "Petal.Length", "Petal.Width"), colour='Species', lower=list(continuous='points'), axisLabels='none',…
Anthony
  • 33,838
  • 42
  • 169
  • 278