TH2S frame/border

Q: In a canvas, you make a frame, TH2S type object. is there any way to get rid of the black closed frame around the histogram(border)? Could anyone send me some related documents.

If c1 is your canvas do:


Well, before you create any canvas, try a global setting:
After you create a canvas or a pad and before you draw anything to it, try a pad specific setting:

I’ve got a problem, however.
If I try:
I still get a strange vertical gray frame line in the right and another one in the bottom (the top frame line is gone).
These additional thin lines look a bit like false shadow lines of a false TPave with a “BR” option.

Another problems are (try with “Modern” and “Classic” styles):

  1. “gStyle->GetFillColor()” is inconsistent with “gPad->GetFillColor()”
  2. “gPad->GetFrameFillColor()” is inconsistent with “gPad->GetFrame()->GetFillColor()” (which seems to return the same value as “gPad->GetFillColor()”)
  3. “gStyle->GetFrameFillColor()” is just “0”

Can you provide a simple example macro showing the problem so I can make a Jira report with ?

I made a Jira report with this:

For the first reported problem, just try (both, ROOT 5 and ROOT 6 behave the same): { gROOT->SetStyle("Classic"); gStyle->SetFrameLineColor(gStyle->GetCanvasColor()); TH1F *h = new TH1F("h", "h", 10, 0, 1); h->Draw(); } Note that the thin gray line goes not only vertically, but also horizontally, right above the black axis line (it’s clearly visible if you “magnify” the picture).

Just for the record, I believe this “gray line” problem did not exist in ROOT 5.28 (I think that was the last version that I really used).
The problems with inconsistent color settings are extremely old (I’m not sure if I ever complained about them up to now, though).