Repository navigation
v0.22.2
Patch: decorative layers, fill value formatter, refline tooltips,
annotation ink, boxplot identity mapping.
Added
GGPlot::decorative()marks the most recently added layer as purely
decorative (#161): its drawn marks keep their own visual style but carry
no per-mark metadata — no<title>, nodata-x/data-series/
data-value/data-fvalue, and nodata_attrattributes — so an SVG
consumer that treats "has a non-empty<title>" as "is a selectable
data point" doesn't pick it up (e.g. a boxplot's own mean dot, drawn by
a separategeom_pointlayer purely to mark the spot). Implemented as a
private delegatingGeomwrapper rather than a newLayerfield, so it
adds no field to any public struct. A.tooltip(...)on a decorative
layer has no visible effect and warns, like the existing has-no-effect
warning. A decorative layer also defaults to hidden in the legend,
unlessshow_legend(true)is called to opt back in. Its marks are tagged
data-part="decorative"andaria-hidden="true"(keepingdata-geom),
and their class isgg-mark gg-decorativeinstead of the geom's own
(gg-point,gg-line, …), so a stylesheet selecting on the geom class
doesn't restyle them as data marks.with_value_formatter(same signature as
ScaleContinuous::with_value_formatter) on every continuous colour/fill
scale that implementsformat_value:ScaleColorContinuous,
ScaleColorGradientNandScaleColorGradient2(#164). Falls back to
the plain locale-formatted number when unset (byte-identical default
output).
Fixed
geom_hline/geom_vline/geom_ablinenow implementGeom:: consumes_tooltipsand read a layer'stooltip()template (e.g.
.tooltip("{xintercept}")), replacing their own default"x = …"/
"y = …"label the same way every otherconsumes_tooltipsgeom does;
previously the template was silently dropped with a has-no-effect
warning (#165). The default label (no template set) is unchanged.
A mapped reference line'sdata_attrattributes no longer carry over
onto the marks drawn after it (annotations, gridlines drawn on top,
legend keys).annotate_text/annotate_segmentnow follow themeelement_geomink
when their colour is still at its hard-coded default, the same as every
other geom's default colour (#157, follow-up to #142) — previously they
stayed near-black and nearly invisible under a white-on-black theme.
annotate_rect's fill is deliberately excluded, matching ggplot2
4.0.3's own behaviour (checked directly: its fill stays the hard-coded
grey underelement_geom(ink=, paper=)too). Default theme (no ink set)
is byte-identical.geom_boxplot(stat = "identity"): a raw, unmappedymin/ymaxcolumn
no longer satisfies the five-number-summary requirement, matching
ggplot2 4.0.3 (checked directly) and the same "only when actually
mapped" treatmentlower/middle/upper/outliersalready got (#160,
follow-up to #158). Scoped toGeomBoxplotalone; the universal raw-y
convention for other geoms is unchanged.