plot.ts aktualisiert

main
Alexander Kimmig 2025-06-03 00:15:11 +02:00
parent 1cbda6c784
commit 21f193263c
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 * step + xmin)
const data = x.map(x => ({x, y: y(x)}))
return Plot.line(data, {x: "x", y: "y"}).plot({y: {grid: true}, document})
}