Releases: lilaq-project/lilaq
Version 0.6.0 (March 14, 2026)
Exciting news! Lilaq 0.6.0 introduces ultra-flexible support for plot grids, also known as subplots.
On the front of plotting functions, we added the new twins violin and hviolin and a new tick formatter for displaying fractions. Moreover, we significantly improved date/time support and introduced functionality for fixing the aspect ratio between
Changelog
Breaking changes
-
Diagram bounds now strictly respect tick label bounds. This new default may change diagram layouts. You can restore the previous behavior with:
#show: lq.set-diagram(bounds: "relaxed")
-
axis.mirrornow reacts differently when set toauto. Before, axis mirrors where removed automatically whenaxis.positionwas changed. Now, they are removed automatically when either a secondary axis is added oraxis.positionis set to a data or screen coordinate. This change reduces boilerplate code when configuring secondary axes. -
The default for
bar.widthandhbar.widthchanged from0.8to80%. This prevents "invisible" bars on datetime axes or widely spaced positions. Similarly,boxplot.widthandhboxplot.widthnow default to50%. Unit-distance data (which is the most common case) is unaffected by this change. -
Limits of
boxplotandhboxplotinstances are now computed correctly according to the actual width (thickness) of the box while before, boxplot (hboxplot) limits were not tight in x(y)-direction but extended to twice the width (height) in total. In order to increase the spacing again, you can setdiagram.marginto something like(x: 20%). -
vec.transformnow takes individual arguments instead of a tuple. See the Utility section for details.
Diagram
- Added native diagram grids via
showrules withlq.layout. - Added
diagram.aspect-ratioto set up a fixed aspect ratio between data x-and y-coordinates (by adjusting dimensions or margins). - Added
diagram.boundswith modes:"strict","relaxed", and"data-area". - Added support for em-lengths in
diagram.widthanddiagram.height. - Improved the smartness of
axis.mirror. - When axis limits are set to
datetimevalues, the scale now switches to a datetime scale ifaxis.scaleis set toauto. - Fixed inverted colorbars in PDF export.
- Fixed spacing when labels are larger than the diagram.
- When exporting to HTML, diagrams are wrapped in
html.frame.
Plots
- Added
violinandhviolinplot types. Thanks to @koole for initiating their implementation. - Colormesh:
- Now accepts pre-rendered images as input. When
min,max, andmapare provided, the colormesh behaves as if it rendered the mesh itself (including colorbars). - Added
colormesh.alignto control mesh rectangle alignment with x/y coordinates. - Now accepts edge arrays for x and y (length n+1) to specify mesh edges instead of point centers.
- Now accepts pre-rendered images as input. When
- Bar plots:
- Now,
bar.widthandhbar.widthacceptratio(relative to consecutive bar positions) andduration(for datetime coordinates) values. β οΈ Defaultbar.width/hbar.widthchanged from0.8to80%to improve visibility on datetime or sparse axes.- Changed
hbar.aligndefault fromcentertohorizon(both values are supported). - Fixed integer handling for
bar.widthandhbar.width.
- Now,
- Boxplots
- Now,
boxplot.widthandhboxplot.widthacceptratio(relative to consecutive boxplot positions) andduration(for datetime coordinates) values. β οΈ Defaultboxplot.width/hboxplot.widthchanged from0.5to50%to improve visibility on datetime or sparse axes.
- Now,
- Added
fill-between.smooth, equivalent toplot.smooth. - Added support for datetime coordinates with
place,rect,ellipse, andline. - Added
plot.tipandplot.toeto place Tiptoe arrow marks at the start and end of line plots. - Fixed behavior for empty coordinate arrays with most plotting functions. Also thanks to @koole.
- Fixed colormesh scaling when
scale.reflowis set to true via set rules. Thanks to @Andrew15-5 - Fixed polygon rotation when
rotate.reflowis set to true via set rules. - Fixed
rectandellipsecontent and gradient fills when the dimensions are negative.
Ticks
- Added
tick-format.fractionfor automatic fraction formatting. - Added
tick-format.linear#padto disable zero-padding when formatting linear ticks. - Fixed formatting of linear ticks with suffix. In particular, the "0" and minus sign of negative ticks were previously not passed to
zero.num. This can be important for consistency when text and math fonts don't match. - Fixed rounding issues for
axis.tick-distancewhen using the linear locator. - Fixed an issue where the wrong subtick locator was selected when the log locator resolves to linear ticks.
- Fixed automatic offsets and raised the threshold for automatic offsets to kick in.
Utility
- Added
logspacefor creating logspaced value arrays. Thanks to @Ants-Aare. - Added
vec.jitterto apply randomized offsets to numeric arrays. - Added the
minmax.marginoption. β οΈ vec.transformnow takes individual arguments rather than a tuple. Use:
lq.vec.transform(a, b, (a, b) => ...)
instead of the previous:
lq.vec.transform(a, b, ((a, b)) => ...).
Dependencies
- Zero: 0.5.0 β 0.6.1
- Komet: 0.1.0 β 0.2.0
- Tiptoe: 0.3.1 β 0.4.0
Documentation
- Fixed typos and improved clarity across the entire documentation. Also thanks to @bastienvoirin @fGolke @Rahix and @kianmeng.
- Typst built-in type annotations now link to the corresponding pages on the Typst website.
Version 0.5.0 (September 17, 2025)
With version 0.5.0, we are introducing several major improvements including:
- datetime support for time series plotting,
- relative sizing for diagrams,
- and significant performance improvements through integration with the package Komet.
Changelog
Additions
- Added comprehensive datetime support for time series plotting with customizable formatting.
- Diagrams now support relative and ratio inputs for
diagram.widthanddiagram.height. - The parameter
bar.offsetnow acceptsarrayarguments for variable offsets. - In addition to coordinate arrays, functions
x => f(x)can now be used as$y$ arguments inplot,bar,stem, andfill-between(thanks to @xkevio). - Column headers in text files can now be used as converter names in
load-txt(thanks to @timfi). - Added parameter
colormesh.excessto allow masking all values that are out-of-bounds.
Improvements
- Major Performance Boost:
- Contour computations are now significantly faster through Komet integration.
- Boxplots can now be computed for considerably larger data sets thanks to using the Komet plugin.
tick-locate.linearnow supports constrained tick distances liketick-distance: (min: 1).β οΈ The default forlabel.angleis nowautowhich results in 0Β° for x-labels and -90Β° for y-labels. With this change, the angle can now be changed with a conditional show rule (before, this was not possible since the -90Β° was hard-coded into the y-label).β οΈ Improved the schoolbook theme.- Updated elembic from version 1.1.0 to 1.1.1.
- Updated Zero from version 0.4.0 to 0.5.0.
Fixed
- Corrected colormesh positioning in zoomed-in views.
- Fixed label space computation when using show rules.
- Resolved issues with subtick labels and axis attachments.
- Corrected axis positions defined in terms of data coordinates along the other axis when using top or right alignment.
- Fixed a regression with setting
label.padtonone. - Resolved placement of extra subticks.
Documentation
- Added a comprehensive tutorial for datetime formatting.
- Added documentation for tick locators and formatters.
- Improved the
colorbardocumentation. - Fixed various typos and broken links (also thanks to @Jacobgarm and @F2011).
Version 0.4.0 (July 2nd, 2025)
With version 0.4.0, we finally add
- color bars,
- plot smoothing,
- a tutorial on ticks,
- Ο-based scales,
- individual addressing of the x and y grid
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
unitparameter 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 asuffixparameter and reacts to theunitof the linear tick locator. - The types tick and now have a field
kindwhich 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 throughlq.show_(lq.tick-label.with(sub: true), it => {..}). - The type now has a field .
- One can now pass a list of extra ticks to (for example through
lq.diagram(xaxis: (extra-ticks: ()))). - The plot functions ellipse and rect now have a parameter
align.
Breaking changes
β οΈ The parameter now takes a ratio between0%and100%instead of a float between0and1and its behavior is inverted: Setting it to70%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 passed both the coordinates and directions as(x, y, u, v)instead of just the coordinates.β οΈ The legend now uses agridinstead of atableto lay out its items, so you need to replace anyshow lq.selector(lq.legend): set table(..)withshow lq.selector(lq.legend): set grid(..)
Improvements
- The diagram bounds are updated accordingly for content placed with lq.place.
- Updated Tiptoe from
0.3.0to0.3.1(it now works with right-to-left text direction). - Updated Zero from
0.3.3to0.4.0(some fixes, including with right-to-left text). - The fields and 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
- Finally there is a tutorial on ticks!
Version 0.3.0 (May 9th, 2025)
The new version ships with a set of predefined themes that you can use to quickly change the style of your plots.
Moreover, various improvements to important components of Lilaq have been made along with the addition of a large selection of scientific and colorblind-friendly color maps.
Notably, we have added a new tutorial on data loading with Typst and Lilaq.
Changelog
Additions
- A set of predefined themes is now avaiable!
- Added the qualitative color sequence
lq.color.map.okabe-itoaccording to https://jfly.uni-koeln.de/color/. - Added a range of sequential and diverging color maps that are scientific, i.e., perceptually uniform, perceptually ordered, and colorblind-friendly, see https://lilaq.org/docs/reference/color.
- A new plot type
hboxplotas horizontal pendant to the existingboxplot. - An
axis.invertedproperty to quickly swap min/max limits. - A tick locator for symlog axes.
Breaking changes
β οΈ The parameterlineofhlinesandvlineshas been renamed tostroketo bring the signature in line with the other plotting functions.β οΈ Thesymlog.thresholdis now by default 1 (instead of 2).β οΈ The color sequencesmatplotlib10andmatplotlib20have been removed.
Improvements
diagram.legendnow accepts a fulllegendas argument which enables one to specify all entries manually.boxplotnow allows defining the statistical values manually instead of passing a data set.- Functions like
plotcan now have empty coordinate arrays.
Fixed
- The
stepmode forfill-betweenworks again. - The parameters
diagram.xlimanddiagram.ylimdon't fold any more through array concatenation withsetrules. - For plot functions like
colormeshthat ignore the cycle style, the cycle counter is now not advanced. - Fixed an issue with the default tick locator when an integer tick distance was given.
Documentation
- Added a tutorial on data loading.
- Mention the usage of
std.padtogether withlq.place. - Mention the possibility of masking values with
colormesh. - Articles in the reference section now contain a link that brings you to the source of the definition on GitHub.
Version 0.2.0 (April 2nd, 2025)
With this release, important improvements are made to the defaults, prominently including a new default color cycle.
Instead of a somewhat arbitrary color cycle, Lilaq now uses a thoroughly researched, highly optimized color sequence that is friendly to people with color deficiencies. This map is a result of the work of M. A. Petroff (https://arxiv.org/abs/2107.02270).
On top, Lilaq ships a small set of color sequences, available under lq.color.map.
Moreover, the default axis thickness and tick length have been reduced, resulting in a better harmony with text surrounding a diagram figure.
The mark shapes of Lilaq are carefully designed to match in optical size, so they look good together in one plot without further adaptation. This release makes some fine adjustments to the mark sizes. Furthermore, some marks have been added and a few ones renamed (see below).
The most important fixes in this release concern a bug that made it impossible to replace the default style cycle and an issue when first-line-indent was applied to all paragraphs.
Changelog
Highlights
- Lilaq now features a professional default color cycle.
Added
plot.everyfor plotting marks for only a subset of the data points.- Sequential color maps, e.g., for style cycles under
lq.color.map. - Tools for creating cycles.
- Options
tipandtoetolq.pathfor adding arrow tips or other marks.
Improved
diagram.xaxisanddiagram.yaxisdictionaries will now fold which is useful forsetrules and overriding only specific settings made in templates.axis.dxandaxis.dycan now be of typerelativeorratiofor more positioning control.- Ticks now use
cap: "butt"by default leading to better results when the spine stroke is set tonone. This also shortens the ticks by half their width compared to before. - The function
locate-ticks-linearnow features a parameterdensitythat can be used to tune the number of generated ticks based on the automatic estimate. - The parameter
label.padcan now benonefor placement directly on the axis (ignoring the ticks). diagram.cyclecan now also take an array of colors for the common case that the style cycle only consists of color changes. Moreover, and array of dictionaries with the possible keyscolor,stroke, andmarkis supported.
Marks
- Tweaked mark sizes.
β οΈ Replacedtrianglewith^and added other triangle rotations<,>, andv.β οΈ Replaceddiamondwithdβ οΈ Replacedpentagon,hexagon,heptagon, andoctagonwithp5,p6,p7,p8.- Added star variations
s3,s4,s5, ands6 β οΈ Default mark stroke thickness is now 0.7pt instead of 1pt matching it with the default line width of 0.7pt.
Other breaking changes
β οΈ The default color cycle has changed. We now use a color sequence introduced by Matthew A. Petroff in https://arxiv.org/pdf/2107.02270 that is optimized for distinguishability, aesthetics, and people with color deficiencies.β οΈ The default spine thickness has changed from0.7ptto0.5pt.β οΈ The default tick length has been reduced from4ptto3pt.β οΈ diagram.legendno longer supportsboolarguments. Instead, uselegend: noneto turn the legend off (orlegend: (:)to turn it back on after it has been deactivated previously).β οΈ The default color ofvlinesandhlinesis now black instead of blue.β οΈ The defaultz-indexvalues foraxis,legend, andplacehave changed.
Fixed
- An urgent bug with style cycle lists being appended.
- The bottom axis being misplaced when a first-line-indent is applied to all paragraphs.
- Combination of
plot.stroke: noneand a fixedplot.colorresulted in black error bars.
Documentation
- Added examples for advanced bar charts with labels and error bars.
- Added mark documentation and tutorial.
- Improved style cycle documentation.
Version 0.1.0 (March 14th, 2024)
This is the first official release of Lilaq. The documentation can be found on the website at https://lilaq.org.
Version 0.0.2-alpha (March 14th, 2025)
This release makes some big changes and a vast number of improvements.
Primarily, types in form of elembic elements are introduced to greatly enhance user customization possibilities. Moreover, Lilaq now has a website with thorough documentation at https://lilaq.org. Enjoy!
Changelog
Added
- New elements
grid,title,label,legend,diagram,tick,tick-label,spine, anderrorbar. - Added
hbarplotting function. - Support for individual rectangle side coloring of
bar. - New
filterparameter foraxis.
Breaking changes
- The parameters
vmin/vmaxhave been renamed tomin/maxforquiver,contour,colormesh. meshnow only returns the 2d mesh array and not any more also the given inputs. Furthermore,meshreturns a transposed mesh in comparison to before.- Consequently,
colormeshandquivernow take transposed 2D input arrays. - Removed parameter
colorofcontourin favor of the newstrokeparameter. hlineandvlinenow expect coordinates as individual positional arguments (before one array was expected).legend.posis nowlegend.position.title.posis nowtitle.position.- The format for asymmetric errorbars (in
plot.xerrandplot.yerr) has changed. Please refer to the documentation. axis.positionnow takes a dictionary instead of an array for combinedalign+offsetconfiguration.
Improvements
- Improved
contourrendering by using the newcurveelement to remove rare artifacts. colormeshnow creates pixmaps when possible (when the coordinates are evenly spaced) to avoid artifacts and to support smooth interpolation.- Quiver can now take a function for
color. - Axis exponents/offsets now use Zero for showing numbers.
- Arrow tips for
axis. - Arrow tips for
line. - Added
fillparameter todiagram. - Improved ticking heuristic for horizontal axes.
- Use square cap for base stroke for
stemandhstem. - Updated to tiptoe:0.2.0.
Fixed
- plots legend images with error bars.
- ticking: automatic e base label (after Typst 0.13 it was shown incorrectly).
fill-betweennow responds to the current style cycle.- Overflowing, crammed legends.
- empty diagrams with log scales resulting in an error.
- additional axes now respect
diagram.margin. - Plots in additional axes now work properly: they are shown in the legend (if labeled), they behave properly with style cycles, and their z-index is not ignored anymore.
- The default symlog formatter now uses Zero.
Docs
- Documentation website!
- Large-scale documentation improvements.
- Added examples to all important functions, types and sometimes parameters.
Version 0.0.1-alpha (January 18th, 2025)
This is a first and early release of Lilaq, starting an initiatory testing phase.
In the attachments of this release you can find a quickstart document and its Typst source.