lets-plot-kotlin v4.1.0 Release Notes

Release Date: 2022-09-30 // over 1 year ago
  • โž• Added

    • ๐Ÿ†• New theme: themeBW().

    See: example notebook.

    • Color schemes (flavors) applicable to existing themes:
      • flavorDarcula()
      • flavorSolarizedLight()
      • flavorSolarizedDark()
      • flavorHighContrastLight()
      • flavorHighContrastDark()

    See: example notebook.

    • Viridis color scales: scaleColorViridis(), scaleFillViridis().

    See: example notebook.

    • ๐Ÿ†• New parameters in theme's elementText():

    • Parameter whiskerWidth in geomBoxplot().

    See: example notebook.

    • ๐Ÿ†• New geometry geomLabel().

    See: example notebook.

    ๐Ÿ”„ Changed

    • ๐Ÿ†• New tooltip style after applying coordFlip() [#580].

    See: example notebook.

    ๐Ÿ›  Fixed

    • Density and area geoms: preserve the z-order when grouping [#552].
    • 0๏ธโƒฃ Boxplot, violin, crossbar: position dodge width=0.95 should be used by default [#553].
    • Unclear size unit of width [#589].
    • No tooltips for geomBoxplot with zero height [#563].
    • geomText: wrong label alignment with hjust 0 and 1 [#592].
    • ๐Ÿ“š Documentation for the breaks parameter in scales [#507]

Previous changes from v4.0.0

  • ๐Ÿ’ฅ 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.