RE: Color of Bins

From: Olivier Couet <Olivier.Couet_at_cern.ch>
Date: Fri, 9 Nov 2007 10:01:06 +0100


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
>
Received on Fri Nov 09 2007 - 10:01:25 CET

This archive was generated by hypermail 2.2.0 : Fri Nov 09 2007 - 23:50:01 CET