JetBrains / JetBrains/lets-plot

Continuous scale fails if the scale limits are outside of the range of the data

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

Description

```
data=dict(
x = [i for i in range(0, 6)],
c = [i for i in range(0, 6)]
)

ggplot(data)\
+ geom_point(aes(x = "x", color="c"), size=20) \
```

1. Lower limit is inside the range of the data [0..5]

```
+ scale_color_continuous(limits=[4, 10])
```
![image](https://user-images.githubusercontent.com/4430922/234415825-0ebf8bb4-1423-4f07-9fc8-1898d05978fa.png)

2. Lower limit >= the max of the data
```
+ scale_color_continuous(limits=[5, 10])
```
> Internal error: IllegalStateException : [ContinuousTransformWithLimits] Lower end 4.5 is outside of transform's domain.

3. Upper limit is inside of the range of the data
```
+ scale_color_continuous(limits=[-1, 1])
```
![image](https://user-images.githubusercontent.com/4430922/234416239-314cc18c-6524-4481-9312-3ae2b7016b5d.png)

4. Upper limit <= the min of the data
```
+ scale_color_continuous(limits=[-1, 0])
```
> Internal error: IllegalStateException : [ContinuousTransformWithLimits] Upper end 0.5 is outside of transform's domain.

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.