Repository navigation
Releases: EconViz/mosaickit
Releases · EconViz/mosaickit
Release list
0.5.1
0.5.0
MosaicKit v0.4.0
- Add
SpanBraceLayer(start, end, label, side): a curly brace between two points
inside the plot (horizontal span:side"above"/"below"; vertical span:
"left"/"right"). Its label sits past the tip, covering nothing; when there
is no room there it moves out on a leader. - Inside axis-brace labels gain the same leader fallback when nothing past the
tip is free (previously they warned and overlapped).
MosaicKit v0.3.2
- Point labels treat a region as theirs only when the point is strictly inside
it; a point on a region's edge (such as a vertex) keeps its label out of the
region, as before 0.3.1.
MosaicKit v0.3.1
- Point labels may sit inside a filled region that contains their point (for
example a point inside a shaded area); other regions are still avoided.
MosaicKit v0.3.0
- Themes and styles refer to colors by palette name (
Stroke(color="blue")).
Names resolve against the active palette (Config.palette) when the render
plan is built, so changing a color once in the palette, in Python or in a
TOML[palette]table, recolors every role that names it. Renderers still
receive only concrete colors. - The built-in
defaulttheme and primitive defaults name their colors
(blue,red,teal,white, and thegrey-*ramp) instead of holding
copies ofDEFAULT_PALETTEvalues. Rendered output with the default palette
is unchanged. - An unknown color name raises
ConfigurationErrornaming the role, field,
and palette. A customPalettemust define the names its theme uses; build
it fromDEFAULT_PALETTE.colorsto keep the built-in names. - TOML config accepts a
[palette]table that defines or overrides named
colors (accent = "#984EA3") on top ofDEFAULT_PALETTE. - Style
colorandedge_colorvalues in TOML accept palette names
(color = "accent") as well as hex. Unknown names raise
ConfigurationErrornaming the file and key when the file is loaded. Configcarries the palette:Config(palette=...)in Python, defaulting to
DEFAULT_PALETTE. Behavior without a palette is unchanged.- Add
PointLabelLayer(point, text), which places its text right beside a point
so it covers nothing. It tries 16 directions around the point at a few small
gaps from the point's marker edge (nearest first, upper-right preferred) and
takes the closest position that stays inside the axes and touches no line,
marker, filled region, or other text. The point's own marker is never covered.
When no position is free it takes the one with fewest overlaps and emits a
LayoutWarningnaming the layer. - Point labels are placed before region labels, so region callouts avoid them.
- Add
place_point_labeltomosaickit.layout.Placement.leadermay be
None(labels drawn without a leader). - Label text is measured with its
TextStyle.rotation, so rotated region labels
are placed using their rotated extent. - Add
AxisMarkLayer(a symbol next to an axis at a value),AxisNoteLayer(an
explanation further out), andBraceLayer(a curly brace over a span, with an
optional label). They work on both the x and y axis. - Text outside an axis is laid out in columns running outward: marks, then
outside braces (one column per lane of overlapping braces), then notes. Marks
and notes are spread along the axis so none overlap. An inside brace's label is
placed so it covers no line, point, region, or text, and emitsLayoutWarning
when no such spot exists. - Add pure layout modules:
mosaickit.layout.geometry.brace_outline,
mosaickit.layout.stack1d(spread,assign_lanes),mosaickit.layout.gutter,
andmosaickit.layout.placement.place_beside. - Add the
axes.noterole to the default theme (9 pt,grey-600). - Add
SaveOptions.expand(defaultTrue). Visible change: saving grows the
canvas to include anything drawn past its edges. It never crops, so a diagram
that fits keeps itsCanvasSpecsize. Passexpand=Falsefor the old behaviour. - Visible change:
build_axes,quadrant_axes, andcrosshair_axesplace axis
titles past the arrow tips (the x title to the right, the y title above)
instead of centred on the tip, where they covered the arrowhead.
MosaicKit v0.2.0
TextLayer.anchoracceptstop-left,top-right,bottom-left, and
bottom-right. The anchor names the corner of the text box placed at
position. Existing anchors behave as before.- Arrowheads are no longer clipped to the axes, so axis arrows whose tips sit on
the boundary draw both wings. - Axis presets (
build_axes,quadrant_axes,crosshair_axes) draw filled
triangle arrowheads by default instead of open chevrons. Pass a stroke with
ArrowStyle.OPENto keep the old look. PathLayeracceptsclip(defaultTrue). Axis presets setclip=False
so axis lines on the plot boundary keep their full stroke width instead of
losing the outer half.- Path arrowheads no longer redraw a solid shaft over the last 15% of the path,
so dashed arrows stay dashed and axis lines keep a uniform width. - Add
RegionLabelLayer, which names a filled region. Withplacement="auto"
the label goes inside the region when it fits (tryingshort_textsecond),
otherwise it becomes a callout: a thin leader and unboxed text placed so it
does not cover any line, point, filled region, or other text. - Add the pure-geometry
mosaickit.layoutpackage that makes those decisions. - Add
LayoutWarning, emitted when no callout position avoids every obstacle. - Add
Palette, a named color table, andDEFAULT_PALETTE: a grey ramp
(grey-900…grey-100,white) plusblue#01A2D9,red#E3120B,
andteal#00887D. - The default theme now takes every color from
DEFAULT_PALETTE. Visible
change:primary,secondary, andaccentbecome the palette's blue, red,
and teal (previously ColorBrewer Set1 blue, red, and purple). Neutral greys
are unchanged. - Layers declare
style_slots(which field holds their explicit style for each
style slot), and Matplotlib drawing is driven by a per-type registry. Add
register_builderandregister_passinmosaickit.rendering.matplotlib
so other packages can add layer types without changing MosaicKit. themes.resolveacceptsoverrides, applied in order after the theme.- Region-label callouts avoid everything drawn on the axes, including layers
drawn by registered third-party builders. - Built-in renderers are loaded by name on first use; the core no longer
imports the Matplotlib backend.
MosaicKit v0.1.0
What's Changed
- Decouple MosaicKit from BezierKit by @yueswater in #5
- docs: add MosaicKit branding and package guide by @yueswater in #6
New Contributors
- @yueswater made their first contribution in #5
Full Changelog: https://github.com/EconViz/mosaickit/commits/v0.1.0