plot.ts aktualisiert

main
Alexander Kimmig 2025-06-03 00:14:12 +02:00
parent 031f151f56
commit 1cbda6c784
1 changed files with 1 additions and 1 deletions

View File

@ -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})
}