0

Suppose I have a data file divided into blocks as follws

0     0
1     2
2     0


0     5
1     3
2     4


0     -1
1     3
2     5


...

Is there any way to tell gnuplot to plot only the last block?

1
  • Using index? Try gnuplot online help. Commented Nov 18, 2016 at 15:24

1 Answer 1

1

To access an arbitrary block you can use index. Unfortunately, you cannot access "the last block" without knowing its index. So you must use stats to get the number of blocks:

stats 'file.dat' using 1
plot 'file.dat' index STATS_blocks-1
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.