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

Hardcoded background fill in THStack::Paint

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Medium
    • Resolution: Fixed
    • 5.34/00
    • None
    • Graphics
    • None
    • NA

    Description

      Hello ROOT developers...

      Here is a long-standing problem with how THStacks are painted:

      http://root.cern.ch/phpBB3/viewtopic.php?f=3&t=10533

      In THStack::Paint the bottom histogram is hardcoded to have a filled background so it is impossible to overlay THStacks with all histograms having a hollow (or hatched) fill.

      It amazes me this is still a problem!

      I easily get the correct output when commenting out two lines in THStack.cxx:

      800          if (i>0) {                                                             
      801             // Erase before drawing the histogram                               
      802             h1col  = h1->GetFillColor();                                        
      803             h1fill = h1->GetFillStyle();                                        
      804             //h1->SetFillColor(10);                             <==== this line                
      805             //h1->SetFillStyle(1001);                           <==== and this one...                
      806             h1->Paint(loption);                                                 
      807             static TClassRef clTFrame = TClass::GetClass("TFrame",kFALSE);      
      808             TAttFill *frameFill = (TAttFill*)clTFrame->DynamicCast(TAttFill::Class(),gPad->GetFrame());
      809             if (frameFill) {                                                    
      810                h1->SetFillColor(frameFill->GetFillColor());                     
      811                h1->SetFillStyle(frameFill->GetFillStyle());

      Attachments

        Activity

          People

            couet Olivier Couet
            end Noel Dawe (Inactive)
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: