TStyle


class description - source file - inheritance tree

class TStyle : public TNamed, public TAttLine, public TAttFill, public TAttMarker, public TAttText


    public:
TStyle TStyle() TStyle TStyle(Text_t* name, Text_t* title) TStyle TStyle(TStyle& style) virtual void ~TStyle() Int_t AxisChoice(Option_t* axis) virtual void Browse(TBrowser* b) virtual void cd() TClass* Class() virtual void Copy(TObject& style) Color_t GetAxisColor(Option_t* axis = X) Float_t GetBarOffset() Float_t GetBarWidth() Int_t GetCanvasBorderMode() Width_t GetCanvasBorderSize() Color_t GetCanvasColor() Int_t GetCanvasDefH() Int_t GetCanvasDefW() Int_t GetCanvasDefX() Int_t GetCanvasDefY() Int_t GetColorPalette(Int_t i) Int_t GetDrawBorder() Int_t GetErrorMarker() Float_t GetErrorMsize() Float_t GetErrorX() Int_t GetFrameBorderMode() Width_t GetFrameBorderSize() Color_t GetFrameFillColor() Style_t GetFrameFillStyle() Color_t GetFrameLineColor() Style_t GetFrameLineStyle() Width_t GetFrameLineWidth() Color_t GetFuncColor() Style_t GetFuncStyle() Width_t GetFuncWidth() const Text_t* GetHeaderPS() Color_t GetHistFillColor() Style_t GetHistFillStyle() Color_t GetHistLineColor() Style_t GetHistLineStyle() Width_t GetHistLineWidth() Color_t GetLabelColor(Option_t* axis = X) Style_t GetLabelFont(Option_t* axis = X) Float_t GetLabelOffset(Option_t* axis = X) Float_t GetLabelSize(Option_t* axis = X) Float_t GetLegoInnerR() const Text_t* GetLineStyleString(Int_t i = 1) Int_t GetNdivisions(Option_t* axis = X) Int_t GetNumberOfColors() Int_t GetOptDate() Int_t GetOptFile() Int_t GetOptFit() Int_t GetOptLogx() Int_t GetOptLogy() Int_t GetOptLogz() Int_t GetOptStat() Int_t GetOptTitle() Int_t GetPadBorderMode() Width_t GetPadBorderSize() Float_t GetPadBottomMargin() Color_t GetPadColor() Bool_t GetPadGridX() Bool_t GetPadGridY() Float_t GetPadLeftMargin() Float_t GetPadRightMargin() Int_t GetPadTickX() Int_t GetPadTickY() Float_t GetPadTopMargin() void GetPaperSize(Float_t& xsize, Float_t& ysize) Float_t GetScreenFactor() Int_t GetShowEventStatus() Width_t GetStatBorderSize() Color_t GetStatColor() Style_t GetStatFont() Float_t GetStatH() Style_t GetStatStyle() Float_t GetStatW() Float_t GetStatX() Float_t GetStatY() Float_t GetTickLength(Option_t* axis = X) Width_t GetTitleBorderSize() Color_t GetTitleColor() Style_t GetTitleFont() Float_t GetTitleH() Float_t GetTitleOffset(Option_t* axis = X) Float_t GetTitleSize(Option_t* axis = X) Float_t GetTitleW() Float_t GetTitleX() Float_t GetTitleXOffset() Float_t GetTitleXSize() Float_t GetTitleY() Float_t GetTitleYOffset() Float_t GetTitleYSize() virtual TClass* IsA() virtual void Reset(Option_t* option) void SetAxisColor(Color_t color = 1, Option_t* axis = X) void SetBarOffset(Float_t baroff = 0.5) void SetBarWidth(Float_t barwidth = 0.5) void SetCanvasBorderMode(Int_t mode = 1) void SetCanvasBorderSize(Width_t size = 1) void SetCanvasColor(Color_t color = 19) void SetCanvasDefH(Int_t h = 500) void SetCanvasDefW(Int_t w = 700) void SetCanvasDefX(Int_t topx = 10) void SetCanvasDefY(Int_t topy = 10) void SetDrawBorder(Int_t drawborder = 1) void SetErrorMarker(Int_t marker = 21) void SetErrorMsize(Float_t msize = 0.05) void SetErrorX(Float_t errorx = 0.5) void SetFrameBorderMode(Int_t mode = 1) void SetFrameBorderSize(Width_t size = 1) void SetFrameFillColor(Color_t color = 1) void SetFrameFillStyle(Style_t styl = 0) void SetFrameLineColor(Color_t color = 1) void SetFrameLineStyle(Style_t styl = 0) void SetFrameLineWidth(Width_t width = 1) void SetFuncColor(Color_t color = 1) void SetFuncStyle(Style_t style = 1) void SetFuncWidth(Width_t width = 4) void SetHeaderPS(Text_t* header) void SetHistFillColor(Color_t color = 1) void SetHistFillStyle(Style_t styl = 0) void SetHistLineColor(Color_t color = 1) void SetHistLineStyle(Style_t styl = 0) void SetHistLineWidth(Width_t width = 1) void SetLabelColor(Color_t color = 1, Option_t* axis = X) void SetLabelFont(Style_t font = 62, Option_t* axis = X) void SetLabelOffset(Float_t offset = 0.005, Option_t* axis = X) void SetLabelSize(Float_t size = 0.04, Option_t* axis = X) void SetLegoInnerR(Float_t rad = 0.5) void SetLineStyleString(Int_t i, char* text) void SetNdivisions(Int_t n = 510, Option_t* axis = X) void SetOptDate(Int_t datefl = 1) void SetOptFile(Int_t file = 1) void SetOptFit(Int_t fit = 1) void SetOptLogx(Int_t logx = 1) void SetOptLogy(Int_t logy = 1) void SetOptLogz(Int_t logz = 1) void SetOptStat(Int_t stat = 1) void SetOptTitle(Int_t tit = 1) void SetPadBorderMode(Int_t mode = 1) void SetPadBorderSize(Width_t size = 1) void SetPadBottomMargin(Float_t margin = 0.1) void SetPadColor(Color_t color = 19) void SetPadGridX(Bool_t gridx) void SetPadGridY(Bool_t gridy) void SetPadLeftMargin(Float_t margin = 0.1) void SetPadRightMargin(Float_t margin = 0.1) void SetPadTickX(Int_t tickx) void SetPadTickY(Int_t ticky) void SetPadTopMargin(Float_t margin = 0.1) void SetPalette(Int_t ncolors = 0, Int_t* colors = 0) void SetPaperSize(TStyle::EPaperSize size) void SetPaperSize(Float_t xsize = 20, Float_t ysize = 26) void SetScreenFactor(Float_t factor = 1) void SetStatBorderSize(Width_t size = 2) void SetStatColor(Int_t color = 19) void SetStatFont(Style_t font = 62) void SetStatH(Float_t h = 0.1) void SetStatStyle(Style_t style = 1001) void SetStatW(Float_t w = 0.19) void SetStatX(Float_t x = 0) void SetStatY(Float_t y = 0) void SetTickLength(Float_t length = 0.03, Option_t* axis = X) void SetTitleBorderSize(Width_t size = 2) void SetTitleColor(Int_t color = 19) void SetTitleFont(Style_t font = 62) void SetTitleH(Float_t h = 0) void SetTitleOffset(Float_t offset = 1, Option_t* axis = X) void SetTitleSize(Float_t size = 0.02, Option_t* axis = X) void SetTitleW(Float_t w = 0) void SetTitleX(Float_t x = 0) void SetTitleXOffset(Float_t offset = 1) void SetTitleXSize(Float_t size = 0.02) void SetTitleY(Float_t y = 1) void SetTitleYOffset(Float_t offset = 1) void SetTitleYSize(Float_t size = 0.02) virtual void ShowMembers(TMemberInspector& insp, char* parent) virtual void Streamer(TBuffer& b) void ToggleEventStatus()

