I try to overlay a histogram where the pad is set logarithmic with a histogram that is not. Thus I tried to overlay a transparent pad. But forcing my style (maybe needed at some other places) it is not transparent anymore. What do I have to do? I’m using root 5.26
void canvasimage() {
//create a canvas with a picture (.png,.jpg,.gif, etc) in the background
gROOT->SetStyle("Plain");
gROOT->ForceStyle();
//TImage *img = TImage::Open("rose512.jpg"); //put your own picture here
TCanvas *c1 = new TCanvas("c1");
//img->Draw("x");
TH1F *h1 = new TH1F("h1","test",100,-1,1);
h1->SetFillColor(kRed);
h1->FillRandom("gaus",3000);
h1->Draw();
//Create a transparent pad filling the full canvas
TPad *p = new TPad("p","p",0,0,1,1);
p->SetFillStyle(4000);
p->SetFrameFillStyle(4000);
p->Draw();
p->cd();
TH1F *h = new TH1F("h","test",100,-3,3);
h->SetFillColor(kCyan);
h->FillRandom("gaus",5000);
h->Draw();
c1->Print("test.pdf");
}