Sorry for the late reply.
Why do you want to have TH1::GetBinUpEdge(ibin) ? I think this functionality belongs to TAxis, so you should do h1->GetXaxis()->GetBinUpEdge(ibin). Since TH1 is the base class also for 2D histograms, what should return in case of a 2D histogram ?
For these reasons, we will not add this method in TH1
Just for consistency since TH1::GetBinLowEdge(ibin) already exists.
To deal with TH2, how about adding a new argument :
TH1::GetBinLowEdge(Int_t ibin, Option_t* axis = “X”)
TH1::GetBinUpEdge(Int_t ibin, Option_t* axis = “X”)
as it is done in many other TH1 methods: GetAxisColor(), GetNdivisions, GetLabel*(), GetTitle*(), …
I agree with you but many other TH1 methods also skip TAxis getters:
GetAxisColor(), GetNdivisions(), GetLabel*(), GetTitle*(), …
So whether all these methods should be removed or not.
In the latter (necessary) case, consistency is the best choice in my opinion (see below).
Attached are the new methods (diff files against 5.32.00).
Olivier & Lorenzo
Sorry Olivier, I don’t understand your question.
My point is: Low methods exist, why not Up ones?
It would be so much more intuitive that the complementary Up methods exist.
Instead of that, one has to go and look into Root source code to know how to proceed,
which is time-consuming and tiresome.
Besides it makes the code longer to write and more difficult to read.
Please compare:
Double_t xlow = gPad->GetXlowNDC() ;
Double_t xup = gPad->GetXlowNDC() + gPad->GetWNDC() ; to
Double_t xlow = gPad->GetXlowNDC() ;
Double_t xup = gPad->GetXupNDC() ;
This just requires one line more in TPad.h.
Why “or”? Couldn’t all these methods coexist?
Once again my point is just to make Root user’s life easier.
If such coexistence issues don’t exist, adding these few extra lines to the trunk would be great.
Kind regards,
Z
[quote]Instead of that, one has to go and look into Root source code to know how to proceed,
which is time-consuming and tiresome.[/quote]Still the case…
Now that “redirect” methods exist (see [url]Locate like command why not reconsider this point and add the 2 following insignificant lines in TPad.h
Double_t GetXupNDC() const {return (fXlowNDC+fWNDC);}
Double_t GetYupNDC() const {return (fYlowNDC+fHNDC);}
I still don’t have better arguments than consistency & end user easy/intuitive experience.
Note this was one of the statement in Fons’s last presentation (http://indico.cern.ch/conferenceDisplay.py?confId=255905)
[quote]Improve end user graphics experience[/quote]Cheers,
Z