for completeness, to add to the solutions already proposed and since @couet mentions it, I tried to run RDataFrame on your data.
RDataFrame requires ROOT v6.14 or greater, it’s a fairly new development and as such it still has some rough edges, but it offers a nice high-level syntax for data analysis and manipulation.
To work around some limitations in RDF’s text file processing I had to change the first line of
0.0 0.0 0.0 (all floating point zeroes, with a single space in between them): the floating point zero helps
RDataFrame to correctly infer the type of your data as
int; the single space in between is because variable spacing between fields is not supported (we should add support, I’ll open a bug report about this).
Concretely speaking, you can type this at prompt or put this in a macro:
auto df = ROOT::RDF::MakeCsvDataFrame(/*file=*/"8000_loss_history_0.06.txt",
// if no header is present, your columns are given default names Col0, Col1, ...
auto graph = df.Graph("Col1", "Col0");
or in a one-liner
ROOT::RDF::MakeCsvDataFrame("8000_loss_history_0.06.txt", false, ' ').Graph("Col1", "Col0")->DrawClone("AL");
To display the two graphs together you can add them to a
auto g1 = ROOT::RDF::MakeCsvDataFrame("file1.txt", false, ' ').Graph("Col1", "Col0");
auto g2 = ROOT::RDF::MakeCsvDataFrame("file2.txt", false, ' ').Graph("Col1", "Col0");
Hope this helps!