JetBrains / JetBrains/lets-plot

Using range in scales

Open
#299 0 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Kotlin
Stars
1.8k
Forks
60
PR merge metrics
No merged PRs in 30d

Description

If I need to specify `breaks` parameter in `scale_***()`, I have to transform my values into `list`. Generators are not available, even the simple `range`:

```python
import numpy as np

from lets_plot import *
LetsPlot.setup_html()

np.random.seed(42)

data = {'rating': np.round(np.random.normal(loc=7, scale=1, size=100), 1)}

ggplot(data) + \
geom_histogram(aes(x='rating'), binwidth=.25, center=0) + \
scale_x_continuous(breaks=range(1, 11))
```

Here I got an exception: `Not a List: breaks: String`.

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.