Data Members

private:
TAttAxis fXaxis X axis attributes TAttAxis fYaxis Y axis attributes TAttAxis fZaxis Z axis attributes Float_t fBarWidth width of bar for graphs Float_t fBarOffset offset of bar for graphs Int_t fDrawBorder flag to draw border(=1) or not (0) Int_t fOptLogx =1 if log scale in X Int_t fOptLogy =1 if log scale in y Int_t fOptLogz =1 if log scale in z Int_t fOptDate =1 if date option is selected Int_t fOptStat =1 if option Stat is selected Int_t fOptTitle =1 if option Title is selected Int_t fOptFile =1 if option File is selected Int_t fOptFit =1 if option Fit is selected Int_t fErrorMarker marker for error bars Int_t fShowEventStatus Show event status panel Float_t fErrorMsize marker size for error bars Float_t fErrorX per cent of bin width for errors along X Color_t fFuncColor function color Style_t fFuncStyle function style Width_t fFuncWidth function line width Color_t fFrameFillColor pad frame fill color Color_t fFrameLineColor pad frame line color Style_t fFrameFillStyle pad frame fill style Style_t fFrameLineStyle pad frame line style Width_t fFrameLineWidth pad frame line width Width_t fFrameBorderSize pad frame border size Int_t fFrameBorderMode pad frame border mode Color_t fHistFillColor histogram fill color Color_t fHistLineColor histogram line color Style_t fHistFillStyle histogram fill style Style_t fHistLineStyle histogram line style Width_t fHistLineWidth histogram line width Color_t fCanvasColor canvas color Width_t fCanvasBorderSize canvas border size Int_t fCanvasBorderMode canvas border mode Int_t fCanvasDefH default canvas height Int_t fCanvasDefW default canvas width Int_t fCanvasDefX default canvas top X position Int_t fCanvasDefY default canvas top Y position Color_t fPadColor pad color Width_t fPadBorderSize pad border size Int_t fPadBorderMode pad border mode Float_t fPadBottomMargin pad bottom margin Float_t fPadTopMargin pad top margin Float_t fPadLeftMargin pad left margin Float_t fPadRightMargin pad right margin Bool_t fPadGridX true to get the grid along X Bool_t fPadGridY true to get the grid along Y Int_t fPadTickX =1 to set special pad ticks along X Int_t fPadTickY =1 to set special pad ticks along Y Float_t fPaperSizeX PostScript paper size along X Float_t fPaperSizeY PostScript paper size along Y Float_t fScreenFactor Multiplication factor for canvas size and position Color_t fStatColor stat color Width_t fStatBorderSize border size of Stats PaveLabel Style_t fStatFont font style of Stats PaveLabel Style_t fStatStyle fill area style of Stats PaveLabel Float_t fStatX X position of top right corner of stat box Float_t fStatY Y position of top right corner of stat box Float_t fStatW width of stat box Float_t fStatH height of stat box Color_t fTitleColor title color Width_t fTitleBorderSize border size of Title PavelLabel Style_t fTitleFont font style of Title PaveLabel Float_t fTitleX X position of top left corner of title box Float_t fTitleY Y position of top left corner of title box Float_t fTitleW width of title box Float_t fTitleH height of title box Float_t fLegoInnerR Inner radius for cylindrical legos TArrayI fPalette Color palette TString fLineStyle[30] String describing line style i (for postScript) TString fHeaderPS User defined additional Postscript header public:
static const TStyle::EPaperSize kA4 static const TStyle::EPaperSize kUSLetter

