cetz-plot
cetz-plot copied to clipboard
Plot marks do not respect axis bounds
Expected behaviour: Marks are drawn only for those points which are shown.
Observed: Marks are drawn even for those points which are outside of the axis min-max.
MRE:
#import "@preview/cetz:0.3.1"
#import "@preview/cetz-plot:0.1.0"
#set page(width: auto, height: auto)
#cetz.canvas({
cetz-plot.plot.plot(
size: (5,5),
x-min: 1, x-max: 2,
{
cetz-plot.plot.add(
domain: (0, 3),
mark: "x",
x=>x,
)
}
)
})
I think the problem might be from here:
https://github.com/cetz-package/cetz-plot/blob/master/src/plot/mark.typ#L37-L45