|
From: Jian-Ming Z. <jm...@gm...> - 2013-08-22 07:54:32
|
Hi, I have a data file which contains several columns. The data in the file are not sorted. I want to sort the data of a column (for example, column 3) and plot the data. I use UNIX command sort to sort the data and then use gnuplot to plot the data. $ sort -k3nr datafile > sortfile # sort column 3 in decreasing order gnuplot> plot 'sortfile' u 3 w linespoints # plot sorted values of column 3 at x = 0, 1, 2, … Is it possible to directly sort the data and plot the results in gnuplot? If yes, how to do it? Thanks |