JetBrains / lets-plot-kotlin

Grammar of Graphics for Kotlin
https://lets-plot.org/kotlin/
MIT License
419 stars 36 forks source link

scaleColorGradient2 doesn't work #153

Closed AndreiKingsley closed 1 year ago

AndreiKingsley commented 1 year ago

scaleColorGradient2 ignores its first argument.

image image
alshan commented 1 year ago

The "gradient 2" scales work according to the ggplot2 specifications: scale_gradient

In your example you'll have to adjust the "midpoint":

The midpoint (in data value) of the diverging scale. Defaults to 0.

Alternatively, you may want to use scaleColorGradientN() which will compute the midpoint itself.