TH2Poly cannot SetMaximum

Hi,
TH2Poly is a daughter class of TH2, however, I cannot change its maximum by SetMaximum(), anybody can explain why? The 2nd question is when I draw a TH2Poly object by Draw(“colz”), the painted palette cannot be reached by right-clicking mouse. How can I get the pointer of the palette?

Cheers,
Zhiyi.

The values set by SetMaximum() and SetMinimum() were not taken into account by GetMaximum() and GetMinimum(). Now fixed in the svn trunk.
Thanks for reporting

Thanks. Now it works.

The 2nd question is when I draw a TH2Poly object by Draw(“colz”), the painted palette cannot be reached by right-clicking mouse. How can I get the pointer of the palette?

I also tried the method “Scale”, it is useful, but not implemented yet.

Does it make sense when bins have random shapes ?

The palette can not be picked (fixed in the svn trunk).

Thank you for fixing this.

Another problem: right margin and bottom margin cannot be adjusted by mouse. I have to use command lines: c1->SetRightMargin() to change. Please fix.

I use TH2Poly not for random shapes. My x and y axises are zenith and azimuth angles. I make the bins so that each bin has the same solid angle. Before having TH2Poly, I have to write my own class to deal with this issue. “Scale” is useful.

I do not see this problem. It works for me.

Yes, you have a special case. But the general case for TH2Poly is that the bins can have any shape.
If you have a good implementation of Scale we can consider to include it.

Never mind. Now I use Add(const TH2Poly, double c1) implemented to realize the scaling function.

[quote=“couet”]
Yes, you have a special case. But the general case for TH2Poly is that the bins can have any shape.
If you have a good implementation of Scale we can consider to include it.[/quote]