Feature Request: Upset axis as a guide
- Dominant language
- R
- Stars
- 399
- Forks
- 32
- PR merge metrics
- No merged PRs in 30d
Description
Hi there,
I was trying to make an upset plot when I noticed that the axis inherits the aspect ratio from the global theme in a weird way, reprex below:
``` r
library(ggplot2)
library(tidyverse)
library(ggupset)
theme_set(theme_gray())
theme_update(aspect.ratio = 1)
tidy_movies %>%
distinct(title, year, length, .keep_all=TRUE) %>%
ggplot(aes(x=Genres)) +
geom_bar() +
scale_x_upset(n_intersections = 20)
#> Warning: Removed 100 rows containing non-finite values (stat_count).
```

Created on 2020-06-08 by the [reprex package](https://reprex.tidyverse.org) (v0.3.0)
This could probably be fixed by not having the axis act on a global aspect ratio, but perhaps the nicer way of dealing with this is to implement the axis as a guide instead.
As far as I follow the ggplot2 github, it seems they are planning on a rewrite of the guide system. So, it may not be worth it to implement one now but it might be nice to consider in the future. It will probably make it easier to implement #2 too. I have some understanding of how the guide system works in current ggplot2, so I could try to draft a PR if I can find the time.
Thanks for considering!
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with the reprex using theme_update(aspect.ratio = 1) and scale_x_upset(), then review how the current ggplot2 guide system could support the upset axis. Done would mean deciding on and implementing a guide-based axis that avoids the global aspect-ratio problem and supports the related work in issue #2.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- r
- Domain
- data-visualization
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100