Plot from a multi-column file

I have a .txt file, that contains columns of data.

500.00 1.452E+00 3.238E-03 1.98 1891 2389 550.00 1.449E+00 2.999E-03 2.13 1921 2443 600.00 1.441E+00 2.795E-03 2.27 1951 2495 650.00 1.430E+00 2.619E-03 2.42 1979 2545 700.00 1.416E+00 2.466E-03 2.57 2007 2594 800.00 1.384E+00 2.211E-03 2.88 2084 2689 900.00 1.349E+00 2.007E-03 3.19 2160 2782 1.00 1.312E+00 1.839E-03 3.51 2237 2874 1.10 1.276E+00 1.700E-03 3.84 2314 2967 1.20 1.240E+00 1.581E-03 4.18 2392 3060 1.30 1.206E+00 1.479E-03 4.53 2471 3153 1.40 1.172E+00 1.390E-03 4.89 2551 3249 1.50 1.141E+00 1.312E-03 5.26 2633 3345 1.60 1.111E+00 1.243E-03 5.65 2716 3444 1.70 1.082E+00 1.181E-03 6.04 2801 3544 1.80 1.055E+00 1.126E-03 6.44 2888 3647 2.00 1.005E+00 1.030E-03 7.27 3176 3858 2.25 9.495E-01 9.320E-04 8.37 3605 4135 2.50 9.002E-01 8.522E-04 9.53 4031 4426 2.75 8.564E-01 7.857E-04 10.75 4456 4732 3.00 8.172E-01 7.294E-04 12.04 4883 5053 3.25 7.821E-01 6.811E-04 13.38 5312 5388 3.50 7.503E-01 6.391E-04 14.78 5744 5737 3.75 7.214E-01 6.024E-04 16.24 6180 6101 4.00 6.950E-01 5.698E-04 17.76 6619 6478 4.50 6.486E-01 5.148E-04 20.96 8162 7272 5.00 6.090E-01 4.700E-04 24.38 9630 8118

Is there a way to plot let’s say the first column as x and 4th column as y?

You can create a TNtuple with values corresponding to the different columns, then use TTree::ReadFile (root.cern.ch/root/html/TTree.html#TTree:ReadFile) to read the data and then just do the usual drawing from a TNtuple.

When you have your ntuple created just do:

ntuple->Draw("x:y");