diff --git a/src/plot.typ b/src/plot.typ index 8bc6abb..1436f70 100644 --- a/src/plot.typ +++ b/src/plot.typ @@ -450,7 +450,14 @@ }) if "mark" in d and d.mark != none { - draw.group({ + draw.scope({ + if y.horizontal { + draw.set-ctx(ctx => { + ctx.transform = matrix.swap-cols(ctx.transform, 0, 1) + return ctx + }) + } + draw.set-style(..d.style, ..d.mark-style) mark.draw-mark(d.data, x, y, d.mark, d.mark-size, size) }) diff --git a/src/plot/boxwhisker.typ b/src/plot/boxwhisker.typ index facaa94..84f0521 100644 --- a/src/plot/boxwhisker.typ +++ b/src/plot/boxwhisker.typ @@ -110,6 +110,7 @@ ) + (if "outliers" in data { ( type: "boxwhisker-outliers", data: data.outliers.map(it => (data.x, it)), + axes: axes, mark: mark, mark-size: mark-size, mark-style: (:) diff --git a/tests/plot/boxwhisker/test.typ b/tests/plot/boxwhisker/test.typ index 3dd797d..e93f3ca 100644 --- a/tests/plot/boxwhisker/test.typ +++ b/tests/plot/boxwhisker/test.typ @@ -23,12 +23,23 @@ plot.plot(size: (10, 10), y-min: 0, - y-max: 100, + y-max: 80, { plot.add-boxwhisker((x: 1, ..box1)) }) }) +#test-case({ + import draw: * + + plot.plot(size: (10, 10), + x-min: 0, + x-max: 80, + { + plot.add-boxwhisker((x: 1, ..box1), axes: ("y", "x")) + }) +}) + #test-case({ import draw: *