arrange strata to minimize flow overlaps · Issue #6 · corybrunson/ggalluvial (original) (raw)
For cases in which the strata have no intrinsic order, an option should be available to arrange the strata at each axis, perhaps even using different orders at different axes when the strata are repeated (maybe this should be allowed or not according to an additional parameter), in a way that minimizes the number of flow overlaps. The majors
example in the vignette is a good candidate for such an option.
A heuristic algorithm should suffice, and the concept is general enough that it might already be in use somewhere. I won't have time to write one for a while, and it might be worth writing in C and calling via Rcpp
.