We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1fa4d11 commit c3f0dfeCopy full SHA for c3f0dfe
1 file changed
src/scale/train.typ
@@ -338,6 +338,18 @@
338
) {
339
// User-supplied limits come in data space; lift them to stat space.
340
let (lo, hi) = domain
341
+ if transform == "log10" {
342
+ assert(
343
+ lo > 0 and hi > 0,
344
+ message: "log10 scale limits must be positive; got " + repr((lo, hi)),
345
+ )
346
+ } else if transform == "sqrt" {
347
348
+ lo >= 0 and hi >= 0,
349
+ message: "sqrt scale limits must be non-negative; got "
350
+ + repr((lo, hi)),
351
352
+ }
353
domain = (transform-fwd(transform, lo), transform-fwd(transform, hi))
354
}
355
let level-index = if scale-type == "discrete" {
0 commit comments