Skip to main content

Release: Lilaq 0.4.0

· 3 min read
Mc-Zen
Lilaq author/maintainer

With version 0.4.0, we finally get

and a lot more.

Changelog

Additions

  • Lilaq now (officially) has color bars that can be used to create a legend for colored plots like scatter or colormesh,
  • The function plot now supports smoothing through plot.smooth (thanks to @Netzwerk2).
  • There is now a formatter for symlog axes.
  • The linear tick locator now features a unit parameter making it easy to set up scales based on multiples of π\pi or other real numbers. In addition, the linear tick formatter is now equipped with a suffix parameter and reacts to the unit of the linear tick locator.
  • The types tick and tick-label now have a field kind which can be "x" or "y", referring to the kind of axis that they are placed on.
  • Lilaq now uses the new version 1.1.0 of elembic, introducing features like conditional set rules like show: lq.cond-set(lq.grid.with(kind: "x"), stroke: yellow) and filtered show rules through lq.show_(lq.tick-label.with(sub: true), it => {..}).
  • The type tick-label now has a field tick-label.sub.
  • One can now pass a list of extra ticks to axis.extra-ticks (for example through lq.diagram(xaxis: (extra-ticks: ()))).
  • The plot functions ellipse and rect now have a parameter align.

Breaking changes

  • ⚠️ The parameter tick.shorten-sub now takes a ratio between 0% and 100% instead of a float between 0 and 1 and its behavior is inverted: Setting it to 70% for example shortens the sub-ticks by 70% and not to 70%.
  • ⚠️ The parameter grid.sub is now named instead of positional.
  • ⚠️ When a function is passed to quiver.color, it is given both the coordinates and directions as (x, y, u, v) instead of just the coordinates.
  • ⚠️ The legend now uses a grid instead of a table to lay out its items, so you need to replace any show lq.selector(lq.legend): set table(..) with show lq.selector(lq.legend): set grid(..).

Improvements

  • The diagram bounds are updated accordingly for content placed with lq.place.
  • Updated Tiptoe from 0.3.0 to 0.3.1 (it now works with right-to-left text direction).
  • Updated Zero from 0.3.3 to 0.4.0 (some fixes, including with right-to-left text).
  • The fields stem.mark-size and hstem.mark-size now default to auto.

Fixed

  • Diagrams now work in a context with right-to-left text direction.
  • Fixed axis.inverted which was ignored whenever there was at least one plot with non-tight limits.
  • Setting mark.stroke and mark.fill via plot cycles now works for scatter.
  • Breaking of tick labels when the diagram is too narrow (thanks to @Xendergo).
  • Manual tick locations are now clipped to the range of the axis.
  • Fixed computation of significant digits with non-integer steps.
  • Sub-ticks can now be formatted easily.
  • The interaction of various color and stroke settings for scatter.
  • Fixed error bars when the y-axis range is inverted.
  • Median inset has been fixed for inverted axes.
  • A conflict when using plot.every together with legend labels has been resolved.

Documentation