Repository navigation
v0.21.1 — element_geom on all geoms, Size/Alpha legend keys
Patch bump: additive and bug fixes only, no API break. Default output is
byte-identical (ElementGeom unset, as before).
Fixed
element_geom(ink/paper) now covers every other geom that hard-codes
a black/(50, 50, 50)/white default, following 0.21.0's
Geom::apply_element_geompattern (gated onexplicit_style, so an
explicitgeom_*_with(...)colour is untouched even when it equals the
default):GeomSegment,GeomCurve, the reference lines (GeomHline/
GeomVline/GeomAbline),GeomErrorbar/GeomErrorbarh/GeomLinerange/
GeomPointrange,GeomStep, the outline colours ofGeomRect/GeomTile/
GeomBar/GeomCol/GeomPolygon/GeomViolin/GeomDensity/GeomArea/
GeomCount/GeomHex/GeomContour/GeomHistogram/GeomDensity2d/
GeomBin2d/GeomSf(featuresf),GeomCrossbar(outline + fill),
GeomTextRepel,GeomLabelRepel(outline + fill),GeomSpoke,GeomRug,
GeomBracket,GeomJitter,GeomQQ,GeomCensorMarksand
GeomFreqpoly.apply_element_geomis still a no-op for:GeomDotplot's
colorfield (dead config — onlyfillis ever painted);GeomQQLine's
red default andGeomCandlestick/GeomOhlc's green/redup/down
(deliberate semantic colours, not neutral);GeomQQBand's mid-grey
(153, 153, 153)fill (doesn't matchink's black/(50, 50, 50)line
check orpaper's white-fill check — extendingElementGeomto a grey
band is a bigger change, left for a follow-up); andGeomCalendarBorder,
which already reads its colour from the dedicated
Theme::calendar_month_borderelement rather than a hard-coded default.
Closes #142.- The discrete-style legend key for a continuous
SizeorAlphaaesthetic
no longer collapses every key to the scale's minimum.draw_discrete_ legend_atonly had each break's rendered label (aValue::Str), not
its original data value, andScaleSizeContinuous/ScaleAlphaContinuous's
map_to_size/map_to_alphacan't parse a label string back to a number,
so every key silently reported the scale's own fallback. 0.20 (#131) hit
the same bug forLinewidthand fixed it withScale::map_fraction_to_ size(fraction) -> Option<f64>, taking the break's own[0, 1]fraction
(already computed bybreaks()) directly instead of round-tripping
through the label.ScaleSizeContinuousnow implements that same method,
and the newScale::map_fraction_to_alpha(fraction) -> Option<f64>
(defaultNone) does the equivalent forScaleAlphaContinuous— alpha
isn't a "size", so it gets its own trait method rather than reusing
map_fraction_to_size.draw_discrete_legend_at'sSize/Alphaarms
use the new methods (falling back to the old label round-trip for any
other scale assigned to those aesthetics). Closes #132.