Skip to content

Commit 802122f

Browse files
committed
WIP
1 parent c674903 commit 802122f

File tree

29 files changed

+10
-10
lines changed

29 files changed

+10
-10
lines changed

src/plot.typ

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -299,13 +299,6 @@
299299
}
300300
}
301301

302-
// Remove unused axes
303-
for (k, v) in ctx.axes {
304-
if not v.at("used", default: false) {
305-
let _ = ctx.axes.remove(k)
306-
}
307-
}
308-
309302
// Set axis options
310303
ctx.axes = plot-util.setup-axes(cetz-ctx, ctx.axes, options.named(), size)
311304

src/plot/util.typ

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -297,9 +297,8 @@
297297
axis.min = get-axis-option(name, "min", axis.min)
298298
axis.max = get-axis-option(name, "max", axis.max)
299299

300-
assert(axis.min not in (none, auto) and
301-
axis.max not in (none, auto),
302-
message: "Axis min and max must be set.")
300+
if axis.min == none { axis.min = 0 }
301+
if axis.max == none { axis.max = axis.min }
303302
if axis.min == axis.max {
304303
axis.min -= 1; axis.max += 1
305304
}

tests/axes/log-mode/ref/1.png

-12.8 KB
Loading

tests/chart/boxwhisker/ref/1.png

-5.88 KB
Loading

tests/chart/ref/1.png

-33.1 KB
Loading

tests/plot/annotation/ref/1.png

-10.3 KB
Loading

tests/plot/bar/ref/1.png

-2.12 KB
Loading

tests/plot/boxwhisker/ref/1.png

-28.4 KB
Loading

tests/plot/broken-axes/ref/1.png

-19.8 KB
Loading

tests/plot/contour/ref/1.png

-13.8 KB
Loading

0 commit comments

Comments
 (0)