I want to draw a TBox over my 2D histogram. Without setting the fill color to transparent, it created a grey box over the histogram, but I just want a transparent box with a red outline.
Can someone tell me what I’m doing wrong?
TBox* b = new TBox(30,30,70,70);
b->SetLineColor(kRed);
b->SetLineWidth(2);
b->SetFillColorAlpha(0,0);
TCanvas *c1 = new TCanvas("c1","c1",900,700);
hSChPVetoSwumChVsEVetoSwumCh->Draw("colz");
hSChPVetoSwumChVsEVetoSwumCh->SetTitle(";PVetoChID;EVetoChID");
// l->Draw("same");
b->Draw();//"same");
c1->SetRightMargin(0.10);
c1->SetLeftMargin(0.08);
c1->SetTopMargin(0.0351);
c1->SetBottomMargin(0.075);
c1->SetBorderMode(1);
c1->SetHighLightColor(0);
c1->Modified();
c1->Update();
double x1=0.72;
double x2=0.90;
double y1=0.80;
double y2=0.965;
TPaveStats *s1 = (TPaveStats*)hSChPVetoSwumChVsEVetoSwumCh->FindObject("stats");
s1->SetName("1");
s1->SetX1NDC(x1);
s1->SetX2NDC(x2);
s1->SetY1NDC(y1);
s1->SetY2NDC(y2);
c1->Modified();
c1->Update();