Questions tagged [ggpairs]

71 questions
6
votes
1 answer

Correlation values in pairplot()

Is there a way to show pair-correlation values with seaborn.pairplot(), as in the example below (created with ggpairs() in R)? I can make the plots using the attached code, but cannot add the correlations. Thanks import numpy as np import seaborn as…
Manojit
  • 611
  • 1
  • 8
  • 18
4
votes
1 answer

Is there is an equivalent of R's GGally::ggpairs function in python?

GGally::ggpairs function provides support for both numeric and categorical datatypes, making it possible to see the interactions between all variables in one place, in a few lines of code but with high flexibility. Here is an example : cols =…
abdelgha4
  • 351
  • 1
  • 16
4
votes
1 answer

ggpairs plot with heatmap of correlation values with significance stars and custom theme

I would like to create a correlation plot with ggPairs() which should contain a heat map of correlation values (as in this SO question) significance stars for the correlation (as in this SO question) font type and font size according to a custom…
mavericks
  • 1,005
  • 17
  • 42
4
votes
1 answer

Removing background color for column labels while keeping plot background color ggpairs

I have defined a function to set the background in ggpairs to match the level of correlation between two variables. However, I would also like to remove the gray background from the variable labels running along the outside of the plot, but I'm not…
humperderp
  • 241
  • 1
  • 11
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
2
votes
1 answer

ggpairs labels on bar plots

I am wondering if there is a way to add labels on top of bar plots and grouped bar plots in ggpairs, library(GGally) data(diamonds, package="ggplot2") diamonds.samp <- diamonds[sample(1:dim(diamonds)[1], 1000), ] pm <- ggpairs( …
2
votes
1 answer

Customize ggpairs output and avoid the 'wrap' the function to supply argument

I'm using the crab data set from MASS library in R Studio. I want to create a scatterplot matrix of the five quantitative variables and an interaction variable of sp.sex as the only categorical variable using ggpairs. I have reordered the factor…
data_life
  • 387
  • 1
  • 11
2
votes
2 answers

ggpairs change axis label font size

I have a dataset with relatively large column names. When displaying the ggpairs, they fall outside of the limit, and one cannot read the each plot labels. I have tried theme(axis.text = element_text(size=8)) inside the ggpairs() command, but it…
SteveMcManaman
  • 391
  • 1
  • 17
2
votes
1 answer

R ggpairs change the colour of bar histograms on diagonal

I would like to change the colour of the bars of the histogram on a pairs plot whereby I have a different colour for each variable. It appears I can change the colour of ALL diagonal histograms by changing the 'fill =' option to a new colour but…
Markm0705
  • 1,340
  • 1
  • 13
  • 31
2
votes
2 answers

Custom legend in ggpairs disappears after changing theme

I am having problems with a vanishing legend in ggpairs. I add a legend inside the top part of a lower triangular ggpairs plot as follows. First I create a ggpairs plot without legend then I strip the legend I want from and ad hoc graph and place in…
Sergio_A
  • 21
  • 4
2
votes
4 answers

Make a list of python pairs of two columns from dataframe in python

I have pandas dataframe df_1 = pd.DataFrame({'x' : [a, b, c, d], 'y' : [e, f, g, h]}) I need to get from string like…
2
votes
1 answer

Change axis labels of a modified ggpairs plot (heatmap of correlation)

I wanted to combine a ggpairs plot with a heatmap and found a wonderful solution: ggpairs plot with heatmap of correlation values #library library(GGally) library(ggplot2) #data sample_df <-…
ava
  • 840
  • 5
  • 19
2
votes
1 answer

Receiving an error trying to use ggsave after ggpairs

I created a correlation plot: library(nycflights13) ggpairs(flights) + ggsave(filename = paste("overall_corr_plot.png"), path = paste(getwd(), "/images", sep = "")) This gives me an error: Error in `+.gg`(ggpairs(flights), ggsave(filename =…
SomeDutchGuy
  • 2,249
  • 4
  • 16
  • 42
2
votes
0 answers

I get Error in installing tidyverse package

I tried different ways to install tidyverse package, but it shows this error Error: package or namespace load failed for ‘tidyverse’ in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]): namespace ‘vctrs’ 0.2.0 is already…
Apex
  • 1,055
  • 4
  • 22
1
2 3 4 5