From 9b8548ed14ef4dce647c88ac39d2c5ef593ee881 Mon Sep 17 00:00:00 2001
From: Olivier Couet <Olivier.Couet@cern.ch>
Date: Fri, 19 Dec 2008 13:37:15 +0000
Subject: [PATCH] - New function TPaletteAxis::GetValueColor.   Fix typo (in
 the help) in  TPaletteAxis.cxx.

git-svn-id: http://root.cern.ch/svn/root/trunk@27031 27541ba8-7e3a-0410-8455-c3a389f83636
---
 hist/doc/v524/index.html              | 26 ++++++++++++++++++++++++++
 hist/histpainter/src/TPaletteAxis.cxx |  4 ++--
 2 files changed, 28 insertions(+), 2 deletions(-)

diff --git a/hist/doc/v524/index.html b/hist/doc/v524/index.html
index 2a8655fd623..65a56271c4c 100644
--- a/hist/doc/v524/index.html
+++ b/hist/doc/v524/index.html
@@ -2,3 +2,29 @@
 <hr> 
 <a name="hist"></a> 
 <h3>Histogram package</h3>
+
+
+<h4>TPaletteAxis</h4>
+<ul>
+<li> New method <tt>Int_t TPaletteAxis::GetValueColor(z)</tt> to
+     return the color index of the given z value.
+     <br>
+     This funtion should be used after an histogram has been plotted with the
+     option COL or COLZ like in the following example:
+     <pre>
+       h2->Draw("COLZ");
+       gPad->Update();
+       TPaletteAxis *palette =
+          (TPaletteAxis*)h2->GetListOfFunctions()->FindObject("palette");
+       Int_t ci = palette->GetValueColor(30.);
+     </pre>
+     Then it is possible to retrieve the RGB components in the following way:
+     <pre>
+       TColor *c = gROOT->GetColor(ci);
+       float x,y,z;
+       c->GetRGB(x,y,z);
+     </pre>
+     This function is used by <tt>TPaletteAxis::GetBinColor()</tt>.
+</li>
+</ul>
+
diff --git a/hist/histpainter/src/TPaletteAxis.cxx b/hist/histpainter/src/TPaletteAxis.cxx
index 1ac82ecc58e..003df79544d 100644
--- a/hist/histpainter/src/TPaletteAxis.cxx
+++ b/hist/histpainter/src/TPaletteAxis.cxx
@@ -245,7 +245,7 @@ Int_t TPaletteAxis::GetBinColor(Int_t i, Int_t j)
 {
    // Returns the color index of the bin (i,j).
    //
-   // This funtion should be used after an histogram has been plotted with the
+   // This function should be used after an histogram has been plotted with the
    // option COL or COLZ like in the following example:
    //
    //   h2->Draw("COLZ");
@@ -300,7 +300,7 @@ Int_t TPaletteAxis::GetValueColor(Double_t zc)
 {
    // Returns the color index of the given z value
    //
-   // This funtion should be used after an histogram has been plotted with the
+   // This function should be used after an histogram has been plotted with the
    // option COL or COLZ like in the following example:
    //
    //   h2->Draw("COLZ");
-- 
GitLab