Manual label order in combmatrix
- Dominant language
- R
- Stars
- 399
- Forks
- 32
- PR merge metrics
- No merged PRs in 30d
Description
Hi @const-ae 👋 ,
Thank you so much for the `ggupset` package, I think it really helps to visualize categorical data!
I've looked at previous issues and couldn't find an answer to my question:
Is there an easy way to set the order of the y axis in the combmatrix?

It seems that changing factor levels doesn't affect at all the row orders of the comb matrix. I thought it was only due to ordering by frequency but it does not seem to be only driven by frequency. From what I understood looking at the code the order is set at these lines: https://github.com/const-ae/ggupset/blob/d379fb55cebdf95e8becd8c19dc5555c0e58a487/R/axis_combmatrix.R#L181-L182
Would it be possible to have the user provide a custom order in place of the one created in `labels_split`?
Thanks again for the great package!
Contributor guide
No contributing guide indexed for this repository
Research direction
Start in R/axis_combmatrix.R at lines 181–182 and inspect how labels_split determines the combination-matrix row order. Reproduce the factor-level behavior described in the issue, then trace the surrounding ordering logic to identify where a user-provided order could be accepted. Done means a custom order controls the y-axis rows without breaking the existing default ordering behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- r
- Domain
- data-visualization
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100