Skip to content

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

@Shad0wRim

Description

@Shad0wRim

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions