Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
- feat: `labs()` fields default to `auto`; pass `none` to suppress an axis or legend title and reclaim the space it reserved. (#12)
- feat: `element-blank()` on a text surface (axis, plot, or legend title) collapses the space the text would reserve. (#12)
- feat: `width`/`height` accept `auto` to fill the available space of a bounded container. (#10)
- fix: contour stats skip incomplete cells when the `(x, y, z)` grid is sparse instead of panicking. (#37)
- fix: `scale-*-manual()` with an empty `values` array reports a clear error instead of an opaque divide-by-zero. (#36)
- fix: number formatters carry a fraction that rounds up to a whole unit (e.g., `0.9999995` no longer renders as `0.1`), and `format-scientific` keeps its mantissa in `[1, 10)`. (#35)
- fix: legend guides reserve space for multi-line labels, measuring the resolved custom `labels:` for both width and line count across swatch, size-ladder, and colourbar guides, so two-line content no longer clips or overlaps. (#33)
Expand Down
2 changes: 2 additions & 0 deletions src/utils/isobands.typ
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,8 @@
let se = z.at(i + 1).at(j)
let ne = z.at(i + 1).at(j + 1)
let nw = z.at(i).at(j + 1)
// Sparse grids leave incomplete cells as `none`; skip them.
if sw == none or se == none or ne == none or nw == none { continue }
let poly = isoband-cell(xw, xe, ys-bot, yn-top, nw, ne, se, sw, lo, hi)
if poly.len() >= 3 { out.push(poly) }
}
Expand Down
2 changes: 2 additions & 0 deletions src/utils/marching-squares.typ
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,8 @@
let se = z.at(i + 1).at(j)
let ne = z.at(i + 1).at(j + 1)
let nw = z.at(i).at(j + 1)
// Sparse grids leave incomplete cells as `none`; skip them.
if sw == none or se == none or ne == none or nw == none { continue }
let case = (
(if nw >= level { 8 } else { 0 })
+ (if ne >= level { 4 } else { 0 })
Expand Down
Loading