Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Misleading layout with logical variables #460

Open
dlindelof opened this issue Jan 12, 2023 · 2 comments
Open

Misleading layout with logical variables #460

dlindelof opened this issue Jan 12, 2023 · 2 comments

Comments

@dlindelof
Copy link

I believe that when dealing with logical variables, the order in which plots are laid out is sometimes incorrect making them difficult to read.

Consider the example given in the ggpairs documentation. When I change the time to be logical, notice how the left-middle plot inverses the order of the plots and is not consistent with the right-middle plot.

library(GGally)
#> Loading required package: ggplot2
#> Registered S3 method overwritten by 'GGally':
#>   method from   
#>   +.gg   ggplot2
library(tidyverse)

data(tips, package = "reshape")

ggpairs(tips, columns = c(1, 6, 2))
#> `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.
#> `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.

tips2 <- tips %>% mutate(time = time == 'Dinner')

ggpairs(tips2, columns = c(1, 6, 2))
#> `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.
#> `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.

Created on 2023-01-12 by the reprex package (v2.0.1)

@schloerke
Copy link
Member

Thank you for the great reprex!

schloerke added a commit that referenced this issue Nov 20, 2023
@schloerke
Copy link
Member

Fixed version
Screenshot 2023-11-20 at 4 04 51 PM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants