Closed corybrunson closed 4 years ago
A crucial decision is what options should be available to the user for how the ordering of lodes should respect aesthetic variables. The current plan is to allow three options:
alluvium
, i.e. the case ID (which will be taken to be the minimum case ID if cases are aggregated)aes.bind = FALSE
)aes.bind = TRUE
)The primary reason for ignoring aesthetics by default is that multiple layers will need to be passed the same aesthetics in order to produce the same orderings. By default, then, multiple layers using the same stat will plot lodes in the same order.
Resolved by f3c6a5c46ce371de923b1c5126e43177811fa982 through 27cca5cba3aa8f7b6e24844178e41494be35266a.
Description of the issue
Currently, aesthetics are aggregated in
stat_stratum()
by the unexported helper functionauto_aggregate()
and in the otherstat_*()
s in other ways. The functions take numeric versus character labels into account differently:stat_stratum()
via the unexported functionagg_fn()
called byauto_aggregate()
stat_flow()
inline assum_cols <- c("y", if (is.numeric(data$label)) "label")
stat_alluvium()
via the unexported functionaggregate_along()
, which evidently causes an infinite loop in at least some couplings withgeom_text()
Perhaps as part of a broader standardization effort, these aggregation schemes should be standardized in as modular a way as possible.Reproducible example (preferably using
reprex::reprex()
)Here are some examples:
Created on 2019-10-02 by the reprex package (v0.3.0)
And here are some examples that appear to result in infinite loops: