gStyle->SetFillColor(0) causes unexpected behaviour

Hi,

I am using ROOT 5.34/32.

If I do gStyle->SetFillColor(0) and later try to draw a histogram with “colz” or draw a histogram with explicitly set fill color and style, in interactive mode I always get white (no fill, no colors in colz plot). If I save canvas as PDF, there is no such effect.

Below is a test case:

// execute with > root -n t.C
void
t()
{
  /*
     below code line causes white picture when seen in ROOT, but OK in PDF

     uncomment it to observe the problem
  */
  //gStyle->SetFillColor(0);

  TH2D* h = new TH2D("h", "h", 10, 0, 1, 10, 0, 1);
  h->SetBinContent(1, 1, 10);
  h->Draw("colz");
  gPad->SaveAs("t.pdf");
}

and in the attachment my results. t.pdf is created by ROOT in the macro. PNG files are screen shots to show how the canvas in interactive mode look like depending on the problematic line being commented or not.

I don’t know if it is intentional and expected or a bug?

Regards,
Antoni





t.pdf (14 KB)

This effect seems to have disappeared since root 5.34/35

Thank you for the info. I’ll check once new release comes.