Grammar of Graphics for Kotlin
This release is 100% compatible with Lets-Plot v 4.3.1.
Parameter labWidth
in facetWrap()
and xLabWidth/yLabWidth
in facetGrid()
[LPK-237].
See: example notebook.
Parameter linetype
in elementLine()
and elementRect()
in theme()
[LPK-235].
See: example notebook.
Parameter arrow
in geomSpoke()
[#986].
See: example notebook.
Parameter sizeUnit
in geomPoint()
, geomText()
and geomLabel()
.
See: example notebook.
Auto-detection of orientation="y"
in bar-chart etc. [#558].
See: example notebook.
Parameter plotInset
in theme()
.
See: example notebook.
LetsPlot.theme
global property now accepts a sum of theme/flavor features [#657].geom_curve()
[#1053].scale_x_reverse()/scale_y_reverse()
[#1057].scale_x_reverse()/scale_y_reverse()
[#1058].linetype
parameter in elementLine()
and elementRect()
[LPK-235].coordPolar()
The polar coordinate system is most commonly used for pie charts, but
it can also be used for constructing Spider or Radar charts using the flat
option.
See: example notebook.
In the theme()
function:
panelInset
parameter - primarily used for plots with polar coordinates.
See: example notebook.
panelBorderOntop
parameter - enables the drawing of panel border on top of the plot geoms.
panelGridOntop, panelGridOntopX, panelGridOntopY
parameters - enable the drawing of grid lines on top of the plot geoms.
geomCurve()
See: example notebook.
[UNIQUE] Visualizing graph-like data with geomSegment()
and geomCurve()
.
Aesthetics sizeStart, sizeEnd, strokeStart
and strokeEnd
enable better alignment of
segments/curves with nodes of the graph by considering the size of the nodes.
The spacer
parameter allows for additional manual fine-tuning.
See: example notebook.
alphaStroke
parameter in geomLabel()
to enable the applying of alpha
to color
[#1029].
See: example notebook.
axisOntop
in theme()
is now true
by default.geomCrossbar()
optional [LPK-233].null
for coord limit [#486].The levels
parameter in asDiscrete()
function [#931].
See: example notebook.
Support for superscript for numbers in scientific notation [#743].
See: example notebook.
Sharing of X,Y-scale limits between subplots in gggrid()
[#718].
See: example notebook.
geomSpoke()
[#738].
See: example notebook.
scaleXLog2(), scaleYLog2()
[#922].
New variables computed by 'count'
and 'count2d'
statistics: '..sumprop..'
, '..sumpct..'
[#936].
See: example notebook.
Support using dictionaries for breaks/labels/values customization in scaleXxx()
functions [#169], [#882].
See: example notebook.
The lablim
parameter for scaleXxx()
functions [#939, #946].
See: example notebook.
labelText
parameter in theme()
for annotation text settings [#930].
See: example notebook.
[BREAKING] Function margin()
is deprecated and will be removed in future releases.
Please replace all existing usages, i.e. theme(plotMargin=margin(..))
and elementText(margin=margin(..))
with a list or with just a number:
See: example notebook.
Geotools: migrate to v30 [#217].
[BREAKING] GeoTools v30 and up is not backward compatible with v29 and below due to
renaming of all "org.opengis" packages into "org.geotools.api" ones.
See release notes: http://geotoolsnews.blogspot.com/2023/09/geotools-30-rc-released.html
Upgraded Apache Batik to version 1.17 [#887]
gggrid()
doesn't use global theme settings.g
format doesn't use e-notation for small numbers [#965].geom_segment()
with position adjustment [#963].geomBoxplot()
: use outlierAlpha
to boxplot outliers (not apply alpha
).Annotations in Barchart.
See: example notebook.
Common theme support in subplots (i.e. gggrid()
) [LPK-#197].
See: example notebook.
HCL
and CIELAB
color space for hue color scale and gradient color scales [#876].
See: example notebook.
New scale transformations: 'log2'
and 'symlog'
.
See: example notebook.
plotMargin
parameter in theme()
[#856].
See: example notebook.
Dual orientation for geometries:
geomErrorBar()
;geomCrossbar()
;geomPointRange()
;geomLineRange()
;geomRibbon()
.See: example notebook.
plot_margin
parameter in theme()
[#856].element_blank()
has no effect on plot title/subtitle/caption in theme()
[#913].geomCount()
/statSum()
[#821].plotMessage
parameter in theme(...)
[#863].If layer transparency is set via the alpha-channel in the colors RGBA specification and via the alpha
aesthetic,
then the alpha
aesthetic overrides the alpha-channel in the color. Previousely it was the opposite.
geomPie()
defaults:
strokeSide="both"
(was strokeSide="outer"
).strokeSide = "both"/"inner"
(was created automatically).geomBar()
now has solid outline color by default (was transparent).
geomTile()
, geomBin2D()
now have solid outline color by default (was transparent).
size
is 0 (i.e. tiles outline initially is not visible).[DEPRECATED] Function statCount2d
has been renamed to statCount2D
. The old name is deprecated.
Flavor-aware colors: pen, brush and paper
geom
parameter allows redefinition of "geom colors": theme(geom = elementGeom(pen, brush, paper))
.See: example notebook.
Support for variadic line width and/or color in geom_line()
and geom_path()
[LP-313].
Ses: example notebook.
themeVoid()
:
example notebook
statECDF()
:
example notebook.
geomFunction()
:
example notebook.
statSummary()
:
example notebook.
statSummaryBin()
:
example notebook.
Stat.sum()
statistic:
example notebook.
Stat.boxplotOutlier()
statistic:
example notebook.
In tooltip customization API:
disableSplitting()
function [#189].
In geomPie()
:
stroke
and color
aesthetics - the width and color of pie sector arcs.strokeSide
parameter - which arcs to show (inner, outer, both).spacerWidth
and spacerColor
parameters - lines between sectors.See: example notebook.
sizeUnit
parameter : example notebook.Note: Due to major package refactoring in the main Lets-Plot library, this version (4.4.2) of the Kotlin API
is not compatible with versions of Lets-Plot library v3.2.0 and earlier.
The default qualitative color palette is now Color Brewer "Set1" (was "Set2")
Geometries default colors are now flavor-dependent: example notebook.
Geometries default size/line-width is now slightly bigger.
Point size is adjusted to match the width of a line of the same "size".
[BREAKING] Kotlin/JS LEGACY apps are no longer supported.
[BREAKING] geomPie()
no longer supports parameter strokeColor
.
[BREAKING] geomBoxplot()
no longer support parameter sampling
.
[BREAKING] geomPointRange()
: size aesthetic shouldn't affect line width [#751]:
linewidth
aesthetic is now used for the line width, size
- for mid-point size only.
geomBoxplot()
: size
and stroke
parameters now affect outlier shapes.
geomCrossbar()
aesthetics take middle
argument instead of y
[#804].geomBoxplot()
doesn't apply alpha to outliers [#754].geomBoxplot()
: outliers do not show tooltips.geomBoxplot()
: some strange outliers drawn here [#143].geomStep()
: no tooltips.geomStep()
: add 'tooltips' parameter [#195].geomStep()
: toggle the behavior of the direction
parameter when the orientation is changed.geomRibbon()
: not all tooltips are shown on a multi-layer plot [#847].geomLollipop()
.
See: example notebook.
Aesthetic stroke
and its scales scaleStroke()
, scaleStrokeIdentity()
.
See: example notebook.
Aesthetic linewidth
(for geomLollipop()
) and its scales scaleLinewidth()
, scaleLinewidthIdentity()
.
See: example notebook.
The 'newline' character (\n
) now works as line break
in legend text.
See: example notebook.
Horizontal error bars and vertical "dodge".
See: example notebook.
"Colorbar" in geom_imshow()
. Parameters show_legend
and color_by
[#717].
[BREAKING] geomDotplot()
and geomYDotplot()
no longer support parameter stat
.
[BREAKING] Identity scales don't create a legend by default.
ggsave
path [contribution by David Phillips].scaleXDiscrete
doesn't make scale discrete [#165].geom_imshow()
fail with an error: "The attribute "xlink:href" of the element geom_imshow()
and geom_raster()
[LPK-175].geom_segment()
doesn't take into account the alpha [#748].geom_density2d
: Internal error with None values in data [#702]...quantile..
is mapped to geom aesthetic.as_discrete()
[#653]."^size"
, where size
aesthetic is specified with a number).ggmarginal
[#681].facet_grid
: Internal error [#699].gggrid()
function (docs), as a replacement for earlier variant of gggrid().
ggsize()
See: example notebook.
jointPlot()
.
See: example notebook.
Axis position
parameter in position scales scaleX*(), scaleY*()
.
See: example notebook.
Drawing quantile lines and filling quantile areas in geomViolin()
and geomDensity()
.
See: example notebook.
angle
parameter in elementText()
in theme()
.
See: example notebook.
Additional "color" aesthetics: paint_a, paint_b, paint_c
.
These aesthetics are flexible and can be used as either "color" or "fill" as needed.
See Multiple Color Scales demo.
Also added a set of related "color scale" functions with the "aesthetic" parameter for configuring of additional color scales.
See New "Scale" Functions demo.
density2d
and density2df
geometry types in residualPlot()
.
[BREAKING] geomViolin()
no longer supports parameter drawQuantiles
. Use new quantileLines
and quantiles
parameters as needed.
[BREAKING] stack
and fill
position adjustments now stack objects on top of each other only if these objects belong to different groups.
If necessary, use mode="all"
in positionStack()
or positionFill()
to stack objects regardless of their group.
See: example notebook.
[BREAKING] The deprecation level raised to "ERROR" for all API that was deprecated in v. 4.2.0 and earlier.
[DEPRECATED] The earlier variant of gggrid().
From now-on please use new variant added in this release: new gggrid().
Sampling: drastically increased default N for "pick sampling" and for other types of sampling [#687].
..quantile..
aesthetic change [#658].position='stack'
[#673].