
CeTZ-Plot
Paint to use for filling marks.
fill-below: bool Default: true
If true, the filled shape of plots is drawn below axes.
legend: none or auto or coordinate Default: auto
e position the legend will be drawn at. See plot-legends for information about legends. If set to
<auto>, the legend’s “default-placement” styling will be used. If set to a <coordinate>, it will be
taken as relative to the plot’s origin.
legend-anchor: auto or string Default: auto
Anchor of the legend group to use as its origin. If set to auto and lengend is one of the predefined
legend anchors, the opposite anchor to legend gets used.
legend-style: style Default: (:)
Style key-value overwrites for the legend style with style root legend.
..options: any
Axis options, see options below.
Options
You can use the following options to customize each axis of the plot. You must pass them as named
arguments prefixed by the axis name followed by a dash (-) they should target. Example: x-min: 0,
y-ticks: (..) or x2-label: [..].
label: none or content Default: "none"
e axis’ label. If and where the label is drawn depends on the axis-style.
min: auto or float Default: "auto"
Axis lower domain value. If this is set greater than than max, the axis’ direction is swapped
max: auto or float Default: "auto"
Axis upper domain value. If this is set to a lower value than min, the axis’ direction is swapped
equal: string Default: "none"
Set the axis domain to keep a fixed aspect ratio by multiplying the other axis domain by the plots
aspect ratio, depending on the other axis orientation (see horizontal). is can be useful to force
one axis to grow or shrink with another one. You can only “lock” two axes of different orientations.
plot.plot(size: (2,1), x-tick-step: 1, y-tick-step: 1,
x-equal: "y",
{
plot.add(domain: (0, 2 * calc.pi),
t => (calc.cos(t), calc.sin(t)))
})
horizontal: bool Default: "axis name dependant"
If true, the axis is considered an axis that gets drawn horizontally, vertically otherwise. e default
value depends on the axis name on axis creation. Axes which name start with x have this set to
true, all others have it set to false. Each plot has to use one horizontal and one vertical axis for
ploing, a combination of two y-axes will panic: (“y”, “y2”).
tick-step: none or auto or float Default: "auto"
5/26