Skip to content

Commit

Permalink
Add some developer comments
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesrswift committed Nov 1, 2024
1 parent 36ca1f2 commit 2ad8678
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/plot/comb.typ
Original file line number Diff line number Diff line change
Expand Up @@ -77,12 +77,15 @@
data
) = {

// Convert the input data into a sanitized format so that it isn't needed
// to store those keys in the element dictionary
let line-data = data.map(d=>(
x: d.at(x-key),
y: d.at(y-key),
style: if style-key != none {d.at(style-key, default: none)} else {style},
))

// Calculate the domains along both axes
let x-domain = (
calc.min(..line-data.map(t => t.x)),
calc.max(..line-data.map(t => t.x))
Expand All @@ -94,7 +97,7 @@
)}

((:
type: "comb",
type: "comb", // internal type indentifier
label: label,
data: line-data.map(((x, y,..))=>(x,y)), /* X-Y data */
line-data: line-data, /* formatted data */
Expand All @@ -107,7 +110,6 @@
mark-style: mark-style,
plot-prepare: _prepare,
plot-stroke: _stroke,
width: 0.5,
),)

}

0 comments on commit 2ad8678

Please sign in to comment.