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

Incorrect axis placement when using "school-book" axis-style and reverse axis

Open Shad0wRim opened this issue 2 months ago • 0 comments

When the axes are reversed, the "school-book" axis style will place the opposing axis in the incorrect location, at the edge of the plot, rather than intersecting at (0,0).

#import "@preview/cetz:0.4.2": canvas
#import "@preview/cetz-plot:0.1.3": plot

#canvas({
  plot.plot(
    size: (10, 5),
    axis-style: "school-book",
    x-min: -10, x-max: 10, y-min: 10, y-max: -10,
    plot.add(((0, 0),)),
  )
})

#canvas({
  plot.plot(
    size: (10, 5),
    axis-style: "school-book",
    x-min: 10, x-max: -10, y-min: -10, y-max: 10,
    plot.add(((0, 0),)),
  )
})

#canvas({
  plot.plot(
    size: (10, 5),
    axis-style: "school-book",
    x-min: 10, x-max: -10, y-min: 10, y-max: -10,
    plot.add(((0, 0),)),
  )
})

Image

Shad0wRim avatar Sep 30 '25 03:09 Shad0wRim