lets-plot-kotlin v4.1.0 Release Notes
Release Date: 2022-09-30 // about 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()
:size, family
(example notebook)hjust, vjust
for plot title, subtitle, caption, legend and axis titles (example notebook)margin
for plot title, subtitle, caption, axis titles and tick labels (example notebook)
Parameter
whiskerWidth
ingeomBoxplot()
.
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 withhjust
0 and 1 [#592].- ๐ Documentation for the
breaks
parameter in scales [#507]
- ๐ New theme:
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
- Plot theme elements were moved to subpackage
๐ Deprecated API:
- Position adjustment constants:
identity, stack, fill, dodge, nudge
andjitterdodge
(defined in thePos
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()
andpositionJitterDodge()
.
- Position adjustment constants:
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.identity
→positionIdentity
Pos.stack
→positionStack
Pos.fill
→positionFill
Pos.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
%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.