Hi,
please don't get me wrong, but it seems to me that you're severely limited in your programming skills. It's not just the "creativity" lacking, it's the lack of understanding of the code rationale and of what's going on (or it's supposed to be going on).
In order to clarify the kind of help and guidance you're looking for, let me ask it straight.
Are you searching for someone that, upon countless question, will write the program for you line by line ?
If this is your goal, you'd better to state it immediately, we'll save a lot of time.
My question is due to the fact that this time you commented the "return" statement, but you are still running the whole simulation before setting up the Gnuplot parts. As a consequence, I must conclude that you didn't even spend 2 minutes looking at your code and trying to understand what you actually wrote. You did simply fix the line I told you, and nothing more.
T.