Class Description

 TStyle objects may be created to define special styles.
 By default ROOT creates a default style that can be accessed via
 the gStyle pointer.

 This class includes functions to set the following object attributes.
   - Canvas
   - Pad
   - Histogram axis
   - Lines
   - Fill areas
   - Text
   - Markers
   - Functions
   - Histogram Statistics and Titles


TStyle() :TNamed()

TStyle(Text_t *name, Text_t *title) : TNamed(name,title)

~TStyle()

TStyle(const TStyle &style)

void Browse(TBrowser *)

void cd()
   Change current style

void Copy(TObject &obj)

void Reset(Option_t *)

Int_t AxisChoice( Option_t *axis)

Int_t GetNdivisions( Option_t *axis)

Color_t GetAxisColor( Option_t *axis)

Int_t GetColorPalette(Int_t i) // return color number i in current palette

Color_t GetLabelColor( Option_t *axis)

Style_t GetLabelFont( Option_t *axis)

Float_t GetLabelOffset( Option_t *axis)

Float_t GetLabelSize( Option_t *axis)

const Text_t* GetLineStyleString(Int_t i) const
   return line style string (used by Popscript).
   See SetLineStyleString for more explanations

void GetPaperSize(Float_t &xsize, Float_t &ysize)
    Set paper size for PostScript output


