What's problem you are encountering?
I am trying to create a graph that keeps updated constantly over time for a simulator;
i.e.: X axis would be the time and Y axis would be the level of the measured element.
As time goes by the levels would go from right to left keeping updated constantly.
What have you tried that didn't work?
I have imagined an array of variables each one representing a value of Y that are passed by from right to left after a second, the first one really being the only one with fresh values.
It does work, but I was wondering if I am taking the most inefficient way to create this.
I'm not sure exactly what you're trying to do, because when I run your program it just plots a horizontal line. But in any case, just dedicate one sprite to drawing the graph:
If you can press the up and down arrow you'll see that the values of the graph get moved to the left ...
the graphic is dynamic and would get constantly updated based on other inputs.