lichartee/test.js
linarphy 9dc9f1466c
State & License
- Add state interface with jsplot
- Update documentation
- Update License
- Fix issue when no title is set
- Update exemples used in test.js
2024-01-27 06:03:14 +01:00

33 lines
513 B
JavaScript

let n = 4;
let N = 100;
let x = Array.from(Array(N).keys());
x = x.map( (element) => element * n * 2 * Math.PI / N );
let y = x.map((element) => Math.sin(element));
let a = x.map((element) => Math.cos(element));
let b = x.map((element) => - Math.sin(element));
let c = x.map((element) => - Math.cos(element));
let pyplot = new jsplot();
pyplot.plot(
x,
y,
);
pyplot.title('4 sinus');
pyplot.show();
pyplot.plot(
x,
y,
);
pyplot.plot(
x,
a,
);
pyplot.plot(
x,
b,
);
pyplot.plot(
x,
c,
);
pyplot.show();