Float_t GetTickLength( Option_t *axis)

Float_t GetTitleOffset( Option_t *axis)

Float_t GetTitleSize( Option_t *axis)

void SetNdivisions(Int_t n, Option_t *axis)
 Set the number of divisions to draw an axis.
  ndiv      : Number of divisions.

       n = N1 + 100*N2 + 10000*N3
       N1=number of primary divisions.
       N2=number of secondary divisions.
       N3=number of 3rd divisions.
           e.g.:
           nndi=0 --> no tick marks.
           nndi=2 --> 2 divisions, one tick mark in the middle
                      of the axis.
 axis specifies which axis ("x","y","z"), default = "x"

void SetAxisColor(Color_t color, Option_t *axis)
 Set color to draw the axis line and tick marks.
 axis specifies which axis ("x","y","z"), default = "x"

void SetHeaderPS(const char *header)
 Define a string to be inserted in the Postscript header
 The string in header will be added to the Postscript file
 immediatly following the %%Page line
 For example, this string may contain special Postscript instructions like
      200 200 translate
 This information is used in TPostScript::Initialize

void SetLabelColor(Color_t color, Option_t *axis)
 Set axis labels color.
 axis specifies which axis ("x","y","z"), default = "x"

void SetLabelFont(Style_t font, Option_t *axis)
 Set font number used to draw axis labels.
    font  : Text font code = 10*fontnumber + precision
             Font numbers must be between 1 and 14
             precision = 1 fast hardware fonts (steps in the size)
             precision = 2 scalable and rotatable hardware fonts
 The default font number is 62.
 axis specifies which axis ("x","y","z"), default = "x"

void SetLabelOffset(Float_t offset, Option_t *axis)
 Set offset between axis and axis labels.
 The offset is expressed as a percent of the pad height.
 axis specifies which axis ("x","y","z"), default = "x"

void SetLabelSize(Float_t size, Option_t *axis)
 Set size of axis labels. The size is expressed as a percent of the pad height.
 axis specifies which axis ("x","y","z"), default = "x"

void SetLineStyleString(Int_t i, const char *text)
 Set line style string (used by Postscript)
 PostScript uses the following convention
  a line is a suite of segments, each segment is described by the
  number of pixels. For example default line styles are defined as:
   linestyle 1  "[]"             solid
   linestyle 2  "[12 12]"        dashed
   linestyle 3  "[4 8]"          dotted
   linestyle 4  "[12 15 4 15]"   dash-dotted

  Up to 30 different styles may be defined.
   The opening and closing brackets may be omitted
   They will be automaticalled added by this function.

void SetOptFit(Int_t mode)
 The type of information about fit parameters printed in the histogram
 statistics box can be selected via the parameter mode.
  The parameter mode can be = pcev  (default = 0111)
    v = 1;  print name/values of parameters
    e = 1;  print errors (if e=1, v must be 1)
    c = 1;  print Chisquare/Number of degress of freedom
    p = 1;  print Probability
  Example: gStyle->SetOptFit(1011);
           print fit probability, parameter names/values and errors.

void SetOptStat(Int_t mode)
 The type of information printed in the histogram statistics box
  can be selected via the parameter mode.
  The parameter mode can be = ourmeni  (default = 0001111)
    n = 1;  name of histogram is printed
    e = 1;  number of entries printed
    m = 1;  mean value printed
    r = 1;  rms printed
    u = 1;  number of underflows printed
    o = 1;  number of overflows printed
    i = 1;  integral of bins printed
  Example: gStyle->SetOptStat(11);
           print only name of histogram and number of entries.


void SetPaperSize(EPaperSize size)
 Set paper size for PostScript output.

void SetPaperSize(Float_t xsize, Float_t ysize)
 Set paper size for PostScript output.
 The paper size is specified in centimeters. Default is 20x26.

void SetTickLength(Float_t length, Option_t *axis)
 set the tick marks length for an axis.
 axis specifies which axis ("x","y","z"), default = "x"

void SetTitleOffset(Float_t offset, Option_t *axis)
 Specify a parameter offset to control the distance between the axis
 and the axis title.
 offset = 1 means : use the default distance
 offset = 1.2 means: the distance will be 1.2*(default distance)
 offset = 0.8 means: the distance will be 0.8*(default distance)

 axis specifies which axis ("x","y","z"), default = "x"

void SetTitleSize(Float_t size, Option_t *axis)
 Set the axis title size.

 axis specifies which axis ("x","y","z"), default = "x"

void SetPalette(Int_t ncolors, Int_t *colors)
 The color palette is used by the histogram classes
  (see TH1::Draw options).
 For example TH1::Draw("col") draws a 2-D histogram with cells
 represented by a box filled with a color CI function of the cell content.
 if the cell content is N, the color CI used will be the color number
 in colors[N],etc. If the maximum cell content is > ncolors, all
 cell contents are scaled to ncolors.

 if ncolors <= 0 a default palette (see below) of 50 colors is defined.
     the colors defined in this palette are OK for coloring pads, labels

 if ncolors == 1 && colors == 0, then
     a Pretty Palette with a Spectrum Violet->Red is created.
   It is recommended to use this Pretty palette when drawing legos,
   surfaces or contours.

 if ncolors > 0 and colors = 0, the default palette is used
 with a maximum of ncolors.

 The default palette defines:
   index 0->9   : grey colors from light to dark grey
   index 10->19 : "brown" colors
   index 20->29 : "blueish" colors
   index 30->39 : "redish" colors
   index 40->49 : basic colors

  The color numbers specified in the palette can be viewed by selecting
  the item "colors" in the "VIEW" menu of the canvas toolbar.
  The color parameters can be changed via TColor::SetRGB.



Inline Functions


              Float_t GetBarOffset()
              Float_t GetBarWidth()
                Int_t GetDrawBorder()
                Int_t GetErrorMarker()
              Float_t GetErrorMsize()
              Float_t GetErrorX()
              Color_t GetCanvasColor()
              Width_t GetCanvasBorderSize()
                Int_t GetCanvasBorderMode()
                Int_t GetCanvasDefH()
                Int_t GetCanvasDefW()
                Int_t GetCanvasDefX()
                Int_t GetCanvasDefY()
                Int_t GetNumberOfColors()
              Color_t GetPadColor()
              Width_t GetPadBorderSize()
                Int_t GetPadBorderMode()
              Float_t GetPadBottomMargin()
              Float_t GetPadTopMargin()
              Float_t GetPadLeftMargin()
              Float_t GetPadRightMargin()
               Bool_t GetPadGridX()
               Bool_t GetPadGridY()
                Int_t GetPadTickX()
                Int_t GetPadTickY()
              Color_t GetFuncColor()
              Style_t GetFuncStyle()
              Width_t GetFuncWidth()
              Color_t GetFrameFillColor()
              Color_t GetFrameLineColor()
              Style_t GetFrameFillStyle()
              Style_t GetFrameLineStyle()
              Width_t GetFrameLineWidth()
              Width_t GetFrameBorderSize()
                Int_t GetFrameBorderMode()
              Color_t GetHistFillColor()
              Color_t GetHistLineColor()
              Style_t GetHistFillStyle()
              Style_t GetHistLineStyle()
              Width_t GetHistLineWidth()
              Float_t GetLegoInnerR()
                Int_t GetOptDate()
                Int_t GetOptFile()
                Int_t GetOptFit()
                Int_t GetOptStat()
                Int_t GetOptTitle()
                Int_t GetOptLogx()
                Int_t GetOptLogy()
                Int_t GetOptLogz()
                Int_t GetShowEventStatus()
              Float_t GetScreenFactor()
              Color_t GetStatColor()
              Width_t GetStatBorderSize()
              Style_t GetStatFont()
              Style_t GetStatStyle()
              Float_t GetStatX()
              Float_t GetStatY()
              Float_t GetStatW()
              Float_t GetStatH()
              Color_t GetTitleColor()
              Style_t GetTitleFont()
              Width_t GetTitleBorderSize()
              Float_t GetTitleXOffset()
              Float_t GetTitleXSize()
              Float_t GetTitleYOffset()
              Float_t GetTitleYSize()
              Float_t GetTitleX()
              Float_t GetTitleY()
              Float_t GetTitleW()
              Float_t GetTitleH()
        const Text_t* GetHeaderPS()
                 void SetLegoInnerR(Float_t rad = 0.5)
                 void SetScreenFactor(Float_t factor = 1)
                 void SetOptDate(Int_t datefl = 1)
                 void SetOptFile(Int_t file = 1)
                 void SetOptLogx(Int_t logx = 1)
                 void SetOptLogy(Int_t logy = 1)
                 void SetOptLogz(Int_t logz = 1)
                 void SetOptTitle(Int_t tit = 1)
                 void SetBarOffset(Float_t baroff = 0.5)
                 void SetBarWidth(Float_t barwidth = 0.5)
                 void SetErrorMarker(Int_t marker = 21)
                 void SetErrorMsize(Float_t msize = 0.05)
                 void SetErrorX(Float_t errorx = 0.5)
                 void SetDrawBorder(Int_t drawborder = 1)
                 void SetCanvasColor(Color_t color = 19)
                 void SetCanvasBorderSize(Width_t size = 1)
                 void SetCanvasBorderMode(Int_t mode = 1)
                 void SetCanvasDefH(Int_t h = 500)
                 void SetCanvasDefW(Int_t w = 700)
                 void SetCanvasDefX(Int_t topx = 10)
                 void SetCanvasDefY(Int_t topy = 10)
                 void SetPadColor(Color_t color = 19)
                 void SetPadBorderSize(Width_t size = 1)
                 void SetPadBorderMode(Int_t mode = 1)
                 void SetPadBottomMargin(Float_t margin = 0.1)
                 void SetPadTopMargin(Float_t margin = 0.1)
                 void SetPadLeftMargin(Float_t margin = 0.1)
                 void SetPadRightMargin(Float_t margin = 0.1)
                 void SetPadGridX(Bool_t gridx)
                 void SetPadGridY(Bool_t gridy)
                 void SetPadTickX(Int_t tickx)
                 void SetPadTickY(Int_t ticky)
                 void SetFuncStyle(Style_t style = 1)
                 void SetFuncColor(Color_t color = 1)
                 void SetFuncWidth(Width_t width = 4)
                 void SetFrameFillColor(Color_t color = 1)
                 void SetFrameLineColor(Color_t color = 1)
                 void SetFrameFillStyle(Style_t styl = 0)
                 void SetFrameLineStyle(Style_t styl = 0)
                 void SetFrameLineWidth(Width_t width = 1)
                 void SetFrameBorderSize(Width_t size = 1)
                 void SetFrameBorderMode(Int_t mode = 1)
                 void SetHistFillColor(Color_t color = 1)
                 void SetHistLineColor(Color_t color = 1)
                 void SetHistFillStyle(Style_t styl = 0)
                 void SetHistLineStyle(Style_t styl = 0)
                 void SetHistLineWidth(Width_t width = 1)
                 void SetStatColor(Int_t color = 19)
                 void SetStatStyle(Style_t style = 1001)
                 void SetStatBorderSize(Width_t size = 2)
                 void SetStatFont(Style_t font = 62)
                 void SetStatX(Float_t x = 0)
                 void SetStatY(Float_t y = 0)
                 void SetStatW(Float_t w = 0.19)
                 void SetStatH(Float_t h = 0.1)
                 void SetTitleColor(Int_t color = 19)
                 void SetTitleFont(Style_t font = 62)
                 void SetTitleBorderSize(Width_t size = 2)
                 void SetTitleXOffset(Float_t offset = 1)
                 void SetTitleXSize(Float_t size = 0.02)
                 void SetTitleYOffset(Float_t offset = 1)
                 void SetTitleYSize(Float_t size = 0.02)
                 void SetTitleX(Float_t x = 0)
                 void SetTitleY(Float_t y = 1)
                 void SetTitleW(Float_t w = 0)
                 void SetTitleH(Float_t h = 0)
                 void ToggleEventStatus()
              TClass* Class()
              TClass* IsA()
                 void ShowMembers(TMemberInspector& insp, char* parent)
                 void Streamer(TBuffer& b)


Author: Rene Brun 12/12/94
Last update: 2.22/07 05/07/99 16.35.42 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.