TAxis


class description - source file - inheritance tree

class TAxis : public TNamed, public TAttAxis


    public:
TAxis TAxis() TAxis TAxis(Int_t nbins, Axis_t xmin, Axis_t xmax) TAxis TAxis(Int_t nbins, Axis_t* xbins) TAxis TAxis(TAxis& axis) virtual void ~TAxis() virtual void CenterTitle(Bool_t center = kTRUE) TClass* Class() virtual void Copy(TObject& axis) virtual Int_t DistancetoPrimitive(Int_t px, Int_t py) virtual void Draw(Option_t* option) virtual void DrawAxis(Coord_t x1, Coord_t y1, Coord_t x2, Coord_t y2) virtual void ExecuteEvent(Int_t event, Int_t px, Int_t py) virtual Int_t FindBin(Axis_t x) virtual Axis_t GetBinCenter(Int_t bin) virtual Text_t* GetBinLabel(Int_t bin) virtual Axis_t GetBinLowEdge(Int_t bin) virtual Axis_t GetBinUpEdge(Int_t bin) virtual Axis_t GetBinWidth(Int_t bin) virtual void GetCenter(Axis_t* center) Int_t GetFirst() virtual void GetLabel(Text_t* label) Int_t GetLast() virtual void GetLowEdge(Axis_t* edge) Int_t GetNbins() virtual const Text_t* GetTitle() TArrayF* GetXbins() Axis_t GetXmax() Axis_t GetXmin() virtual TClass* IsA() virtual void ls(Option_t* option) virtual void Paint(Option_t* option) virtual void PaintAxis(Coord_t x1, Coord_t y1, Coord_t x2, Coord_t y2) virtual void Print(Option_t* option) virtual void Set(Int_t nbins, Axis_t xmin, Axis_t xmax) virtual void Set(Int_t nbins, Axis_t* xbins) virtual void SetBinLabel(Int_t bin, Text_t* label) virtual void SetLabel(Text_t* label) virtual void SetLimits(Axis_t xmin, Axis_t xmax) virtual void SetRange(Int_t first = 0, Int_t last = 0) virtual void ShowMembers(TMemberInspector& insp, char* parent) virtual void Streamer(TBuffer& b) virtual void UnZoom()

Data Members

private:
Int_t fNbins Number of bins Axis_t fXmin low edge of first bin Axis_t fXmax upper edge of last bin TArrayF fXbins Bin edges array in X Char_t* fXlabels !Labels associated to axis Int_t fFirst first bin to display Int_t fLast last bin to display

Class Description

 This class manages histogram axis. It is referenced by TH1 and TGraph.
 To make a graphical representation of an histogram axis, this class
 references the TGaxis class.

 TAxis supports axis with fixed or variable bin sizes.
 Labels may be associated to individual bins.

    see examples of various axis representations drawn by class TGaxis.


TAxis(): TNamed(), TAttAxis()

TAxis(Int_t nbins,Axis_t xlow,Axis_t xup): TNamed(), TAttAxis()
*-*-*-*-*-*-*-*Axis constructor for axis with fix bin size*-*-*-*-*-*-*-*
*-*            ===========================================

TAxis(Int_t nbins,Axis_t *xbins): TNamed(), TAttAxis()
*-*-*-*-*-*-*-*Axis constructor for variable bin size*-*-*-*-*-*-*-*-*-*-*
*-*            ======================================

~TAxis()

TAxis(const TAxis &axis)

void CenterTitle(Bool_t center)
   if center = kTRUE axis title will be centered
   default is right adjusted

void Copy(TObject &obj)
*-*-*-*-*-*-*-*-*-*Copy axis structure to another axis-*-*-*-*-*-*-*-*-*-*-*
*-*                ===================================

Int_t DistancetoPrimitive(Int_t, Int_t)
*-*-*-*-*-*-*-*-*-*-*Compute distance from point px,py to an axis*-*-*-*-*-*
*-*                  ============================================

void Draw(Option_t *)
*-*-*-*-*-*-*-*-*-*-*-*Draw an axis*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
*-*                    ============
  The axis is drawn with the current axis positions, parameters and attributes


