Draw TH2F with lego option and error bars


I would like to draw a TH2F lego style but with the errors shown. I tried to combine both the LEGO and E options but it does not seem to work, it is either or… (when I simply add the e after lego I do get some dots on the 3d columns, but not really the error bars). Is there a way to do it? Also when I use only the E option, the plot does not seem to change no matter which version (1, 2, 3 …) I use.

Thank you!

_ROOT Version: 6.12/04
_Platform: MacOS 10.12.6,
_Compiler: clang 9.0

hpxpy->Draw("lego same");

So close I was, putting the order the other way around! :smile: thanks!

@couet It seems to me that the “z” axes used by the “e” plot and the “lego” plot are different (the centers of the markers are always “below” the corresponding “box surfaces”).

Indeed, but for me with the “right” view it’s more or less ok.

@rookie_root If your errors are so small, do not use “e” at all (it just makes the whole picture less readable).

1 Like

Yes the overlap might not coincide exactly you better impose the min and max (SetMaximum, SetMinimum)

1 Like