Hello Olivier,
Thank you so much.
I suppose that this implementation is also related to my request #44487. I looked at the new code and found that a similar function, e.g.,
Int_t TPaletteAxis::GetValueColor(Double_t zc)
could be implemented in the same way. Probably TPaletteAxis::GetBinColor can be simply,
Int_t TPaletteAxis::GetBinColor(Int_t i, Int_t j) {
Double_t zc = fH->GetBinContent(i,j);
return GetValueColor(zc);
}
How do you think about this idea?
Regards,
OKUMURA, Akira oxon_at_ceres.phys.s.u-tokyo.ac.jp
Department of Physics, The University of Tokyo
7-3-1 Hongo, Bunkyo-ku, Tokyo 113-0033
TEL/FAX +81 3-5841-4173/4059
Skype : okumura.akira
On 2008/12/03, at 2:55, Olivier Couet wrote:
>
> This is now implemented.
>
> On Fri, 9 Nov 2007, Olivier Couet wrote:
>
>> Hello,
>>
>> This functionnality in TPaletteAxis is still not yet implemented.
>> It is on the list of item to do.
>>
>> Cheers, O.Couet
>>
>> -----Original Message-----
>> From: owner-roottalk_at_root.cern.ch [mailto:owner-
>> roottalk_at_root.cern.ch]
>> On Behalf Of OKUMURA, Akira
>> Sent: Thursday, November 08, 2007 11:03 PM
>> To: roottalk (Mailing list discussing all aspects of the ROOT system)
>> Subject: Re: [ROOT] Color of Bins
>>
>> Hello ROOTers,
>>
>> http://root.cern.ch/root/roottalk/roottalk03/1899.html
>> I read this thread but I could not find the getter in the source of
>> TPaletteAxis.
>> http://root.cern.ch/root/html/TPaletteAxis.html
>>
>> Sincerely,
>>
>> OKUMURA, Akira oxon_at_icrr.u-tokyo.ac.jp
>> Institute for Cosmic Ray Research, University of Tokyo
>> 5-1-5 Kashiwanoha Kashiwa Chiba 277-8582 Japan
>> Phone/Fax : +81 4-7136-3153
>> Skype : okumura.akira
>>
>> On 2007/11/08, at 11:56, OKUMURA, Akira wrote:
>>
>>> Hello ROOTers,
>>>
>>> I have a TH2 histogram which is like a world map. X is longitude,
>>> and Y is latitude. I would like to change the shape of the
>>> histogram using Mollweide projection. TPolyLine will be used to
>>> draw each projected bin.
>>>
>>> My question is:
>>> I would like to retrieve the color of each bin. For example,
>>>
>>> TH2F* hist = new ....
>>> for(int i=0; i<hist->GetNbinsX(); i++){
>>> for(int j=0; j<hist->GetNbinsY(); j++){
>>> int col = hist->GetBinColor(i+1, j+1); // <= any idea?
>>> TPolyLine* pol = new TPolyLine;
>>> ......
>>> pol->SetFillColor(col);
>>> pol->Draw("f");
>>> }
>>> }
>>>
>>> How can I do like this?
>>>
>>> Sincerely
>>>
>>> OKUMURA, Akira oxon_at_icrr.u-tokyo.ac.jp
>>> Institute for Cosmic Ray Research, University of Tokyo
>>> 5-1-5 Kashiwanoha Kashiwa Chiba 277-8582 Japan
>>> Phone/Fax : +81 4-7136-3153
>>> Skype : okumura.akira
>>>
>>
>>
>
> --
> Org: CERN - European Laboratory for Particle Physics.
> Mail: 1211 Geneve 23 - Switzerland Mailbox:
> J25910
> E-Mail: Olivier.Couet_at_cern.ch Phone:
> +41 22 7676522
> WWW: http://cern.ch/Olivier.Couet/ Fax:
> +41 22 7670300
Received on Fri Dec 05 2008 - 00:13:20 CET
This archive was generated by hypermail 2.2.0 : Fri Dec 05 2008 - 23:50:02 CET