Gnuplot how can I draw a matrix every nth row
I have the following data
...
10800 42.835282 2.0799322 9.6376456 14.69194 15.74205 16.591997 14.208506 17.036752 16.974312 30.759594 318.69734
10900 59.608134 2.0319971 10.413494 17.136174 18.597465 19.31398 16.78688 19.939459 20.034195 43.809158 470.3118
11000 71.147383 2.3502536 11.098845 19.525944 21.618026 22.255387 19.446565 22.871378 23.265609 60.717349 559.03537
11100 70.844437 2.5290753 11.759208 21.795673 24.63466 25.294785 22.079689 25.788459 26.690083 80.472264 513.94945
...
The data has a total of 600 rows, 12 columns. I want to plot linear data for every 50th line from the third column to the 12th column. I used a graph data matrix (because [i = 3: 12] didn't work as I expected)
data = "data.dat"
plot data matrix every 1::2 w l
This will give me the plot I want (draw the 3-12th column of each row), but draws curves for all 600 rows. How can I draw every 50 rows in this matrix every 1 :: 2 commands so only 12 curves are displayed?
thank
ps) I just solved it myself using sed command like
plot '<sed -n "0~50p" data.dat' matrix every 1::2 w l
+3
source to share