0
votes

I have to say that i am new to Gnuplot. I have a file with 3 columns of datas and I managed plotting it with gnuplot "name.txt" obtaining a 3D graph. Now i would want to graph n lines of that txt each second. I read that it is possible if the file update itself each second but it is not my case. I have this file with datas that are calculated by a c++ program and represent the position of an object every second . Is it possible to live update the Graph so that you can see n points plotted each second ? Until now I managed to do this byte Command : splot "data.txt" every ::1::10 . With this Gnuplot draw n lines form data.txt

1
Can you provide a minimal working example to demonstrate your problem? - FChm
Done! The problem is that I don't know Gnuplot very much . - Jatos
It is still not clear what you are aiming for. If second 1 plots points 1-10, does second 2 plot contain 10 points 11-20 or 20 points 1-20? Do the contents of the file remain unchanged, so that it can be read only once and then processed in pieces, or does the file need to be reread every second? Do you want each set of points to be distinguishable from the previous set (e.g. different color, different symbol)? - Ethan
The Second plot contains 20 points . The first 10 points plus the ten points updated in the second second . The content of the file is the same . I would want to add the first 10 lines of datas in the first second and then other ten lines in the second later . - Jatos
The file I use doesn't change in time - Jatos

1 Answers

0
votes

Here is one possibility:

  do for [N=10:*:10] {
    splot 'name.txt' every 1::1::N using 1:2:3 with points
    pause 1.0
  }