JetBrains / lets-plot

Multiplatform plotting library based on the Grammar of Graphics
https://lets-plot.org
MIT License
1.57k stars 51 forks source link

Custom scale transformations #1008

Open orausch opened 9 months ago

orausch commented 9 months ago

I'd like to be able to make a custom scale. My particular use-case is transforming unit magnitudes, for example, by having a scale that multiplies values by 1e6.

In plotnine, custom transformations are supported via arbitrary lambdas / python expressions, but I realize that's tricky given your backend. Maybe an affine transformation (similar to how scale_._continuous's expand parameter works) could be good?

alshan commented 9 months ago

Maybe we could add support for a limited set of transformation expressions. Could you describe your use-case?