Hi Seb,
In fact, you forgot the use of the "shift register" which will memorize the values for the graph.
In your example, the X and Y arrays are reinitialized at each loop iteration. To avoid this, put a "shift register" on the loop.
Here is my previous pic with the "shift register" marked.
To put a "shift register" on a loop, right-click on this loop and select the "Add shift register" option.
Best Regards,
G Liagre
Best regards,
G Liagre