Logo ROOT  
Reference Guide
No Matches
Go to the documentation of this file.
1// @(#)root/histpainter:$Id$
2// Author: Rene Brun 15/11/2002
5 * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *
6 * All rights reserved. *
7 * *
8 * For the licensing terms see $ROOTSYS/LICENSE. *
9 * For the list of contributors see $ROOTSYS/README/CREDITS. *
10 *************************************************************************/
12#ifndef ROOT_TPaletteAxis
13#define ROOT_TPaletteAxis
17// //
18// TPaletteAxis //
19// //
20// class used to display a color palette axis for 2-d plots //
21// //
24#include "TPave.h"
25#include "TGaxis.h"
27class TH1;
29class TPaletteAxis : public TPave {
32 TGaxis fAxis; // palette axis
33 TH1 *fH; //! pointer to parent histogram
34 TString fName; // Pave name
37 // TPaletteAxis status bits
38 enum EStatusBits { kHasView = BIT(11) };
42 TPaletteAxis(const TPaletteAxis &palette);
43 virtual ~TPaletteAxis();
44 void Copy(TObject &palette) const;
47 virtual Int_t DistancetoPrimitive(Int_t px, Int_t py);
48 virtual void ExecuteEvent(Int_t event, Int_t px, Int_t py);
49 TGaxis *GetAxis() {return &fAxis;}
51 TH1* GetHistogram(){return fH;}
52 Option_t *GetName() const {return fName.Data();}
53 virtual char *GetObjectInfo(Int_t px, Int_t py) const;
55 virtual void Paint(Option_t *option="");
56 virtual void SavePrimitive(std::ostream &out, Option_t *option = "");
57 void SetHistogram(TH1* h) {fH = h;}
58 virtual void SetName(const char *name="") {fName = name;} // *MENU*
59 virtual void SetLabelColor(Int_t labelcolor) {fAxis.SetLabelColor(labelcolor);} // *MENU*
60 virtual void SetLabelFont(Int_t labelfont) {fAxis.SetLabelFont(labelfont);} // *MENU*
61 virtual void SetLabelOffset(Float_t labeloffset) {fAxis.SetLabelOffset(labeloffset);} // *MENU*
62 virtual void SetLabelSize(Float_t labelsize) {fAxis.SetLabelSize(labelsize);} // *MENU*
63 virtual void SetTitleOffset(Float_t titleoffset=1) {fAxis.SetTitleOffset(titleoffset);} // *MENU*
64 virtual void SetTitleSize(Float_t titlesize) {fAxis.SetTitleSize(titlesize);} // *MENU*
65 virtual void SetLineColor(Color_t linecolor) {fAxis.SetLineColor(linecolor);} // *MENU*
66 virtual void SetLineWidth(Width_t linewidth) {fAxis.SetLineWidth(linewidth);} // *MENU*
67 virtual void UnZoom(); // *MENU*
69 ClassDef(TPaletteAxis,3) //class used to display a color palette axis for 2-d plots
#define h(i)
Definition RSha256.hxx:106
static const double x2[5]
static const double x1[5]
int Int_t
Definition RtypesCore.h:45
short Width_t
Definition RtypesCore.h:82
double Double_t
Definition RtypesCore.h:59
short Color_t
Definition RtypesCore.h:83
float Float_t
Definition RtypesCore.h:57
const char Option_t
Definition RtypesCore.h:66
#define ClassDef(name, id)
Definition Rtypes.h:325
#define BIT(n)
Definition Rtypes.h:85
char name[80]
Definition TGX11.cxx:110
virtual void SetLineWidth(Width_t lwidth)
Set the line width.
Definition TAttLine.h:43
virtual void SetLineColor(Color_t lcolor)
Set the line color.
Definition TAttLine.h:40
The axis painter class.
Definition TGaxis.h:23
void SetTitleOffset(Float_t titleoffset=1)
Definition TGaxis.h:124
void SetLabelFont(Int_t labelfont)
Definition TGaxis.h:105
void SetTitleSize(Float_t titlesize)
Definition TGaxis.h:125
void SetLabelOffset(Float_t labeloffset)
Definition TGaxis.h:106
void SetLabelColor(Int_t labelcolor)
Definition TGaxis.h:104
void SetLabelSize(Float_t labelsize)
Definition TGaxis.h:107
TH1 is the base class of all histogram classes in ROOT.
Definition TH1.h:58
Mother of all ROOT objects.
Definition TObject.h:37
The palette painting class.
void Copy(TObject &palette) const
Copy a palette to a palette.
virtual ~TPaletteAxis()
Palette destructor.
virtual void SetLabelSize(Float_t labelsize)
void SetHistogram(TH1 *h)
TGaxis * GetAxis()
TPaletteAxis & operator=(const TPaletteAxis &)
Assignment operator.
virtual void SetTitleOffset(Float_t titleoffset=1)
Palette default constructor.
TString fName
pointer to parent histogram
virtual void SetName(const char *name="")
virtual void SetLabelOffset(Float_t labeloffset)
virtual void ExecuteEvent(Int_t event, Int_t px, Int_t py)
Check if mouse on the axis region.
Int_t GetBinColor(Int_t i, Int_t j)
Returns the color index of the bin (i,j).
virtual void SetLineColor(Color_t linecolor)
Set the line color.
Option_t * GetName() const
Returns name of object.
virtual void SetLabelColor(Int_t labelcolor)
virtual Int_t DistancetoPrimitive(Int_t px, Int_t py)
Check if mouse on the axis region.
virtual void SavePrimitive(std::ostream &out, Option_t *option="")
Save primitive as a C++ statement(s) on output stream out.
virtual void Paint(Option_t *option="")
Paint the palette.
virtual void SetTitleSize(Float_t titlesize)
virtual void UnZoom()
Unzoom the palette.
virtual void SetLineWidth(Width_t linewidth)
Set the line width.
TH1 * GetHistogram()
virtual void SetLabelFont(Int_t labelfont)
virtual char * GetObjectInfo(Int_t px, Int_t py) const
Displays the z value corresponding to cursor position py.
Int_t GetValueColor(Double_t zc)
Returns the color index of the given z value.
A TBox with a bordersize and a shadow option.
Definition TPave.h:19
Basic string class.
Definition TString.h:136
const char * Data() const
Definition TString.h:369