You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think I have a similar problem and it seems to happen based on what you plot first. There can be identical graphs with mismatched axes. The graph for the column of var3 and row var2 are the same, but their axes are reversed. This seems to be due to a conflict between count and dot_no_facet's axes plotting and which one comes first.
EDIT The individual graph is correct, it's just that when the graphs are put together that the scales no longer make sense. I've updated my reprex.
library(GGally)
#> Warning: package 'GGally' was built under R version 4.1.3#> Loading required package: ggplot2#> Registered S3 method overwritten by 'GGally':#> method from #> +.gg ggplot2df<-data.frame(var1= runif(100, min=40, max=180),
var2= rpois(100, lambda=4))
df$var3<- abs(20-df$var2) |>factor()
df$var2<-factor(df$var2)
# Show how the axes aren't quite right.
paste("The graph for the column of var3 and row var2 are the same, but their axes are reversed. This seems to be due to a conflict between count and dot_no_facet's axes plotting and which one comes first")
#> [1] "The graph for the column of var3 and row var2 are the same, but their axes are reversed. This seems to be due to a conflict between count and dot_no_facet's axes plotting and which one comes first"reversedY<-ggpairs(
data=df,
lower=list(discrete="count", combo="dot_no_facet"),
columns= c(1,3,2),
title="reversed Y"
)
reversedY
paste("reversedY[3,2] and normalY[3,1] are identical, but when the entire plot is made, it's incorrect")
#> [1] "reversedY[3,2] and normalY[3,1] are identical, but when the entire plot is made, it's incorrect"
The rows of discrete count plots above the diagonal appear switched compared to their labels when using ggpairs with internal axis labels.
The text was updated successfully, but these errors were encountered: