Skip to content

v4.0.0

Compare
Choose a tag to compare
@alshan alshan released this 25 Jul 22:07
· 409 commits to master since this release

[4.0.0] - 2022-07-25

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 0.11.0.95 (or earlier), which bundles a previous version of Lets-Plot.