Set bin color for a 2d histo

Dear all,

Let be a 2d histos drawn with option lego1. We have a surface with bars. I wish to color the bars depending on their height, ie. to color the bin depending on its content. This is redundant information but ease the life of our shifters.

Any way of achieving this ?

We know how to do it for a 1d histo, by means of color boxes in front of the bars, but here it gets more difficult.

Thank you in advance,
Barth

Hi,

Use Lego2.

Cheers, Axel.

Hi Axel,

Indeed, it is not far from what I want. But ideally we should have a uniform color for each bin because we want some bars to be green (good) some others red (bad).

Cheers
Barth

Hi,

see tutorials/hist/multicolor.C

Cheers, Axel.

Thanks !