ggupset icon indicating copy to clipboard operation
ggupset copied to clipboard

Manual label order in combmatrix

Open Rekyt opened this issue 3 years ago • 3 comments

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? InkedRplot_LI

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!

Rekyt avatar Dec 09 '20 15:12 Rekyt

Hi Matthias,

thanks for the thoughtful issue. What you suggest sounds like a useful feature. However I am afraid, that I don't have the capacity to implement this myself. But I would be happy to accept and review a pull request.

Best, Constantin

const-ae avatar Dec 09 '20 16:12 const-ae

Hi Constantin, Thank you for your very quick answer. I'll try proposing a PR if I can wrap my head around a good solution.

Rekyt avatar Dec 09 '20 16:12 Rekyt

Thanks. If you have any question, feel free to ask :)

const-ae avatar Dec 09 '20 16:12 const-ae