I didn’t dive deep into this, but since some direct changes are impossible, there is also an explicit counter update:
#import "@preview/subpar:0.2.2": grid as sgrid
#let trans-linear(caption: none, column: 60pt) = {
sgrid(
columns: (column,) * 3,
caption: caption,
figure(rect[left]),
figure(rect[center]),
figure(rect[right]),
)
if caption == none { counter(figure.where(kind: image)).update(n => n - 1) }
}
#trans-linear(caption: none)
#trans-linear(caption: "Homegeneity")
I just don’t know about the kind. If it’s just the standard image
kind, then it’s all should be good, otherwise you might need some additional tweaking.