The intro example on http://root.cern.ch/root/html/TH2Poly.html appears to contain an error. According to the later method descriptions:

[code]Int_t AddBin(Int_t n, const Double_t* x, const Double_t* y)

Adds a new bin to the histogram. The number of vertices and their (x,y)

coordinates are required as input. It returns the bin number in the

histogram.

[/code]

but the example uses n = 3 for all the bins which have 3, 4, and 5 vertices. I guess maybe the clever user would realize that this code would work, but that the 4th and 5th vertices of the 2nd and 3rd bins would be ignored, making triangular bins? I would hope that the documentation authors don’t expect this kind of cleverness from the documentation audience.

Jean-François