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
20
votes
4 answers

How to use loess method in GGally::ggpairs using wrap function

I am trying to replicate this simple example given in the Coursera R Regression Models course: require(datasets) data(swiss) require(GGally) require(ggplot2) ggpairs(swiss, lower = list(continuous = "smooth", params = c(method = "loess"))) I expect…
meenaparam
  • 1,949
  • 2
  • 17
  • 29
20
votes
2 answers

Set alpha and remove black outline of density plots in ggpairs

Consider this example: data(tips, package = "reshape") library(GGally) pm <- ggpairs(tips, mapping = aes(color = sex), columns = c("total_bill", "time", "tip")) pm How do I make the density plots more transparent and remove the black lines? The…
spore234
  • 3,550
  • 6
  • 50
  • 76
17
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
  • 17,740
  • 16
  • 106
  • 167
17
votes
1 answer

GGally::ggpairs plot without gridlines when plotting correlation coefficient

GGally::ggpairs plots nice graphs like following one. Only thing I seek to refine it even more is to remove all gridlines in upper part of plot, where is correlation coefficient. An maybe also draw rectangle around each upper…
gutompf
  • 1,305
  • 3
  • 11
  • 9
14
votes
1 answer

use ggpairs to create this plot

I have some code in a Shiny app that produces the first plot below. As you can see the font size varies with the size of the correlation coefficient. I would like to produce something similar with ggpairs (GGally) or ggplot2. The second image below…
Vincent
  • 5,063
  • 3
  • 28
  • 39
13
votes
2 answers

ggpairs plot with heatmap of correlation values

My question is twofold; I have a ggpairs plot with the default upper = list(continuous = cor) and I would like to colour the tiles by correlation values (exactly like what ggcorr does). I have this: I would like the correlation values of the plot…
MadiN
  • 195
  • 4
  • 10
13
votes
3 answers

How to set same scales across different facets with ggpairs()

I have the following dataset and codes to construct the 2d density contour plot for each pair of variables in the data frame. My question is whether there is a way in ggpairs() to make sure that the scales are the same for different pairs of…
Crystal
  • 599
  • 1
  • 6
  • 16
13
votes
2 answers

How to add an external legend to ggpairs()?

I am plotting a scatterplot matrix using ggpairs. I am using the following code: # Load required packages require(GGally) # Load datasets data(state) df <- data.frame(state.x77, State = state.name, Abbrev =…
Patthebug
  • 4,647
  • 11
  • 50
  • 91
11
votes
1 answer

How to plot parallel coordinates with multiple categorical variables in R

I am facing a difficulty while plotting a parallel coordinates plot using the ggparcoord from the GGally package. As there are two categorical variables, what I want to show in the visualisation is like the image below. I've found that in…
Lexi
  • 111
  • 1
  • 2
  • 5
11
votes
2 answers

Adding to a list object in a mapping function in R

I am creating a scatter plot matrix using GGally::ggpairs. I am using a custom function (below called my_fn) to create the bottom-left non-diagonal subplots. In the process of calling that custom function, there is information about each of these…
user2808302
11
votes
3 answers

Suppress ggpairs messages when generating plot

ggpairs prints out a progress bar and estimated remaining time while generating plots, which is nice when used interactively since some of the computations can take a few seconds. But when making documents, like R notebooks, these printed messages…
adatum
  • 655
  • 9
  • 23
10
votes
1 answer

How to include density coloring in pairwise correlation scatter plot

I have the following code: library(GGally) library(nycflights13) library(tidyverse) dat <- nycflights13::flights %>% select(dep_time, sched_dep_time, dep_delay, arr_time, sched_arr_time, arr_delay) %>% …
pdubois
  • 7,640
  • 21
  • 70
  • 99
10
votes
1 answer

How to save an object through GGally in R

I have a pretty dumb question to ask everyone. I am using ggpairs under GGally to create a correlation matrix, and somehow I found that GGally did not provide a saving function as ggplot2 did. The function ggsave did not work for a non-ggplot2…
Xinting WANG
  • 1,905
  • 2
  • 15
  • 20
10
votes
1 answer

Add or override aes in the existing mapping object

Here's the minimal case: df <- data.frame(x=1:5, y=1, col=1:5) mapping <- aes(x=x, y=y) ggplot(df, mapping) + geom_point(size=10) Now I want to add (or overwrite) another aesthetic (colour) to the existing mapping object. The desired plot is…
tonytonov
  • 25,060
  • 16
  • 82
  • 98
10
votes
1 answer

GGally - unexpected behavior with ggpairs(..., diag = list( continuous = 'density'))

I am trying to generate a scatterplot matrix with density plots in the diagonals (using ggplot, preferably). The documentation for ggpairs in the GGally package states: diag is a list that may only contain the variables 'continuous' and …
jlhoward
  • 58,004
  • 7
  • 97
  • 140
1
2 3
13 14