v4.2.0
[4.2.0] - 2023-12-28
Added
-
Support for
Categoricals
:- Support for
pandas.Categorical
data type [#914]. - The
levels
parameter inas_discrete()
function [#931].
See: example notebook.
- Support for
-
Support for superscript for numbers in scientific notation [#743].
Warning!
Do NOT(!) use
exponent_format='pow'
if you are planning to export plot to a raster format (PNG,PDF).The
CairoSVG
library (which is under the hood of ourggsave()
function) does not handretspan
element properly end breaks superscript notation when transforming SVG to PNG/PDF.More details: Kozea/CairoSVG#317
See: example notebook. -
Support exporting plot to a file-like object.
Convenience methods:to_svg()
,to_html()
,to_png()
,to_pdf()
[#885], [#590].See: example notebook.
-
Sharing of X,Y-scale limits between subplots in
gggrid()
[#718].See: example notebook.
-
geom_spoke()
[#738].See: example notebook.
-
scale_x_log2()
,scale_y_log2()
[#922]. -
High-contrast tileset "BW" for
geom_livemap()
.See: example notebook.
-
New variables computed by
'count'
and'count2d'
statistics:'..sumprop..'
,'..sumpct..'
[#936].See: example notebook.
-
Support using dictionaries for breaks/labels/values customization in
scale_xxx()
functions [#169], [#882].See: example notebook.
-
The
lablim
parameter inscale_xxx()
functions [#939, #946].See: example notebook.
-
label_text
parameter intheme()
for annotation text settings [#930].See: example notebook.
-
NumberFormat: new flag
~
to trim trailing zeros.
Changed
-
[BREAKING] Function
margin()
is deprecated and will be removed in future releases.
Please replace all existing usages, i.e.theme(plot_margin=margin(..))
andelement_text(margin=margin(..))
with a list or with just a number:- a number or list of one number - the same margin it applied to all four sides;
- a list of two numbers - the first margin applies to the top and bottom, the second - to the left and right;
- a list of three numbers - the first margin applies to the top, the second - to the right and left,
the third - to the bottom; - a list of four numbers - the margins are applied to the top, right, bottom and left in that order.
See: example notebook.
-
Upgraded Apache Batik to version 1.17 [#887]
Fixed
- Jitter reproducibility in geom_jitter, position_jitter, position_jitterdodge [#911].
- Facets: order = 0 doesn't work as expected [#923].
- geom_livemap: fix missing styles (e.g. road outline on high zooms) [#926].
- geom_livemap: freeze at zoom 10 [#892].
- Enormous CPU / Time/ Memory consumption on some data [#932].
- gggrid: composite plot is not visible if saved with ggsave [#942].
- gggrid doesn't override global theme [#966].
scale_continuous()
fails with non-color aesthetics [#953].- NumberFormat:
g
format doesn't use e-notation for small numbers [#965]. - Tooltips: graphical artifacts and bad performance in multi-line plot in Batik [#967].
- Wrong tooltip position on
geom_segment()
with position adjustment [#963].