Hi friends, I create two figures using supbar
and lilaq
package, but I want counter to ignore the first one (I want the caption to be Figure 1 …), what should I do?
The complete code is as follows
#import "@preview/lilaq:0.3.0" as lq
#import "@preview/tiptoe:0.3.0"
#import "@preview/subpar:0.2.2": grid as sgrid
#let (x, y, y2) = lq.load-txt(read("data/homegeneity.csv"))
#let peak(value, distance) = value > 0 and distance < 5pt
#let trans-linear(
x,
y,
y2,
ylim-base,
supplement: none,
caption: none,
width: 100pt,
column: 60pt,
gutter: 50pt,
) = sgrid(
figure(
..if caption == none { (numbering: it => 0) },
lq.diagram(
width: width,
height: width * .5,
lq.plot(x, y, mark: none),
xlim: (x.at(0), x.at(-1)),
ylim: (ylim-base.at(0), ylim-base.at(-1) + ylim-base.at(-1) / 10),
xaxis: (position: 0, tip: none, ticks: none),
yaxis: (position: 0, tip: none, filter: peak),
),
),
figure(
..if caption == none { (numbering: it => 0) },
lq.diagram(
width: width,
height: width * .5,
lq.place(x.at(-1) * .5, y.at(-1) * .5)[$h(x)$],
lq.rect(
x.at(-1) * .3,
y.at(-1) * .3,
width: x.at(-1) * .4,
height: y.at(-1) * .4,
),
lq.line(
tip: tiptoe.stealth,
(x.at(-1) * .7, y.at(-1) * .5),
(x.at(-1) * .9, y.at(-1) * .5),
),
lq.line(
tip: tiptoe.stealth,
(x.at(-1) * .1, y.at(-1) * .5),
(x.at(-1) * .3, y.at(-1) * .5),
),
xlim: (x.at(0), x.at(-1)),
ylim: (y.at(0), y.at(-1) + y.at(-1) / 10),
xaxis: (stroke: none, ticks: none),
yaxis: (stroke: none, ticks: none),
),
),
figure(
lq.diagram(
width: width,
height: width * .5,
lq.plot(x, y2, mark: none),
xlim: (x.at(0), x.at(-1)),
ylim: (ylim-base.at(0), ylim-base.at(-1) + ylim-base.at(-1) / 10),
xaxis: (position: 0, tip: none, ticks: none),
yaxis: (position: 0, tip: none, filter: peak),
),
),
columns: (column,) * 3,
gutter: gutter,
kind: "",
supplement: supplement,
caption: caption,
)
#trans-linear(
x,
y,
y2,
lq.vec.multiply(y2, 2),
supplement: none,
caption: none,
)
#trans-linear(
x,
lq.vec.multiply(y, 2),
lq.vec.multiply(y2, 2),
lq.vec.multiply(y2, 2),
supplement: "Figure",
caption: "Homegeneity",
)
The data is in csv format
0,0,0
1,0,0
2,0,0
3,0,0
4,0,0
5,0,0
5.5,0.95,0.8
6,1,1
7,1,0.9
8,1,0.6
9,1,0.9
10,1,1
11,1,0.7
12,1,0.65
13,1,0.8
14,1,1
15,1,0.9
16,1,1
17,1,1
18,1,1
19,1,1
20,1,1