CeTZ 0.3.0 requires Typst 0.11.0 The licence changed from Apache-2.0 to LGPLv3.
CeTZ' plotting and charting functionality has been moved to a separate
package called cetz-plot
.
- Add runtime cetz version check support (see
assert-version
) - Fixed a bug with
#set place(float: true)
affecting the canvas. - Transformation matrices are now rounded
- The default coordinate system changed to a right-hand side system.
Use
scale(z: -1)
if you want to change back to a left-hand system. - The
on-<axes>
functions lead to wrong anchors and got fixed. The offset argument is now behaving as tranlation instead of hard setting the coordinate! - A new
scope(...)
element got added that behaves like a unnamed group but leaking child elements to the outside. This element can be used for scoping transformations, without having to scope children under a group name. - The center anchor of
content()
with two coordinates got fixed when using negative cordinates. - Element names are now checked to not contain a "." character.
- Fixed intersection bug for content with
anchor:
set. - BREAKING The winding order of all elements has been changed to CCW.
- You can now add custom marks via
register-mark
. - Mark anchor (tip, base, center) calcuation got fixed.
- Content border anchors for
text
now default to the texts bounds. - Content emit new anchors for accessing the baseline of the content.
- Added
floating
function for drawing elements without affecting bounding boxes. - The
ortho
function gained asorted
andcull-face
argument to enable depth ordering and face culling of drawables. Ordering is enabled by default. - Closed
line
andmerge-path
elements now have a"centroid"
anchor that is the calculated centroid of the (non self-intersecting!) shape.
- Added support for mark
anchor
style key, to adjust mark placement and allow for centered marks.
- BREAKING The plot library has been moved out of cetz
- Added support for automatically adding axis breaks (sawtooth lines) by setting the
break
attribute of an axis totrue
. - Added a new errorbar function:
add-errorbar
- Added errorbar support to the
add-bar
function - Improved the performance & memory consumption of the clipping algorithm
- BREAKING Legend anchors got renamed and do not use the legend prefix anymore
- BREAKING The chart library has been moved out of cetz
- Added errorbar support for bar- and columncharts
- Piecharts now support a legend (see
legend.label
style) - BREAKING Legend anchors got renamed and do not use the legend prefix anymore
copy-anchors
no longer requires copied anchors to have a default, allowing the copying of an element's anchors from a group as expected.
apply-transform
now allows passing a function that takes and returns a vector, instead of a transformation matrix.- Fixed matrix-vector multiplication.
- Support for accessing anchors within groups.
- Support string shorthand for path and border anchors.
- CeTZ gained some helper functions for drawing 3D figures in orthographic projection:
ortho
,on-xy
,on-xz
andon-yz
.
- New axes style key
tick.label.show
to force showing tick labels on mirrored axes. - Axes tick format can now be set to
none
or content, without defaulting to floating point ticks.
- Fixed piechart styles when using
clockwise: true
. - Fixed
decorations.flat-brace
vertical positioning - Fixed drawing of mirrored plot axis ticks.
- Fixed plots with only annotions.
- Added matrix rounding to fix rounding errors when using lots of transforms
- Changing a group's "center" anchor now effects how border anchors are calculated.
- Allowed changing of the default anchor for groups.
- Re-added "a", "b", and "c" anchors for
circle-through
- Open arcs are no longer modified for anchors, invalid border anchors will panic.
- Grids now actually support border anchors.
- Marks can now be placed on a path after that path got transformed. See the new
transform-shape
style key.
- The
hide
function now support an additionalbounds:
parameter to enable canvas bounds adjustment for hidden elements - The default transformation matrix changed
- Default piechart rotation changed from counter-clockwise to clockwise
- Default piechart start/stop angles changed so that the first item starts at 90° (ccw)
- The default style of plots changed
- New style keys for enabling/disabling the shared zero tick for "school-book" style plots
- New style keys for specifying the layer of different plot elements (
grid-layer
,axis-layer
,background-layer
) - Fixed annotation bounds calculation
- Marks insides annotations are now unaffected by the plots canvas scaling by default (see marks new post-transform style key)
CeTZ 0.2.0 requires Typst 0.10.0
- BREAKING Default anchors are now using TikZ like compass names: north, south, east, west, north-west, north-east, south-west and south-east
- BREAKING Element anchors have changed! See the documentation for details.
- BREAKING Rotation direction changed to CCW
- BREAKING Removed the
shadow
function - BREAKING Changed the behaviour of
mark
- BREAKING Changed the behaviour of
translate
by changing the transformation order, changed arguments ofscale
andtranslate
- BREAKING LERP coordinates now use ratio instead of float for relative interpolation.
- BREAKING Removed
place-marks
andplace-anchors
functions, use the new markpos:
attribute and path anchors(name: <element>, anchor: <number, ratio>)
instead. - Content padding has been improved to be configurable per side
- Groups support same padding options as content
- Overhauled marks, see manual for the new mark symbols, placement- and styling options
- Fixed and improved intersection calculation
- Fixed and improved the styling algorithm
- Catmull-Rom curves, Hobby curves and arcs now can have marks
- Line elements now use border intersection coordinates if first and/or last coordinate is an element name with a "default" anchor
- Added element
arc-through
to draw an arc through three points - Added Hobby curves (
hobby
) in addition to catmull (thanks to @Enivex) - Added
radius
style torect
for drawing rounded rects - Added
hide
function for hiding elements - Added distance, ratio and angle anchors to elements
- Added
plot.add-contour(..)
for plotting contour plots - Added
plot.add-hline(..)
andplot.add-vline(..)
for plotting h/v lines - Added
plot.add-between(..)
for filling the area between two line plots - Added
plot.add-boxwhisker(..)
for displaying boxwhisker plots (thanks to @JamesxX) - Added
fill-type
option toplot.add(..)
for specifying a fill type (axis or shape) - Changed default samples from 100 to 50!
- Fixed plot filling in some cases
- Axes can now be locked (equal) to keep aspect ratio
- Axes can be reversed by setting min > max
- Axis orientation can be changed, enabling rotation of plots
- Plots now support legends!
- Added
piechart
for drawing pie- and donut charts - Added
boxwhisker
for drawing boxwhisker charts
- New path decorations
zigzag
,wave
andcoil
CeTZ requires Typst 0.8.0.
- New
on-layer(layer, body)
function for drawing with a given layer/z-index - New
catmull(..)
function for drawing catmull-rom curves - Changed default anchors of circles and arcs to anchors on the elliptical path
- Added style option to specify triangle mark angle
- Fixed rect anchors if coordinates were swapped
- Fixed bezier extrema/aabb calculation
- Fixed bug with
content
andintersections
- Fixed automatic mark offset for lines
- Fixed problems with style inheritance
- Added
sample-at: (..)
option toplot.add(..)
for specifying extra sample points - Added
line: <linear|spline|vh|hv|vhv>
support - The plot lib tries to linearize data to reduce draw calls
- Fixed custom tick plot formatting
- Allow plots without data
- New decoration library by @RubixDev for drawing braces
- New
angle
library for drawing angles
- Support tick label rotation
- Support negative tick mark direction
- Fixed
arc
with negative delta - Fixed division by 0 error when calculating bezier extremas
- Added
mark: (..)
support forbezier
andbezier-through
- Changed
content
to allow for a second coordinate to span content between - Added
content: (frame: "rect"|"circle")
style for drawing a frame around content - Default triangle mark angle changed. It can now be set via the style attribute
angle
. - Arrowheads on lines are now offset so the tip of the triangle points exactly on the target position
- Added arguments
plot-style
andmark-style
to theplot(..)
base function that allow providing a base style that gets inherited by all graphs. Plots now default to the color pattern (blue, red, green, yellow, black) for stroking & filling graphs.
- Fixed axis label alignment.
- Fixed issue #24, assert if line has fewer than two points.
- Fixed an issue with calculating bounding boxes for some transformed paths
- Fixed barchart bars getting labeled in reversed order
- The
content
function now supports a second coordinate asangle
, to compute the rotation angle between the origin. - Anchors of the
content
function are now properly rotated.
- Added the
tree
module for laying out trees.
- Changed transformation matrix multiplication order from
Local * World to
World * Local. - Added
set-viewport
function for setting up scaling and translation to draw insides a rectangular region. - The function
rect
now emits rotated anchors, before it did not set anchors but used the bounding box. - New function
copy-anchors
to copy anchors of an element into a group. - Arcs are now approximated using up to 4 bezier curves instead of using sampling with straight lines.
- New function
intersections
that emits anchors at all child element intersection points.
- Added new library
chart
for drawing charts, currently only bar- and columncharts are supported.
- Added new library
plot
for drawing line charts (of functions), replacingtypst-plot
.