Adjusting Z range in TH2 COLor plot (+number of colours?)

I am plotting 2D histograms (TH2Ds) with the “COLZ” option and the output is beautiful! There are some zero bins, and these are not drawn (so appear white), which is fine. I need to plot log values, so I have setLogZ() on the appropriate pad, which works.

I know the data in the bins spans several decades (values from about 1000 down to about 1e-15. However, when I draw the histogram, it only plots the bins with values in the largest three decades (from 1000 down to about 1). No matter how much I try to change options (e.g. the number of colours in the spectrum), I cannot get it to plot bins with small values (that have negative logarithms.) Is there some way I can change this behaviour? I’d like to be able to plot TH2s with bins having arbitrary positive values, with a log scale.



Thanks - that worked perfectly! :slight_smile: