Dear Rooters,
I attempted to plot more TH2D histograms (histo2D_1 … histo2D_n) with LEGO1 option on the same graph, but without stacking their bin contents. In other words, I just want the largest bin content to “stick out” among them. I tried two methods,
(1) Put all TH2D* histo2D_N into a THStack* stack, and use stack->(“LEGO1 NOSTACK”)
The NOSTACK option has no effect (it keeps stacking them).
(2) I used the SAME option,
histo2D_1-> Draw(“LEGO1”) …
histo2D_n-> Draw(“SAME”)
This gives a funny result, since it actually draws the new plot on top of the previous ones, so they are seen only in the background, the 3-d-effect is ruined. Also the Z scale is individual for each plot.
Later I found someone reported a similar thing with NOSTACK option in 2D, but it was an old post.
I could think of a way to solve this by manipulating the bin contents (checking the bins one by one for all graphs, deleting the bin content in each histogram except for the largest one…), but before I do it I wanted to ask: is there anything implemented already in the latest root to do this?
(If not, and if we are allowed to vote for some new features, I think it would be really useful to have a NOSTACK+LEGO1 option in 2D for THStack I understand that NOSTACK gives an ambiguous result when the COLZ option is turned on for example, but with LEGO this would be very useful in many cases)
Thanks in advance!
Anna
same_TH2.eps (310 KB)
nostack_TH2.eps (83 KB)