cetz-package / cetz-plot

Create Plots and Charts with CeTZ
GNU Lesser General Public License v3.0
7 stars 1 forks source link

Marks do not display when axes is flipped #13

Closed ps2kenny closed 1 week ago

ps2kenny commented 1 month ago

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.