lets-plot-kotlin v4.0.0 Release Notes

Release Date: 2022-07-25 // almost 2 years ago
  • ๐Ÿ’ฅ BREAKING CHANGES: Due to refactorings performed in the source code, the v4.0.0 is no longer backward compatible with earlier versions of the Lets-Plot Kotlin API.

    ๐Ÿ”„ Changed

    • ๐Ÿšš All previously deprecated API were removed.

    • The prefix "org" was added to all package names in the project.

    • ๐Ÿ“ฆ Some API elements were moved from package org.jetbrains.letsPlot to a more specific subpackages:

      • Plot theme elements were moved to subpackage themes
      • Coordinate system functions were moved to subpackage coord
      • Position adjustment functions were moved to subpackage pos
    • ๐Ÿ—„ Deprecated API:

      • Position adjustment constants: identity, stack, fill, dodge, nudge and jitterdodge (defined in the Pos object), are now deprecated in favor of the correspondent top level elements defined in the (new) org.jetbrains.letsPlot.pos package: positionIdentity, positionStack, positionFill, positionDodge(), positionNudge() and positionJitterDodge().

    Migrating to 4.0.0

    In Kotlin project

    • โšก๏ธ Update all import statements: import jetbrains.letsPlot..import org.jetbrains.letsPlot..
    • โšก๏ธ In all places in your project where the code needs to be updated, IntelliJ will show you a deprecation WARNING and will offer to fix this automatically.

    In Jupyter notebook

    • As soon as you start using 4.0.0 in you notebook, the only thing you will want to do is to manually replace all deprecated Pos.abc expressions with their new equivalents:
      • Pos.identitypositionIdentity
      • Pos.stackpositionStack
      • Pos.fillpositionFill
      • Pos.dodgepositionDodge()
      • Pos.nudgepositionNudge()
      • Pos.jitterdodgepositionJitterDodge()

    NOTE: If your notebook also uses another Kotlin library which depends on an older version of Lets-Plot, then the classloader may refuse to load classes from both libraries. If this is the case, then you will want to do NOT update your notebook to Lets-Plot v4.0.0 as yet: โœ… > - Make sure your notebook is not using the %useLatestDescriptors line magic

    • Make sure you are using Kotlin Jupyter Kernel version (or earlier), which bundles a previous version of Lets-Plot.