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

ROOT Cross-hatch for TGraph does not fill completely

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 6.12/00, 6.12/02, 6.12/04, 6.12/06
    • Fix Version/s: 6.20/00
    • Component/s: Core Libraries, Graphics
    • Labels:
      None
    • Environment:

      Description

      I find that the cross-hatch for a particular TGraph does not get filled in completely. I'm attaching a ROOT file with the TGraph that can be used to reproduce it the issue.

      import ROOT
       
       
      for fillStyle in [3395, 1001]:
        canvas = ROOT.TCanvas('test','test',1600,1200)
        canvas.SetLeftMargin(0.2)
        canvas.SetRightMargin(0.07)
        canvas.SetTopMargin(0.07)
        canvas.DrawFrame(200,200,1700,1700)
       
       
        f = ROOT.TFile("multiplex.root")
        band = f.Get("ExpectedBand_0")
       
       
        canvas.cd()
        band.SetFillColorAlpha(ROOT.TColor.GetColor("#ffd700"),0.5)
        band.SetFillStyle(fillStyle)
        band.SetLineStyle(1)
        band.SetLineWidth(1)
        band.SetLineColorAlpha(ROOT.kGray,0.5)
        band.Draw("F")
        band.Draw("L")
       
       
        ROOT.gPad.RedrawAxis()
        canvas.SetTicks()
        canvas.Update()
        canvas.SaveAs('test_fill{0:d}.pdf'.format(fillStyle))
        del canvas 

      This produces the attached two plots - and you can see that the hatch fill style stops seemingly arbitrarily at the bottom even though the default fill style is fine.

      For now, our workaround is to use a different hatching (3345 and 3354 both work as expected).

        Attachments

        1. multiplex.root
          30 kB
        2. Screenshot 2019-05-06 07.25.33.png
          Screenshot 2019-05-06 07.25.33.png
          436 kB
        3. Screenshot 2019-05-06 at 13.35.01.png
          Screenshot 2019-05-06 at 13.35.01.png
          1.09 MB
        4. test_fill1001.pdf
          16 kB
        5. test_fill3395.pdf
          17 kB

          Activity

            People

            • Assignee:
              couet Olivier Couet
              Reporter:
              gstark Giordon Holtsberg Stark
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Actual End: