JetBrains / JetBrains/lets-plot
The 'labels' parameter shouldn't affect custom ordering
Open
- Dominant language
- Kotlin
- Stars
- 1.8k
- Forks
- 60
- PR merge metrics
- No merged PRs in 30d
Description
Example:
```python
data = {
'g': ['b', 'a', 'a', 'a', 'c', 'c'],
}
labels = {'a': 'A', 'b': 'B', 'c': 'C'}
ggplot(data) + \
geom_bar(aes(x=as_discrete('g', order_by='..count..'))) + \
scale_x_discrete(labels=labels)
```
Output:
Expected output:
So, I expected ordering as in `as_discrete()`, but got ordering as in the dictionary. Moreover, my expectations coincide with the way it is done in ggplot2 (there you can make a similar example, but with `forcats::fct_infreq()` instead of `as_discrete()`).
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.