From 2ad8678ee4d58f1c8df689556cb97bc0c4197370 Mon Sep 17 00:00:00 2001 From: James R Swift Date: Fri, 1 Nov 2024 18:25:14 +0000 Subject: [PATCH] Add some developer comments --- src/plot/comb.typ | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/plot/comb.typ b/src/plot/comb.typ index ca02034..879faad 100644 --- a/src/plot/comb.typ +++ b/src/plot/comb.typ @@ -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)) @@ -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 */ @@ -107,7 +110,6 @@ mark-style: mark-style, plot-prepare: _prepare, plot-stroke: _stroke, - width: 0.5, ),) }