cetz-plot icon indicating copy to clipboard operation
cetz-plot copied to clipboard

Plot style mark scales with plot size

Open cmarcotte opened this issue 7 months ago • 1 comments

Expected behaviour: Marks are drawn in proper scale for axes. Transform-shape flag respected.

Observed: Marks are drawn scaled with plot size from (1,1) size. Transform-shape flag ignored.

MRE: https://typst.app/project/rI6mbXgDNKKsYwGnSiwI49

#import "@preview/cetz:0.3.4"
#import "@preview/cetz-plot:0.1.1"

#set page(width: auto, height: auto)

#cetz.canvas(length: 1cm, 
{
  cetz-plot.plot.plot(
    size: (10,5),
    x-min: 0, x-max: 1,
    {
      cetz-plot.plot.add(
        domain: (0, 1),
        x=>0.5 - 1.0*x*x,
        style: (
          stroke: (paint: blue, thickness: 1pt),
          mark: (transform-shape: false, end: ">")
        ),
      )
    }
  )
})

cmarcotte avatar Apr 14 '25 12:04 cmarcotte

If the transform-shape key is no longer in-use, is there an alternative to restore the old cetz.plot behavior?

cmarcotte avatar Apr 14 '25 12:04 cmarcotte