const-ae / const-ae/ggupset

Empty sets are counted and are unaffected by 'sets' argument

Open
#38 2 comments 0 reactions 0 assignees View on GitHub
question wontfix
Dominant language
R
Stars
399
Forks
32
PR merge metrics
No merged PRs in 30d

Description

The first example provided with `scale_x_upset()` includes counts for empty sets (3rd bar). I'm can't decide whether this is expected or not but I thought it worth noting in case others come across it and are surprised by it.

``` r
library(ggupset)
library(ggplot2)

ggplot(tidy_movies[1:100, ], aes(x=Genres)) +
geom_bar() +
scale_x_upset(reverse = TRUE, sets=c("Drama", "Action"))
#> Warning: Removed 33 rows containing non-finite values (stat_count).
```

![](https://i.imgur.com/iuNLmrk.png)

Created on 2023-01-06 with [reprex v2.0.2](https://reprex.tidyverse.org)

Contributor guide

No contributing guide indexed for this repository

Research direction

Reproduce the reported example with ggupset and ggplot2 using tidy_movies[1:100, ], scale_x_upset(reverse = TRUE, sets=c("Drama", "Action")), and geom_bar(). Inspect how empty sets and the sets argument are handled; done means the behavior is clarified and the unexpected empty-set counts are corrected or explicitly documented.

Written by the indexing model from the issue text.

Assessment

Tech stack
r
Domain
data-visualization
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
32/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.