void DrawAxis(Coord_t, Coord_t, Coord_t, Coord_t)
*-*-*-*-*-*-*-*-*-*-*-*Draw an axis*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
  The axis is drawn with the specified parameters and the stored attributes


void ExecuteEvent(Int_t event, Int_t px, Int_t py)
*-*-*-*-*-*-*-*-*-*-*Execute action corresponding to one event*-*-*-*
*-*                  =========================================
  This member function is called when an axis is clicked with the locator

  The axis range is set between the position where the mouse is pressed
  and the position where it is released.
  If the mouse position is outside the current axis range when it is released
  the axis is unzoomed with the corresponding proportions.
  Note that the mouse does not need to be in the pad or even canvas
  when it is released.

Int_t FindBin(Axis_t x)
*-*-*-*-*-*-*-*-*Find bin number corresponding to abscissa x-*-*-*-*-*-*
*-*              ===========================================

Int_t GetFirst()
             return first bin on the axis
       - 0 if no range defined

Int_t GetLast()
             return last bin on the axis
       - fNbins if no range defined

void ls(Option_t *)

void Paint(Option_t *)

void PaintAxis(Coord_t, Coord_t, Coord_t, Coord_t)

void Print(Option_t *)

Axis_t GetBinCenter(Int_t bin)
*-*-*-*-*-*-*-*-*-*-*Return center of bin*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
*-*                  ====================

Axis_t GetBinLowEdge(Int_t bin)
*-*-*-*-*-*-*-*-*-*-*Return low edge of bin-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
*-*                  ======================

Axis_t GetBinUpEdge(Int_t bin)
*-*-*-*-*-*-*-*-*-*-*Return up edge of bin-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
*-*                  ======================

Axis_t GetBinWidth(Int_t bin)
*-*-*-*-*-*-*-*-*-*-*Return bin width-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
*-*                  ================

void GetCenter(Axis_t *center)
*-*-*-*-*-*-*-*-*Return an array with the center of all bins-*-*-*-*-*-*-*
*-*              ===========================================

void GetLowEdge(Axis_t *edge)
*-*-*-*-*-*-*-*-*Return an array with the lod edge of all bins-*-*-*-*-*-*-*
*-*              =============================================

Text_t* GetBinLabel(Int_t)
*-*-*-*-*-*-*-*-*-*Return label associated to bin-*-*-*-*-*-*-*-*-*-*-*-*-*
*-*                ==============================

void GetLabel(Text_t *)
*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*

void Set(Int_t nbins, Axis_t xlow, Axis_t xup)
*-*-*-*-*-*-*-*-*Initialize axis with fix bins*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
*-*              =============================

void Set(Int_t nbins, Axis_t *xbins)
*-*-*-*-*-*-*-*-*Initialize axis with variable bins*-*-*-*-*-*-*-*-*-*-*-*-*
*-*              ==================================

void SetLabel(const Text_t *)
*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*

void SetBinLabel(Int_t, Text_t *)
*-*-*-*-*-*-*-*-*Set label associated to bin-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
*-*              ===========================

void SetLimits(Axis_t xmin, Axis_t xmax)
          Set the axis limits

void SetRange(Int_t first, Int_t last)
          Set the viewing range for the axis from bin first to last

void Streamer(TBuffer &R__b)
 Stream an object of class TAxis.

void UnZoom()
 Reset first & last bin to the full range



Inline Functions


                Int_t GetNbins()
        const Text_t* GetTitle()
             TArrayF* GetXbins()
               Axis_t GetXmin()
               Axis_t GetXmax()
              TClass* Class()
              TClass* IsA()
                 void ShowMembers(TMemberInspector& insp, char* parent)


Author: Rene Brun 12/12/94
Last update: 2.22/09 09/07/99 10.47.07 by Rene Brun
Copyright (c) 1995-1999, The ROOT System, All rights reserved. *


ROOT page - Class index - Top of the page

This page has been automatically generated. If you have any comments or suggestions about the page layout send a mail to ROOT support, or contact the developers with any questions or problems regarding ROOT.