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

Markers with "open shape" styles cover error bars.

    XMLWordPrintable

Details

    • Bug
    • Status: Open (View Workflow)
    • Medium
    • Resolution: Unresolved
    • master
    • None
    • Graphics
    • None
    • Linux / X11 running any ROOT 5 and ROOT 6 version

    Description

      In principle, markers 24, 25, 26, 27, 28, 30, 32 should be drawn as "open shape" so the "underlying" error bars should clearly be visible, also in cases when they are smaller than the marker.
      Unfortunately this is not the case.
      The marker 4 ("kCircle") behaves properly, though.
      A simple test macro which demonstrates this problem is below (note: it uses graphs but I guess the same problem appears for all objects which use these markers, e.g. histograms).

      {
        const Int_t m = 24; // try 24, 25, 26, 27, 28, 30, 32
        TGraphErrors *g1 = new TGraphErrors(1);
        g1->SetMarkerStyle(4); // error bars clearly visible
        g1->SetPoint(0, 0.2, 0.5); g1->SetPointError(0, 0.01, 0.01);
        TGraphErrors *g2 = new TGraphErrors(1);
        g2->SetMarkerStyle(m); // marker covers error bars
        g2->SetPoint(0, 0.4, 0.5); g2->SetPointError(0, 0.01, 0.01);
        TGraphErrors *g3 = new TGraphErrors(1);
        g3->SetMarkerStyle(4); // error bars clearly visible
        g3->SetPoint(0, 0.6, 0.5); g3->SetPointError(0, 0.05, 0.05);
        TGraphErrors *g4 = new TGraphErrors(1);
        g4->SetMarkerStyle(m); // marker covers error bars
        g4->SetPoint(0, 0.8, 0.5); g4->SetPointError(0, 0.05, 0.05);
        TMultiGraph *mg = new TMultiGraph();
        mg->Add(g1); mg->Add(g2); mg->Add(g3); mg->Add(g4);
        mg->GetXaxis()->SetLimits(0., 1.);
        mg->SetMinimum(0.); mg->SetMaximum(1.);
        mg->Draw("AP");
      }
      

      Attachments

        Activity

          People

            couet Olivier Couet
            a75c91cec93196f04a74 Wile E. Coyote
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: