JetBrains / JetBrains/lets-plot
Revise the scales for sizes of points
- Dominant language
- Kotlin
- Stars
- 1.8k
- Forks
- 60
- PR merge metrics
- No merged PRs in 30d
Description
`scale_size()` should scale the area of a point, not it's radius.
For example,
```python
data = {
'x': [1, 2, 3, 4],
'y': [0, 0, 0, 0],
'size': [0, 2, 4, 32]
}
ggplot(data, aes('x', 'y')) + geom_point(aes(size='size')) + scale_size(range=[1, 20])
```
gives
but I expect more smooth transition of a size:
This should result in a better perception of point sizes. And this is how it works [in ggplot2](https://ggplot2.tidyverse.org/reference/scale_size.html).
The same should be done for the functions `scale_size_area()` and `scale_size_identity()`.
The current way of scaling (size to radius) should be moved to the new function, `scale_radius()`.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.