Your .ino sends a single column of text numbers, nl delimited,
but you are not taking advantage of the delimiter when you
read chunks of text.
See attached for how to do it.
The readText should not be repeated unnecessarily, as it discards the previous reading.
(I did not look closely at the graph code.)
For more examples, see the FAQ
ABG