Multiple window plots from a single .txt file with data seperated by blank lines, #GNUPLOT

I am running a Genetic Algorithm and the data of all the generations are stored in a single file as shown below. I want to plot each generation data on seperate windows with the title, which is to be taken from the line after the blank line starting with #. There is a “#” before every generation title.

Note:There is no blank line after the title of each generation, and there is one blank line after the data of each generation and before the title of the next.

+1,0

0 +0.00000 +0.00000 +0.00000 +0.748570 +1.00000 +0.748566 +0.998268
1 +0.100000 +6.93889e-18 +0.0588764 +0.716775 +1.00000 +0.760250 +0.994118

+1,1

0 +0.00000 +0.00000 +0.785398 +0.748570 +1.00000 +0.748566 +0.998268
1 +0.0707107 +0.0707107 +0.685398 +0.764702 +1.00000 +0.668186 +0.992386
2 +0.148127 +0.134009 +0.585398 +0.786377 +1.00000 +0.609907 +0.986533

+1,2

0 +0.00000 +0.00000 +0.785398 +0.747954 +1.00000 +0.747951 +0.998268
1 -0.0707107 -0.0707107 +0.685398 +0.750520 +1.00000 +0.619691 +1.00415
2 -0.148127 -0.134009 +0.585398 +0.753922 +1.00000 +0.538897 +1.01000


Source: ubuntu

Leave a Reply