JetBrains / lets-plot-kotlin

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

Creating a custom palette #128

Closed Kernald closed 1 year ago

Kernald commented 1 year ago

ggplot seems to have a (convoluted...) way to define custom palettes (e.g. here). As far as I understand, there's no similar facility exposed in Let's Plot?

alshan commented 1 year ago

Hi @Kernald, There are scaleColorGradientN(), scaleFillGradientN() functions where you can use a custom color palette to create continuous or discrete color scale.

scaleColorManual(), scaleFillManual() are also can be used for this purpose but rather for discrete scales.

Kernald commented 1 year ago

Thanks, that's exactly what I was looking for! Sorry for the noise :-)