JetBrains / lets-plot-kotlin

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

Add Jupyter integration(s) #244

Closed ileasile closed 1 week ago

ileasile commented 7 months ago

Problem.

Now we have a bunch of lets-plot integrations in kotlin-jupyter-libraries. Some of them, such as https://github.com/Kotlin/kotlin-jupyter-libraries/blob/master/lets-plot.json, are rather complicated, and at the same time not tested. It's easy to break something when updating the library.

Another problem: lets-plot outputs could be rendered natively in Kotlin Notebook, for that you should just add a spec to the output, like it's done in Kandy. Lets-plot doesn't do that, and it leads to the problems like this: https://youtrack.jetbrains.com/issue/KTNB-171/After-changing-color-scheme-black-light-ggplot-lets-plot-plots-are-rendered-with-black-background

Solution.

Introduce a separate Jupyter module. Place there a Jupyter integration. Example Documentation

After that, lets-plot descriptor(s) could be simplified. Also note that you can add tests for this integration and maintain them ensuring that everything works in the release (and between them)