JetBrains / JetBrains/lets-plot

Duplicated legend labels are not allowed

Open
#1,129 0 comments 0 reactions 1 assignee Claimed by @MKoroteev-HORIS View on GitHub
Dominant language
Kotlin
Stars
1.8k
Forks
60
PR merge metrics
No merged PRs in 30d

Description

Legend labels are merged by name. Example:

```
data = pd.DataFrame({
'category': ['A', 'B', 'C', 'D'],
'value': [10, 15, 20, 25]
})

ggplot(data) + \
geom_point(aes(x='category', y='value', color='category')) + \
scale_color_manual(values=['red', 'blue', 'green', 'black'], labels=['Label A', 'Label B', 'Label A', 'Label D'])
```

Output:
![2024-07-16 21_08_40-Untitled2 ipynb (9) - JupyterLab — Mozilla Firefox](https://github.com/user-attachments/assets/ad7d1199-ceb2-4a81-98cb-bdbf3c4e7fdb)

Expected:
![2024-07-16 21_09_18-Untitled2 ipynb (9) - JupyterLab — Mozilla Firefox](https://github.com/user-attachments/assets/bf19b9a6-a235-41e6-b643-32d210fe2200)

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.