in a text file I have the list of the (x_bin, y_bin) couples which make up the 68%, 95% and 99% confidence regions, where 1≤ x_bin, y_bin≤ 100. Of course, I want to paint these regions different colors.

How could I proceed in ordere to obtain a THD2? I thank you in advance for your reply.

I understand that you have three kind bins. With weight 0.68, 0.95 and 0.99
Simply fill your h2 with:

h2->Fill(x_bin, y_bin, w);

where w is 0.68, 0.95 or 0.99…

… I guess …

I didn’t explain it well maybe.

100 is the number of bins on the X(and Y)-axis. What I meant to say by x_bin was the number of a certain x bin; it was not the x coordinate of a certain x bin.

Forget the 68%, 95% and 99% confidence regions. I can express my problem in a simple way as follows.

In a text file I have a list of some (x_bin, y_bin) couples, with x_bin, y_bin=1,2,…,100.

I want to paint these (x_bin, y_bin) couples red in a 2D histogram.

To fill a 2d histogram using bin’s numbers use SetBinContent.