Skip to content

Conversation

@linev
Copy link
Member

@linev linev commented Nov 12, 2025

Follow up for #20368

There are three classes - TGraph, TGraphErrors and TGraphAsymmErrors - which can be created from text file.
But default format value fit only with "CSV" file format which has "," as delimiter.
So when reading other formats like TXT or TSV, one need to create matching format string.

While all these classes have SaveAs method to store graph objects in the text file with CSV, TSV and TXT extension,
just provide suitable format string for such files extension when reading file. So one can do:

TGraphErrors gr;
gr.SetPoint(1, 3., 3.);
gr.SaveAs("file.tsv", "asroot");

auto gr2 = new TGraphErrors("file.tsv", "");

Use feature in SaveAs testing

@linev linev requested a review from couet November 12, 2025 10:21
@linev linev self-assigned this Nov 12, 2025
@linev linev requested a review from lmoneta as a code owner November 12, 2025 10:21
@github-actions
Copy link

Test Results

    21 files      21 suites   3d 23h 52m 2s ⏱️
 3 749 tests  3 749 ✅ 0 💤 0 ❌
76 820 runs  76 820 ✅ 0 💤 0 ❌

Results for commit e86c3d3.

@linev linev merged commit 2afc829 into root-project:master Nov 13, 2025
29 of 33 checks passed
@linev linev deleted the graph_const branch November 13, 2025 09:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants