I have a 'data.txt' file containing two columns and N rows, corresponding to N points, e.g.
0.2 0.3
0.4 0.6
0.1 0.7
0.9 0.6
If I use Gnuplot
to plot data from this file, using the command
plot "datafile.txt" with lp
it plots every point in the default form (X, Y), that is Gnuplot
interprets the first column as all the X values, and the second column as all the Y values.
I would like to invert the meaning of X and Y. I would like to set Gnuplot
this command: "Take the first column as Y, and the second column as X"
And so I would like Gnuplot
to take all the data from file like (Y,X) and plot them as (X,Y).
How could I do this?
Thanx
"using" will allow you to select arbitrary columns from your data.