Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Marks do not display when axes is flipped #13

Open
ps2kenny opened this issue Jun 25, 2024 · 0 comments
Open

Marks do not display when axes is flipped #13

ps2kenny opened this issue Jun 25, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@ps2kenny
Copy link

Simple one; making the min value for an axis greater than the max value swaps the axis direction, however when you do this the marks disappear.

Example below:

#cetz.canvas({
  import cetz: plot, palette

  let axis-options = (("x", "y"), ("x2", "y"), ("x", "y2"), ("x2", "y2"))
  
  plot.plot(
    size: (5,5),
    x-min: 0,
    x-max: 1,
    y-min: 0,
    y-max: 1,
    x2-min: 1,
    x2-max: 0,
    y2-min: 1,
    y2-max: 0,
    for axes in axis-options {
        plot.add(
        axes: axes,
        mark: "o",
        ((0.1,0.1), (0.4,0.4))
      )
    }
  )
})

Which gives:

image

So the x and y axis are normal, and the x2 and y2 axis are flipped. When I plot the same points for each combination of axes only the marks on the first plot on xy appear- they do not when either or both axes are flipped.

@johannes-wolf johannes-wolf transferred this issue from cetz-package/cetz Jun 26, 2024
@johannes-wolf johannes-wolf added the bug Something isn't working label Jun 26, 2024
@johannes-wolf johannes-wolf reopened this Jun 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants