I have my data in a CSV file where the data starts at the 8th row. There are many columns but I want to show $46 and $47.
I have tried:
set encoding iso_8859_1
set key right bottom font "Helvetica,16"
set ylabel "Average inventory ratio, {/Symbol g} [inventoried/total]" font "Helvetica,19"
set xlabel "Average time in system, {/Helvetica=19 @^{/=18-}T} [s] " font "Helvetica,19"
set xtics font "Helvetica,16"
set ytics font "Helvetica,16"
set terminal postscript eps enhanced color
set grid
set key spacing 1
set key title "Min. Stock 80%"
set key box
set output "_known_T.eps"
set datafile separator ","
plot "ratio_T.csv" every::8::18 using 46:47 w linespoints ls 20
which works fine but I would need to sort the data by the column $46 to plot the result.
I have tried the next AWK line:
awk -F, 'NR>8{ print $46, $47 }' ratio_T.csv | sort -nk46 | tr '",' ' '
that works fine if executed in the Terminalbut not with Gnuplot, making this:
plot '<awk -F, 'NR>8{ print $46, $47 }' ratio_T.csv | sort -nk46' u 1:2 w points ls 20
A link with the CSV file is in this link.
