JetBrains / lets-plot-kotlin

Grammar of Graphics for Kotlin
https://lets-plot.org/kotlin/
MIT License
422 stars 36 forks source link

Group by multiple columns #136

Open AndreiKingsley opened 1 year ago

AndreiKingsley commented 1 year ago

Is it possible to make a group by several columns (without mappings to other aesthetics)? For example like this: group = listOf("col1", "col2")

alshan commented 1 year ago

No, collection of column names is not supported as a value of aesthetic. It must be either a name or a collection of values (data).

alshan commented 1 year ago

Just stumbled upon the "interaction" fun in R: group = interaction(dir, grp)

https://stackoverflow.com/questions/50604055/ggplot2-geom-bar-position-failure