Uploaded image for project: 'ROOT'
  1. ROOT
  2. ROOT-9767

TGraph: setting title in format "title;x title;ytitle" does not set title to "title" but keeps the "title;x title;ytitle" full string

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: High
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 6.18/00
    • Component/s: Graphics
    • Labels:
      None
    • Environment:

      All

      Description

      Working on something unrelated, I stumbled on this asymmetry: if you have a Graph or a TH1 with a title of the form "title;x title;ytitle", the axes' titles are set properly but the title of the object is normalised to "title" only for histos but not for graphs, namely:
      ```
      TH1D h("s","h;z;b",10,0,1);
      cout << h.GetTitle() << endl; // this prints "h"
      TGraph g;
      g.SetTitle("h;z;b");
      cout << g.GetTitle() << endl; // this prints "h;z;b"
      ```

        Attachments

          Activity

            People

            • Assignee:
              couet Olivier Couet
              Reporter:
              dpiparo Danilo Piparo
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Actual End: