Release: Lilaq 0.6.0
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 and data coordinates.
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. - 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. - โ ๏ธ Default
bar.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. - โ ๏ธ Default
boxplot.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.
- Fixed colormesh scaling when
scale.reflowis set to true via set rules. - 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. - 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.
- Typst built-in type annotations now link to the corresponding pages on the Typst website.
