v4.0.0
[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.letsPlotto 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
- Plot theme elements were moved to subpackage
- Deprecated API:
- Position adjustment constants:
identity, stack, fill, dodge, nudgeandjitterdodge(defined in thePosobject),
are now deprecated in favor of the correspondent top level elements defined in the (new)org.jetbrains.letsPlot.pospackage:
positionIdentity, positionStack, positionFill, positionDodge(), positionNudge()andpositionJitterDodge().
- Position adjustment constants:
Migrating to 4.0.0
In Kotlin project
- Update all
importstatements: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 WARNINGand 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
deprecatedPos.abcexpressions with their new equivalents:Pos.identity→positionIdentityPos.stack→positionStackPos.fill→positionFillPos.dodge→positionDodge()Pos.nudge→positionNudge()Pos.jitterdodge→positionJitterDodge()
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
%useLatestDescriptorsline magic- Make sure you are using Kotlin Jupyter Kernel version 0.11.0.95 (or earlier), which bundles a previous version of Lets-Plot.