From 1cbda6c784bc03e9dc83cae44a5c873a2a6382d7 Mon Sep 17 00:00:00 2001 From: Alexander Kimmig Date: Tue, 3 Jun 2025 00:14:12 +0200 Subject: [PATCH] plot.ts aktualisiert --- plot.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plot.ts b/plot.ts index 79e5e36..46bddc3 100644 --- a/plot.ts +++ b/plot.ts @@ -9,7 +9,7 @@ export const plot = (data) => { } export const plotxy = (xmin, xmax, step, y) => { - const x = Array.from({length: (xmax - xmin)/step}, (_, i) => (i - xmin) * step) + const x = Array.from({length: (xmax - xmin)/step}, (_, i) => (i + xmin) * step) const data = x.map(x => ({x, y: y(x)})) return Plot.line(data, {x: "x", y: "y"}).plot({y: {grid: true}, document}) } \ No newline at end of file