Superimposing TH2D

Hello,
I have two TH2D histograms. One shows interesting values, the second one would be used to “shade” a part of the first one (only 0 and 1 values).
I was happy drawing the first histogram with LEGO2POL options and setting the Logz. Now when I try to put somehow the second histogram on the top of the first one. I try the CONTSAME option but then I cannot rotate my histograms the way I wish. So I need a piece of advice from someone who had similar problem…

Thank you, Mariusz

It might be some limitations in the drawing options. Do understand better what you are doing, can you post a simple running example showing what you are doing ?

So I attach a rootfile with 2 TH2D histograms:
signals and simpose.

I usually plot signals with (“LEGO2POL”) option, then I make Logz and actually I rotate it so it looks flat (circle).
Now I would like to cover the bins which have content 1 in histogram simpose by some kind of shadow.
So I try to plot simpose with Draw(“SAME”) of COLZ or SURF1 but nothing works. Maybe you could propose something?

Thanks you a lot,

             Mariusz

90pCluster.root (5.3 KB)

You can try:

signals.Draw(“LEGO2POL”)
simpose.Draw(“SURFPOLSAME”)

But I am not really what you would like to obtain so that might not be the answer.

It is in a good direction, but not visible enough.
Why, when I plot superimposed histogram with options like SCAT, CONT, then I cannot rotate the histogram? (root 5.19).

Mariusz

Scat and CONT are not 3D options … you cannot superimpose with a lego.
I do not understand what you want. I am sorry.

I wanted something like on the attached plot.
Mariusz


The best I could do is:

{
   TCanvas *c1 = new TCanvas("c1", "c1",600,600);
   c1->SetTheta(90);
   c1->SetPhi(90);
   gStyle->SetPalette(1);
   TFile f("90pCluster.root");
   signals.Draw("LEGO2POL");
   simpose.SetLineColor(2);
   simpose.Draw("SURFPOLSAME");
}