Logo ROOT   6.12/07
Reference Guide
TStyle.cxx
Go to the documentation of this file.
1 // @(#)root/base:$Id$
2 // Author: Rene Brun 12/12/94
3 
4 /*************************************************************************
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  *************************************************************************/
11 
12 #include <string.h>
13 #include <stdio.h>
14 #include <ctype.h>
15 #include <cmath>
16 
17 #include "Riostream.h"
18 #include "TApplication.h"
19 #include "TColor.h"
20 #include "TROOT.h"
21 #include "TStyle.h"
22 #include "TSystem.h"
23 #include "TVirtualPad.h"
24 #include "TVirtualMutex.h"
25 #include "TEnv.h"
26 
28 const UInt_t kTakeStyle = BIT(17);
29 
31 
32 /** \class TStyle
33 \ingroup Base
34  \ingroup GraphicsAtt
35 
36 TStyle objects may be created to define special styles.
37 By default ROOT creates a default style that can be accessed via
38 the gStyle pointer.
39 
40 This class includes functions to set some of the following object attributes.
41  - Canvas
42  - Pad
43  - Histogram axis
44  - Lines
45  - Fill areas
46  - Text
47  - Markers
48  - Functions
49  - Histogram Statistics and Titles
50 */
51 
52 ////////////////////////////////////////////////////////////////////////////////
53 /// Default constructor.
54 
56 {
57  Reset();
58 }
59 
60 ////////////////////////////////////////////////////////////////////////////////
61 /// Create a new TStyle.
62 /// The following names are reserved to create special styles
63 /// -Classic: the default style set in TStyle::Reset
64 /// -Plain: a black&white oriented style
65 /// -Bold:
66 /// -Video;
67 /// -Pub:
68 /// -Modern:
69 /// (see the definition of these styles below).
70 ///
71 /// Note a side-effect of calling gStyle->SetFillColor(0). This is nearly
72 /// equivalent of selecting the "Plain" style.
73 ///
74 /// Many graphics attributes may be set via the TStyle, see in particular
75 /// - TStyle::SetNdivisions
76 /// - TStyle::SetAxisColor
77 /// - TStyle::SetHeaderPS
78 /// - TStyle::SetTitlePS
79 /// - TStyle::SetLabelColor
80 /// - TStyle::SetLabelFont
81 /// - TStyle::SetLabelOffset
82 /// - TStyle::SetLabelSize
83 /// - TStyle::SetOptDate
84 /// - TStyle::SetLineStyleString
85 /// - TStyle::SetOptFit
86 /// - TStyle::SetOptStat
87 /// - TStyle::SetPaperSize
88 /// - TStyle::SetTickLength
89 /// - TStyle::SetTitleOffset
90 /// - TStyle::SetTitleSize
91 /// - TStyle::SetPalette
92 /// - TStyle::SetTimeOffset
93 /// - TStyle::SetStripDecimals
94 ///
95 /// The current style is pointed by gStyle.
96 ///
97 /// When calling myStyle->cd(), gStyle is set to myStyle.
98 ///
99 /// One can also use gROOT to change the current style, e.g.
100 ///
101 /// gROOT->SetStyle("Plain") will change the current style gStyle to the
102 /// "Plain" style
103 ///
104 /// See also TROOT::ForceStyle and TROOT::UseCurrentStyle
105 
106 TStyle::TStyle(const char *name, const char *title)
107 {
108  TString style_name = name;
109 
110  SetNameTitle(style_name, title);
111 
112  // If another style was already created with the same name, it is overwrite.
113  delete gROOT->GetStyle(style_name);
114 
115  Reset();
116 
117  {
119  gROOT->GetListOfStyles()->Add(this);
120  }
121 
122  if (strcmp(style_name,"Modern") == 0) {
123  // Modern style
127  SetCanvasColor(0);
128  SetPadBorderMode(0);
129  SetPadColor(0);
130  SetStatColor(0);
131  SetTitleFont(42,"");
132  SetLabelFont(42,"x");
133  SetTitleFont(42,"x");
134  SetLabelFont(42,"y");
135  SetTitleFont(42,"y");
136  SetLabelFont(42,"z");
137  SetTitleFont(42,"z");
138  SetStatFont(42);
139  SetLabelSize(0.035,"x");
140  SetTitleSize(0.035,"x");
141  SetLabelSize(0.035,"y");
142  SetTitleSize(0.035,"y");
143  SetLabelSize(0.035,"z");
144  SetTitleSize(0.035,"z");
145  SetTitleSize(0.050,"");
146  SetTitleAlign(23);
147  SetTitleX(0.5);
150  SetTitleStyle(0);
151  SetTitleOffset(0.,"Y");
153  SetOptStat(1111);
154  SetStatY(0.935);
158  SetLegendFont(42);
159  SetLegendTextSize(0.);
160  SetFuncWidth(2);
161  SetFuncColor(2);
162  }
163  if (strcmp(style_name,"Plain") == 0) {
164  // May be a standard style to be initialised
168  SetPadBorderMode(0);
169  SetPadColor(0);
170  SetCanvasColor(0);
173  SetStatColor(0);
176  return;
177  }
178  if (strcmp(style_name,"Bold") == 0) {
179  // Authors: Art Poskanzer and Jim Thomas, LBNL, Oct. 2000
180  SetPalette(1,0);
181  SetCanvasColor(10);
184  SetFrameFillColor(10);
185  SetPadColor(10);
186  SetPadTickX(1);
187  SetPadTickY(1);
188  SetPadBottomMargin(0.15);
189  SetPadLeftMargin(0.15);
190  SetHistLineWidth(3);
192  SetFuncWidth(3);
194  SetLineWidth(3);
195  SetLabelSize(0.05,"xyz");
196  SetLabelOffset(0.01,"y");
197  SetLabelColor(kBlue,"xy");
198  SetTitleSize(0.06,"xyz");
199  SetTitleOffset(1.3,"Y");
200  SetTitleFillColor(10);
202  SetStatColor(10);
203  return;
204  }
205  if (strcmp(style_name,"Video") == 0) {
206  // Author: Art Poskanzer, LBNL, Oct. 1999
207  SetPalette(1,0);
208  SetCanvasColor(10);
211  SetFrameFillColor(10);
212  SetPadColor(10);
213  SetPadTickX(1);
214  SetPadTickY(1);
215  SetPadBottomMargin(0.2);
216  SetPadLeftMargin(0.2);
217  SetHistLineWidth(8);
219  SetLabelSize(0.06,"xyz");
220  SetLabelColor(kBlue,"xyz");
221  SetTitleSize(0.08,"xyz");
222  SetTitleFillColor(10);
224  SetStatColor(10);
225  SetFuncWidth(8);
227  SetLineWidth(3);
228  return;
229  }
230  if (strcmp(style_name,"Pub") == 0) {
231  // Authors: Art Poskanzer and Jim Thomas, LBNL, Oct. 2000
232  SetOptTitle(0);
233  SetOptStat(0);
234  SetPalette(8,0);
235  SetCanvasColor(10);
238  SetFrameFillColor(10);
239  SetPadColor(10);
240  SetPadTickX(1);
241  SetPadTickY(1);
242  SetPadBottomMargin(0.15);
243  SetPadLeftMargin(0.15);
244  SetHistLineWidth(3);
246  SetFuncWidth(3);
248  SetLineWidth(3);
249  SetLabelSize(0.05,"xyz");
250  SetLabelOffset(0.01,"y");
251  SetLabelColor(kBlack,"xyz");
252  SetTitleSize(0.06,"xyz");
253  SetTitleOffset(1.3,"y");
254  SetTitleFillColor(10);
256  return;
257  }
258 
259 }
260 
261 ////////////////////////////////////////////////////////////////////////////////
262 /// Destructor.
263 
265 {
267  gROOT->GetListOfStyles()->Remove(this);
268  if (gStyle == this) gStyle = (TStyle*)gROOT->GetListOfStyles()->Last();
269 }
270 
271 ////////////////////////////////////////////////////////////////////////////////
272 /// Copy constructor.
273 
274 TStyle::TStyle(const TStyle &style) : TNamed(style), TAttLine(style), TAttFill(style), TAttMarker(style), TAttText(style)
275 {
276  ((TStyle&)style).Copy(*this);
277 }
278 
279 ////////////////////////////////////////////////////////////////////////////////
280 /// Browse the style object.
281 
283 {
284  cd();
285 }
286 
287 ////////////////////////////////////////////////////////////////////////////////
288 /// Create some standard styles.
289 
291 {
292  TColor *col = new TColor(); // force the initialisation of fgPalette
293  new TStyle("Plain", "Plain Style (no colors/fill areas)");
294  new TStyle("Bold", "Bold Style");;
295  new TStyle("Video", "Style for video presentation histograms");
296  new TStyle("Pub", "Style for Publications");
297  new TStyle("Classic","Classic Style");
298  new TStyle("Default","Equivalent to Classic");
299  new TStyle("Modern", "Modern Style");
300  delete col;
301 }
302 
303 ////////////////////////////////////////////////////////////////////////////////
304 /// Change current style.
305 
307 {
308  gStyle = this;
309 }
310 
311 ////////////////////////////////////////////////////////////////////////////////
312 /// Copy this style.
313 
314 void TStyle::Copy(TObject &obj) const
315 {
316  TAttLine::Copy(((TStyle&)obj));
317  TAttFill::Copy(((TStyle&)obj));
318  TAttMarker::Copy(((TStyle&)obj));
319  TAttText::Copy(((TStyle&)obj));
320  fXaxis.Copy(((TStyle&)obj).fXaxis);
321  fYaxis.Copy(((TStyle&)obj).fYaxis);
322  fZaxis.Copy(((TStyle&)obj).fZaxis);
323  fAttDate.Copy(((TStyle&)obj).fAttDate);
324  ((TStyle&)obj).fIsReading = fIsReading;
325  ((TStyle&)obj).fScreenFactor = fScreenFactor;
326  ((TStyle&)obj).fCanvasPreferGL = fCanvasPreferGL;
327  ((TStyle&)obj).fCanvasColor = fCanvasColor;
328  ((TStyle&)obj).fCanvasBorderSize = fCanvasBorderSize;
329  ((TStyle&)obj).fCanvasBorderMode = fCanvasBorderMode;
330  ((TStyle&)obj).fCanvasDefH = fCanvasDefH;
331  ((TStyle&)obj).fCanvasDefW = fCanvasDefW;
332  ((TStyle&)obj).fCanvasDefX = fCanvasDefX;
333  ((TStyle&)obj).fCanvasDefY = fCanvasDefY;
334  ((TStyle&)obj).fPadColor = fPadColor;
335  ((TStyle&)obj).fPadBorderSize = fPadBorderSize;
336  ((TStyle&)obj).fPadBorderMode = fPadBorderMode;
337  ((TStyle&)obj).fPadBottomMargin = fPadBottomMargin;
338  ((TStyle&)obj).fPadTopMargin = fPadTopMargin;
339  ((TStyle&)obj).fPadLeftMargin = fPadLeftMargin;
340  ((TStyle&)obj).fPadRightMargin = fPadRightMargin;
341  ((TStyle&)obj).fPadGridX = fPadGridX;
342  ((TStyle&)obj).fPadGridY = fPadGridY;
343  ((TStyle&)obj).fPadTickX = fPadTickX;
344  ((TStyle&)obj).fPadTickY = fPadTickY;
345  ((TStyle&)obj).fPaperSizeX = fPaperSizeX;
346  ((TStyle&)obj).fPaperSizeY = fPaperSizeY;
347  ((TStyle&)obj).fFuncColor = fFuncColor;
348  ((TStyle&)obj).fFuncStyle = fFuncStyle;
349  ((TStyle&)obj).fFuncWidth = fFuncWidth;
350  ((TStyle&)obj).fGridColor = fGridColor;
351  ((TStyle&)obj).fGridStyle = fGridStyle;
352  ((TStyle&)obj).fGridWidth = fGridWidth;
353  ((TStyle&)obj).fHatchesSpacing = fHatchesSpacing;
354  ((TStyle&)obj).fHatchesLineWidth = fHatchesLineWidth;
355  ((TStyle&)obj).fFrameFillColor = fFrameFillColor;
356  ((TStyle&)obj).fFrameFillStyle = fFrameFillStyle;
357  ((TStyle&)obj).fFrameLineColor = fFrameLineColor;
358  ((TStyle&)obj).fFrameLineStyle = fFrameLineStyle;
359  ((TStyle&)obj).fFrameLineWidth = fFrameLineWidth;
360  ((TStyle&)obj).fFrameBorderSize = fFrameBorderSize;
361  ((TStyle&)obj).fFrameBorderMode = fFrameBorderMode;
362  ((TStyle&)obj).fHistFillColor = fHistFillColor;
363  ((TStyle&)obj).fHistFillStyle = fHistFillStyle;
364  ((TStyle&)obj).fHistLineColor = fHistLineColor;
365  ((TStyle&)obj).fHistLineStyle = fHistLineStyle;
366  ((TStyle&)obj).fHistLineWidth = fHistLineWidth;
367  ((TStyle&)obj).fHistMinimumZero = fHistMinimumZero;
368  ((TStyle&)obj).fHistTopMargin = fHistTopMargin;
369  ((TStyle&)obj).fBarWidth = fBarWidth;
370  ((TStyle&)obj).fBarOffset = fBarOffset;
371  ((TStyle&)obj).fDrawBorder = fDrawBorder;
372  ((TStyle&)obj).fOptLogx = fOptLogx;
373  ((TStyle&)obj).fOptLogy = fOptLogy;
374  ((TStyle&)obj).fOptLogz = fOptLogz;
375  ((TStyle&)obj).fOptDate = fOptDate;
376  ((TStyle&)obj).fOptFit = fOptFit;
377  ((TStyle&)obj).fOptStat = fOptStat;
378  ((TStyle&)obj).fOptTitle = fOptTitle;
379  ((TStyle&)obj).fEndErrorSize = fEndErrorSize;
380  ((TStyle&)obj).fErrorX = fErrorX;
381  ((TStyle&)obj).fStatColor = fStatColor;
382  ((TStyle&)obj).fStatTextColor = fStatTextColor;
383  ((TStyle&)obj).fStatBorderSize = fStatBorderSize;
384  ((TStyle&)obj).fStatFont = fStatFont;
385  ((TStyle&)obj).fStatFontSize = fStatFontSize;
386  ((TStyle&)obj).fStatStyle = fStatStyle;
387  ((TStyle&)obj).fStatFormat = fStatFormat;
388  ((TStyle&)obj).fStatW = fStatW;
389  ((TStyle&)obj).fStatH = fStatH ;
390  ((TStyle&)obj).fStatX = fStatX;
391  ((TStyle&)obj).fStatY = fStatY;
392  ((TStyle&)obj).fTitleAlign = fTitleAlign;
393  ((TStyle&)obj).fTitleColor = fTitleColor;
394  ((TStyle&)obj).fTitleTextColor = fTitleTextColor;
395  ((TStyle&)obj).fTitleFont = fTitleFont;
396  ((TStyle&)obj).fTitleFontSize = fTitleFontSize;
397  ((TStyle&)obj).fTitleStyle = fTitleStyle;
398  ((TStyle&)obj).fTitleBorderSize = fTitleBorderSize;
399  ((TStyle&)obj).fTitleW = fTitleW;
400  ((TStyle&)obj).fTitleH = fTitleH;
401  ((TStyle&)obj).fTitleX = fTitleX;
402  ((TStyle&)obj).fTitleY = fTitleY;
403  ((TStyle&)obj).fDateX = fDateX;
404  ((TStyle&)obj).fDateY = fDateY;
405  ((TStyle&)obj).fFitFormat = fFitFormat;
406  ((TStyle&)obj).fPaintTextFormat = fPaintTextFormat;
407  ((TStyle&)obj).fShowEventStatus = fShowEventStatus;
408  ((TStyle&)obj).fShowEditor = fShowEditor;
409  ((TStyle&)obj).fShowToolBar = fShowToolBar;
410  ((TStyle&)obj).fLegoInnerR = fLegoInnerR;
411  ((TStyle&)obj).fStripDecimals = fStripDecimals;
412  ((TStyle&)obj).fNumberContours = fNumberContours;
413  ((TStyle&)obj).fLegendBorderSize = fLegendBorderSize;
414  ((TStyle&)obj).fLegendFillColor = fLegendFillColor;
415  ((TStyle&)obj).fLegendFont = fLegendFont;
416  ((TStyle&)obj).fLegendTextSize = fLegendTextSize;
417 
418  Int_t i;
419  for (i=0;i<30;i++) {
420  ((TStyle&)obj).fLineStyle[i] = fLineStyle[i];
421  }
422  ((TStyle&)obj).fHeaderPS = fHeaderPS;
423  ((TStyle&)obj).fTitlePS = fTitlePS;
424  ((TStyle&)obj).fLineScalePS = fLineScalePS;
425  ((TStyle&)obj).fJoinLinePS = fJoinLinePS;
426  ((TStyle&)obj).fColorModelPS = fColorModelPS;
427  ((TStyle&)obj).fTimeOffset = fTimeOffset;
428 }
429 
430 ////////////////////////////////////////////////////////////////////////////////
431 /// Function used by the TStyle manager when drawing a canvas showing the
432 /// current style.
433 
435 {
436  gPad->SetSelected(this);
437  return 0;
438 }
439 
440 ////////////////////////////////////////////////////////////////////////////////
441 /// Reset.
442 
444 {
445  fIsReading = kTRUE;
450  SetFillStyle(1001);
451  SetFillColor(19);
452  fXaxis.ResetAttAxis("X");
453  fYaxis.ResetAttAxis("Y");
454  fZaxis.ResetAttAxis("Z");
455  if (gEnv) fCanvasPreferGL = gEnv->GetValue("OpenGL.CanvasPreferGL",0);
456  else fCanvasPreferGL = kFALSE;
457  fCanvasColor = 19;
460  fCanvasDefH = 500;
461  fCanvasDefW = 700;
462  fCanvasDefX = 10;
463  fCanvasDefY = 10;
467  fPadBottomMargin= 0.1;
468  fPadTopMargin = 0.1;
469  fPadLeftMargin = 0.1;
470  fPadRightMargin = 0.1;
471  fPadGridX = kFALSE;
472  fPadGridY = kFALSE;
473  fPadTickX = 0;
474  fPadTickY = 0;
475  fFuncColor = 1;
476  fFuncStyle = 1;
477  fFuncWidth = 3;
478  fGridColor = 0;
479  fGridStyle = 3;
480  fGridWidth = 1;
481  fHatchesSpacing = 1;
482  fHatchesLineWidth = 1;
483  fHistLineColor = 1;
484  fHistFillColor = 0;
485  fHistFillStyle = 1001;
486  fHistLineStyle = 1;
487  fHistLineWidth = 1;
489  fHistTopMargin = 0.05;
490  fFrameLineColor = 1;
491  fFrameFillColor = 0;
492  fFrameFillStyle = 1001;
493  fFrameLineStyle = 1;
494  fFrameLineWidth = 1;
495  fFrameBorderSize= 1;
496  fFrameBorderMode= 1;
497  fBarWidth = 1;
498  fBarOffset = 0;
499  fDrawBorder = 0;
500  fOptLogx = 0;
501  fOptLogy = 0;
502  fOptLogz = 0;
503  fOptDate = 0;
504  fOptFile = 0;
505  fOptFit = 0;
506  fOptStat = 1;
507  fOptTitle = 1;
508  fEndErrorSize = 2;
509  fErrorX = 0.5;
510  fScreenFactor = 1;
512  fStatTextColor = 1;
513  fStatBorderSize = 2;
514  fStatFont = 62;
515  fStatFontSize = 0;
516  fStatStyle = 1001;
517  fStatW = 0.20;
518  fStatH = 0.16;
519  fStatX = 0.98;
520  fStatY = 0.995;
521  SetStatFormat();
522  SetFitFormat();
524  fTitleAlign = 13;
526  fTitleTextColor = 1;
527  fTitleFont = 62;
528  fTitleFontSize = 0;
529  fTitleStyle = 1001;
530  fTitleBorderSize= 2;
531  fTitleW = 0;
532  fTitleH = 0;
533  fTitleX = 0.01;
534  fTitleY = 0.995;
535  fShowEventStatus= 0;
536  fShowEditor = 0;
537  fShowToolBar = 0;
538  fLegoInnerR = 0.5;
539  fHeaderPS = "";
540  fTitlePS = "";
542  fNumberContours = 20;
544  fLegendFont = 62;
545  fLegendTextSize = 0.,
546  fLegendFillColor = 0;
547 
548  SetDateX();
549  SetDateY();
550  fAttDate.SetTextSize(0.025);
552  SetLineScalePS();
553  SetJoinLinePS();
554  SetColorModelPS();
555  SetLineStyleString(1," ");
556  SetLineStyleString(2,"12 12");
557  SetLineStyleString(3,"4 8");
558  SetLineStyleString(4,"12 16 4 16");
559  SetLineStyleString(5,"20 12 4 12");
560  SetLineStyleString(6,"20 12 4 12 4 12 4 12");
561  SetLineStyleString(7,"20 20");
562  SetLineStyleString(8,"20 12 4 12 4 12");
563  SetLineStyleString(9,"80 20");
564  SetLineStyleString(10,"80 40 4 40");
565  for (Int_t i=11;i<30;i++) SetLineStyleString(i," ");
566 
567  SetPaperSize();
568 
569  SetPalette();
570 
571  fTimeOffset = 788918400; // UTC time at 01/01/95
572 
573  TString style_name = opt;
574 
575  if (strcmp(style_name,"Modern") == 0) {
576  // Modern style
580  SetCanvasColor(0);
581  SetPadBorderMode(0);
582  SetPadColor(0);
583  SetStatColor(0);
584  SetTitleFont(42,"");
585  SetLabelFont(42,"x");
586  SetTitleFont(42,"x");
587  SetLabelFont(42,"y");
588  SetTitleFont(42,"y");
589  SetLabelFont(42,"z");
590  SetTitleFont(42,"z");
591  SetStatFont(42);
592  SetLabelSize(0.035,"x");
593  SetTitleSize(0.035,"x");
594  SetLabelSize(0.035,"y");
595  SetTitleSize(0.035,"y");
596  SetLabelSize(0.035,"z");
597  SetTitleSize(0.035,"z");
598  SetTitleSize(0.050,"");
599  SetTitleAlign(23);
600  SetTitleX(0.5);
603  SetTitleStyle(0);
604  SetTitleOffset(0.,"Y");
606  SetOptStat(1111);
607  SetStatY(0.935);
611  SetLegendFont(42);
612  SetLegendTextSize(0.);
613  SetFuncWidth(2);
614  SetFuncColor(2);
615  }
616  if (strcmp(style_name,"Plain") == 0) {
619  SetPadBorderMode(0);
620  SetPadColor(0);
621  SetCanvasColor(0);
624  SetStatColor(0);
627  return;
628  }
629  if (strcmp(style_name,"Bold") == 0) {
630  SetPalette(1,0);
631  SetCanvasColor(10);
634  SetFrameFillColor(10);
635  SetPadColor(10);
636  SetPadTickX(1);
637  SetPadTickY(1);
638  SetPadBottomMargin(0.15);
639  SetPadLeftMargin(0.15);
640  SetHistLineWidth(3);
642  SetFuncWidth(3);
644  SetLineWidth(3);
645  SetLabelSize(0.05,"xyz");
646  SetLabelOffset(0.01,"y");
647  SetLabelColor(kBlue,"xy");
648  SetTitleSize(0.06,"xyz");
649  SetTitleOffset(1.3,"Y");
650  SetTitleFillColor(10);
652  SetStatColor(10);
653  return;
654  }
655  if (strcmp(style_name,"Video") == 0) {
656  SetPalette(1,0);
657  SetCanvasColor(10);
660  SetFrameFillColor(10);
661  SetPadColor(10);
662  SetPadTickX(1);
663  SetPadTickY(1);
664  SetPadBottomMargin(0.2);
665  SetPadLeftMargin(0.2);
666  SetHistLineWidth(8);
668  SetLabelSize(0.06,"xyz");
669  SetLabelColor(kBlue,"xyz");
670  SetTitleSize(0.08,"xyz");
671  SetTitleFillColor(10);
673  SetStatColor(10);
674  SetFuncWidth(8);
676  SetLineWidth(3);
677  return;
678  }
679  if (strcmp(style_name,"Pub") == 0) {
680  SetOptTitle(0);
681  SetOptStat(0);
682  SetPalette(8,0);
683  SetCanvasColor(10);
686  SetFrameFillColor(10);
687  SetPadColor(10);
688  SetPadTickX(1);
689  SetPadTickY(1);
690  SetPadBottomMargin(0.15);
691  SetPadLeftMargin(0.15);
692  SetHistLineWidth(3);
694  SetFuncWidth(3);
696  SetLineWidth(3);
697  SetLabelSize(0.05,"xyz");
698  SetLabelOffset(0.01,"y");
699  SetLabelColor(kBlack,"xyz");
700  SetTitleSize(0.06,"xyz");
701  SetTitleOffset(1.3,"y");
702  SetTitleFillColor(10);
704  return;
705  }
706 }
707 
708 ////////////////////////////////////////////////////////////////////////////////
709 /// Return number of divisions.
710 
712 {
713  Int_t ax = AxisChoice(axis);
714  if (ax == 1) return fXaxis.GetNdivisions();
715  if (ax == 2) return fYaxis.GetNdivisions();
716  if (ax == 3) return fZaxis.GetNdivisions();
717  return 0;
718 }
719 
720 ////////////////////////////////////////////////////////////////////////////////
721 /// Return the axis color number in the axis.
722 
724 {
725  Int_t ax = AxisChoice(axis);
726  if (ax == 1) return fXaxis.GetAxisColor();
727  if (ax == 2) return fYaxis.GetAxisColor();
728  if (ax == 3) return fZaxis.GetAxisColor();
729  return 0;
730 }
731 
732 ////////////////////////////////////////////////////////////////////////////////
733 /// Return color number i in current palette.
734 
736 {
737  return TColor::GetColorPalette(i);
738 }
739 
740 ////////////////////////////////////////////////////////////////////////////////
741 /// Return the label color number in the axis.
742 
744 {
745  Int_t ax = AxisChoice(axis);
746  if (ax == 1) return fXaxis.GetLabelColor();
747  if (ax == 2) return fYaxis.GetLabelColor();
748  if (ax == 3) return fZaxis.GetLabelColor();
749  return 0;
750 }
751 
752 ////////////////////////////////////////////////////////////////////////////////
753 /// Return label font.
754 
756 {
757  Int_t ax = AxisChoice(axis);
758  if (ax == 1) return fXaxis.GetLabelFont();
759  if (ax == 2) return fYaxis.GetLabelFont();
760  if (ax == 3) return fZaxis.GetLabelFont();
761  return 0;
762 }
763 
764 ////////////////////////////////////////////////////////////////////////////////
765 /// Return label offset.
766 
768 {
769  Int_t ax = AxisChoice(axis);
770  if (ax == 1) return fXaxis.GetLabelOffset();
771  if (ax == 2) return fYaxis.GetLabelOffset();
772  if (ax == 3) return fZaxis.GetLabelOffset();
773  return 0;
774 }
775 
776 ////////////////////////////////////////////////////////////////////////////////
777 /// Return label size.
778 
780 {
781  Int_t ax = AxisChoice(axis);
782  if (ax == 1) return fXaxis.GetLabelSize();
783  if (ax == 2) return fYaxis.GetLabelSize();
784  if (ax == 3) return fZaxis.GetLabelSize();
785  return 0;
786 }
787 
788 ////////////////////////////////////////////////////////////////////////////////
789 /// Return line style string (used by PostScript).
790 /// See SetLineStyleString for more explanations
791 
792 const char *TStyle::GetLineStyleString(Int_t i) const
793 {
794  if (i < 1 || i > 29) return fLineStyle[0].Data();
795  return fLineStyle[i].Data();
796 }
797 
798 ////////////////////////////////////////////////////////////////////////////////
799 /// Return number of colors in the color palette.
800 
802 {
803  return TColor::GetNumberOfColors();
804 }
805 
806 
807 ////////////////////////////////////////////////////////////////////////////////
808 /// Set paper size for PostScript output.
809 
810 void TStyle::GetPaperSize(Float_t &xsize, Float_t &ysize) const
811 {
812  xsize = fPaperSizeX;
813  ysize = fPaperSizeY;
814 }
815 
816 ////////////////////////////////////////////////////////////////////////////////
817 /// Return tick length.
818 
820 {
821  Int_t ax = AxisChoice(axis);
822  if (ax == 1) return fXaxis.GetTickLength();
823  if (ax == 2) return fYaxis.GetTickLength();
824  if (ax == 3) return fZaxis.GetTickLength();
825  return 0;
826 }
827 
828 ////////////////////////////////////////////////////////////////////////////////
829 /// Return title color.
830 
832 {
833  Int_t ax = AxisChoice(axis);
834  if (ax == 1) return fXaxis.GetTitleColor();
835  if (ax == 2) return fYaxis.GetTitleColor();
836  if (ax == 3) return fZaxis.GetTitleColor();
837  return fTitleTextColor;
838 }
839 
840 ////////////////////////////////////////////////////////////////////////////////
841 /// Return title font.
842 
844 {
845  Int_t ax = AxisChoice(axis);
846  if (ax == 1) return fXaxis.GetTitleFont();
847  if (ax == 2) return fYaxis.GetTitleFont();
848  if (ax == 3) return fZaxis.GetTitleFont();
849  return fTitleFont;
850 }
851 
852 ////////////////////////////////////////////////////////////////////////////////
853 /// Return title offset.
854 
856 {
857  Int_t ax = AxisChoice(axis);
858  if (ax == 1) return fXaxis.GetTitleOffset();
859  if (ax == 2) return fYaxis.GetTitleOffset();
860  if (ax == 3) return fZaxis.GetTitleOffset();
861  return 0;
862 }
863 
864 ////////////////////////////////////////////////////////////////////////////////
865 /// Return title size.
866 
868 {
869  Int_t ax = AxisChoice(axis);
870  if (ax == 1) return fXaxis.GetTitleSize();
871  if (ax == 2) return fYaxis.GetTitleSize();
872  if (ax == 3) return fZaxis.GetTitleSize();
873  return fTitleFontSize;
874 }
875 
876 ////////////////////////////////////////////////////////////////////////////////
877 /// Show the options from the current style
878 
879 void TStyle::Paint(Option_t *option)
880 {
881  gROOT->ProcessLine(Form("TStyleManager::PaintStyle((TStyle*)0x%lx,\"%s\")",
882  (ULong_t)this,option));
883 }
884 
885 ////////////////////////////////////////////////////////////////////////////////
886 /// Define the color model used by TPostScript and TPDF (RGB or CMYK).
887 /// CMY and CMYK models are subtractive color models unlike RGB which is
888 /// additive. They are mainly used for printing purposes. CMY means Cyan Magenta
889 /// Yellow. To convert RGB to CMY it is enough to do: C=1-R, M=1-G and Y=1-B.
890 /// CMYK has one more component K (black). The conversion from RGB to CMYK is:
891 /// ~~~ {.cpp}
892 /// Double_t Black = TMath::Min(TMath::Min(1-Red,1-Green),1-Blue);
893 /// Double_t Cyan = (1-Red-Black)/(1-Black);
894 /// Double_t Magenta = (1-Green-Black)/(1-Black);
895 /// Double_t Yellow = (1-Blue-Black)/(1-Black);
896 /// ~~~
897 /// CMYK adds the black component which allows better quality for black
898 /// printing. PostScript and PDF support the CMYK model.
899 ///
900 /// - c = 0 means TPostScript and TPDF will use RGB color model (default)
901 /// - c = 1 means TPostScript and TPDF will use CMYK color model
902 
904 {
905  fColorModelPS = c;
906 }
907 
908 ////////////////////////////////////////////////////////////////////////////////
909 /// If the argument zero=kTRUE the minimum value for the Y axis of 1-d histograms
910 /// is set to 0.
911 ///
912 /// If the minimum bin content is greater than 0 and TH1::SetMinimum
913 /// has not been called.
914 /// Otherwise the minimum is based on the minimum bin content.
915 
917 {
918  fHistMinimumZero = zero;
919 }
920 
921 ////////////////////////////////////////////////////////////////////////////////
922 /// Set the number of divisions to draw an axis.
923 /// ndiv : Number of divisions.
924 /// ~~~ {.cpp}
925 /// n = N1 + 100*N2 + 10000*N3
926 /// N1=number of primary divisions.
927 /// N2=number of secondary divisions.
928 /// N3=number of 3rd divisions.
929 /// e.g.:
930 /// nndi=0 --> no tick marks.
931 /// nndi=2 --> 2 divisions, one tick mark in the middle
932 /// of the axis.
933 /// ~~~
934 /// axis specifies which axis ("x","y","z"), default = "x"
935 /// if axis="xyz" set all 3 axes
936 
938 {
939  TString opt = axis;
940  opt.ToLower();
941  if (opt.Contains("x")) fXaxis.SetNdivisions(n);
942  if (opt.Contains("y")) fYaxis.SetNdivisions(n);
943  if (opt.Contains("z")) fZaxis.SetNdivisions(n);
944 }
945 
946 ////////////////////////////////////////////////////////////////////////////////
947 /// Set color to draw the axis line and tick marks.
948 /// axis specifies which axis ("x","y","z"), default = "x"
949 /// if axis="xyz" set all 3 axes
950 
952 {
953  TString opt = axis;
954  opt.ToLower();
955 
956  if (opt.Contains("x")) fXaxis.SetAxisColor(color);
957  if (opt.Contains("y")) fYaxis.SetAxisColor(color);
958  if (opt.Contains("z")) fZaxis.SetAxisColor(color);
959 }
960 
961 ////////////////////////////////////////////////////////////////////////////////
962 /// Set the size (in pixels) of the small lines drawn at the
963 /// end of the error bars (TH1 or TGraphErrors).
964 ///
965 /// The default value is 2 pixels.
966 /// Set np=0 to remove these lines
967 
969 {
970  if (np >= 0) fEndErrorSize = np;
971  else fEndErrorSize = 0;
972 }
973 
974 ////////////////////////////////////////////////////////////////////////////////
975 /// Define a string to be inserted in the Postscript header.
976 ///
977 /// The string in header will be added to the Postscript file
978 /// immediately following the %%Page line
979 /// For example, this string may contain special Postscript instructions like
980 /// ~~~ {.cpp}
981 /// 200 200 translate
982 /// ~~~
983 /// the following header string will print the string "my annotation" at the
984 /// bottom left corner of the page (outside the user area)
985 /// ~~~ {.cpp}
986 /// "gsave 100 -100 t 0 r 0 0 m /Helvetica-Bold findfont 56 sf 0 0 m ( my annotation ) show gr"
987 /// ~~~
988 /// This information is used in TPostScript::Initialize
989 
990 void TStyle::SetHeaderPS(const char *header)
991 {
992  fHeaderPS = header;
993 }
994 
995 ////////////////////////////////////////////////////////////////////////////////
996 /// Sets the `fIsReading` member to reading (default=kTRUE).
997 ///
998 /// `fIsReading` (used via `gStyle->IsReading()`) can be used in
999 /// the functions `myclass::UseCurrentStyle` to read from the current style
1000 /// or write to the current style
1001 
1003 {
1004  fIsReading = reading;
1005 }
1006 
1007 ////////////////////////////////////////////////////////////////////////////////
1008 /// Define a string to be used in the %%Title of the Postscript files.
1009 /// If this string is not defined, ROOT will use the canvas title.
1010 
1011 void TStyle::SetTitlePS(const char *pstitle)
1012 {
1013  fTitlePS = pstitle;
1014 }
1015 
1016 ////////////////////////////////////////////////////////////////////////////////
1017 /// Set axis labels color.
1018 /// axis specifies which axis ("x","y","z"), default = "x"
1019 /// if axis="xyz" set all 3 axes
1020 
1022 {
1023  TString opt = axis;
1024  opt.ToLower();
1025 
1026  if (opt.Contains("x")) fXaxis.SetLabelColor(color);
1027  if (opt.Contains("y")) fYaxis.SetLabelColor(color);
1028  if (opt.Contains("z")) fZaxis.SetLabelColor(color);
1029 }
1030 
1031 ////////////////////////////////////////////////////////////////////////////////
1032 /// Set font number used to draw axis labels.
1033 /// - font : Text font code = 10*fontnumber + precision
1034 /// - Font numbers must be between 1 and 14
1035 /// - precision = 1 fast hardware fonts (steps in the size)
1036 /// - precision = 2 scalable and rotatable hardware fonts
1037 /// The default font number is 62.
1038 /// axis specifies which axis ("x","y","z"), default = "x"
1039 /// if axis="xyz" set all 3 axes
1040 
1042 {
1043  TString opt = axis;
1044  opt.ToLower();
1045 
1046  if (opt.Contains("x")) fXaxis.SetLabelFont(font);
1047  if (opt.Contains("y")) fYaxis.SetLabelFont(font);
1048  if (opt.Contains("z")) fZaxis.SetLabelFont(font);
1049 }
1050 
1051 ////////////////////////////////////////////////////////////////////////////////
1052 /// Set offset between axis and axis labels.
1053 /// The offset is expressed as a percent of the pad height.
1054 /// axis specifies which axis ("x","y","z"), default = "x"
1055 /// if axis="xyz" set all 3 axes
1056 
1058 {
1059  TString opt = axis;
1060  opt.ToLower();
1061 
1062  if (opt.Contains("x")) fXaxis.SetLabelOffset(offset);
1063  if (opt.Contains("y")) fYaxis.SetLabelOffset(offset);
1064  if (opt.Contains("z")) fZaxis.SetLabelOffset(offset);
1065 }
1066 
1067 ////////////////////////////////////////////////////////////////////////////////
1068 /// Set size of axis labels. The size is expressed as a percent of the pad height.
1069 /// axis specifies which axis ("x","y","z"), default = "x"
1070 /// if axis="xyz" set all 3 axes
1071 
1073 {
1074  TString opt = axis;
1075  opt.ToLower();
1076 
1077  if (opt.Contains("x")) fXaxis.SetLabelSize(size);
1078  if (opt.Contains("y")) fYaxis.SetLabelSize(size);
1079  if (opt.Contains("z")) fZaxis.SetLabelSize(size);
1080 }
1081 
1082 ////////////////////////////////////////////////////////////////////////////////
1083 /// Set line style string using the PostScript convention.
1084 /// A line is a suite of segments, each segment is described by the number of
1085 /// pixels. The initial and alternating elements (second, fourth, and so on)
1086 /// are the dashes, and the others spaces between dashes.
1087 ///
1088 /// Default fixed line styles are pre-defined as:
1089 /// ~~~ {.cpp}
1090 /// linestyle 1 "[]" solid
1091 /// linestyle 2 "[12 12]" dashed
1092 /// linestyle 3 "[4 8]" dotted
1093 /// linestyle 4 "[12 16 4 16]" dash-dotted
1094 /// ~~~
1095 /// For example the following lines define the line style 5 to 9.
1096 /// ~~~ {.cpp}
1097 /// gStyle->SetLineStyleString(5,"20 12 4 12");
1098 /// gStyle->SetLineStyleString(6,"20 12 4 12 4 12 4 12");
1099 /// gStyle->SetLineStyleString(7,"20 20");
1100 /// gStyle->SetLineStyleString(8,"20 12 4 12 4 12");
1101 /// gStyle->SetLineStyleString(9,"80 20");
1102 /// ~~~
1103 /// \image html base_linestyle.png
1104 /// Note:
1105 /// - Up to 30 different styles may be defined.
1106 /// - The opening and closing brackets may be omitted
1107 /// - It is recommended to use 4 as the smallest segment length and multiple of
1108 /// 4 for other lengths.
1109 /// - The line style 1 to 10 are predefined. 1 to 4 cannot be changed.
1110 
1112 {
1113 
1114  char *l;
1115  Int_t nch = strlen(text);
1116  char *st = new char[nch+10];
1117  snprintf(st,nch+10," ");
1118  strlcat(st,text,nch+10);
1119  l = strstr(st,"["); if (l) l[0] = ' ';
1120  l = strstr(st,"]"); if (l) l[0] = ' ';
1121  if (i >= 1 && i <= 29) fLineStyle[i] = st;
1122  delete [] st;
1123 }
1124 
1125 ////////////////////////////////////////////////////////////////////////////////
1126 /// Set the default number of contour levels when drawing 2-d plots.
1127 
1129 {
1130  if (number > 0 && number < 1000) {
1131  fNumberContours = number;
1132  return;
1133  }
1134 
1135  Error("SetNumberContours","Illegal number of contours: %d, must be > 0 and < 1000",number);
1136 }
1137 
1138 ////////////////////////////////////////////////////////////////////////////////
1139 /// If optdate is non null, the current date/time will be printed in the canvas.
1140 /// The position of the date string can be controlled by:
1141 /// optdate = 10*format + mode
1142 /// - mode = 1 (default) date is printed in the bottom/left corner.
1143 /// - mode = 2 date is printed in the bottom/right corner.
1144 /// - mode = 3 date is printed in the top/right corner.
1145 /// - format = 0 (default) date has the format like: "Wed Sep 25 17:10:35 2002"
1146 /// - format = 1 date has the format like: "2002-09-25"
1147 /// - format = 2 date has the format like: "2002-09-25 17:10:35"
1148 ///
1149 /// examples:
1150 /// - optdate = 1 date like "Wed Sep 25 17:10:35 2002" in the bottom/left corner.
1151 /// - optdate = 13 date like "2002-09-25" in the top/right corner.
1152 ///
1153 /// The date position can also be controlled by:
1154 /// gStyle->SetDateX(x); x in NDC
1155 /// gStyle->SetDateY(y); y in NDC
1156 ///
1157 /// The date text attributes can be changed with:
1158 /// ~~~ {.cpp}
1159 /// gStyle->GetAttDate()->SetTextFont(font=62);
1160 /// gStyle->GetAttDate()->SetTextSize(size=0.025);
1161 /// gStyle->GetAttDate()->SetTextAngle(angle=0);
1162 /// gStyle->GetAttDate()->SetTextAlign(align=11);
1163 /// gStyle->GetAttDate()->SetTextColor(color=1);
1164 /// ~~~
1165 /// The current date attributes can be obtained via:
1166 /// ~~~ {.cpp}
1167 /// gStyle->GetAttDate()->GetTextxxxx();
1168 /// ~~~
1169 /// When the date option is active, a text object is created when the pad
1170 /// paint its list of primitives. The text object is named "DATE".
1171 /// The DATE attributes can also be edited interactively (position
1172 /// and attributes) via the normal context menu.
1173 
1175 {
1176  fOptDate = optdate;
1177  Int_t mode = optdate%10;
1178  if (mode == 1) {
1179  SetDateX(0.01);
1180  SetDateY(0.01);
1181  fAttDate.SetTextAlign(11);
1182  }
1183  if (mode == 2) {
1184  SetDateX(0.99);
1185  SetDateY(0.01);
1186  fAttDate.SetTextAlign(31);
1187  }
1188  if (mode == 3) {
1189  SetDateX(0.99);
1190  SetDateY(0.99);
1191  fAttDate.SetTextAlign(33);
1192  }
1193 }
1194 
1195 ////////////////////////////////////////////////////////////////////////////////
1196 /// The type of information about fit parameters printed in the histogram
1197 /// statistics box can be selected via the parameter `mode`.
1198 /// The parameter mode can be = `pcev`:
1199 /// - p = 1; print Probability
1200 /// - c = 1; print Chisquare/Number of degrees of freedom
1201 /// - e = 1; print errors (if e=1, v must be 1)
1202 /// - v = 1; print name/values of parameters
1203 /// Example: `gStyle->SetOptFit(1011);`
1204 /// print fit probability, parameter names/values and errors.
1205 /// - When "v"=1 is specified, only the non-fixed parameters are shown.
1206 /// - When "v"=2 all parameters are shown.
1207 ///
1208 /// #### Notes:
1209 /// - `gStyle->SetOptFit(1)` is a shortcut allowing to set the most common
1210 /// case and is equivalent to `gStyle->SetOptFit(111)`
1211 /// - At ROOT startup the option fit is set to `0`. So, to see the fit parameters
1212 /// on all plot resulting from a fit, a call to `gStyle->SetOptFit()` with a
1213 /// non null value should be done. One can put it in the `rootlogon.C` file to
1214 /// always have it.
1215 ///
1216 /// see also SetOptStat below.
1217 
1219 {
1220  fOptFit = mode;
1221  if (gPad) {
1222  TObject *obj;
1223  TIter next(gPad->GetListOfPrimitives());
1224  while ((obj = next())) {
1225  TObject *stats = obj->FindObject("stats");
1226  if (stats) stats->SetBit(kTakeStyle);
1227  }
1228  gPad->Modified(); gPad->Update();
1229  }
1230 }
1231 
1232 ////////////////////////////////////////////////////////////////////////////////
1233 /// The type of information printed in the histogram statistics box
1234 /// can be selected via the parameter mode.
1235 /// The parameter mode can be = `ksiourmen`
1236 /// - k = 1; kurtosis printed
1237 /// - k = 2; kurtosis and kurtosis error printed
1238 /// - s = 1; skewness printed
1239 /// - s = 2; skewness and skewness error printed
1240 /// - i = 1; integral of bins printed
1241 /// - i = 2; integral of bins with option "width" printed
1242 /// - o = 1; number of overflows printed
1243 /// - u = 1; number of underflows printed
1244 /// - r = 1; rms printed
1245 /// - r = 2; rms and rms error printed
1246 /// - m = 1; mean value printed
1247 /// - m = 2; mean and mean error values printed
1248 /// - e = 1; number of entries printed
1249 /// - n = 1; name of histogram is printed
1250 ///
1251 /// Example: `gStyle->SetOptStat(11);`
1252 /// print only name of histogram and number of entries.
1253 /// `gStyle->SetOptStat(1101);` displays the name of histogram, mean value and RMS.
1254 ///
1255 /// #### Notes:
1256 ///
1257 /// - never call `SetOptStat(000111);` but `SetOptStat(1111)`, 0001111 will
1258 /// be taken as an octal number !!
1259 /// - `SetOptStat(1)` is s shortcut allowing to set the most common case, and is
1260 /// taken as `SetOptStat(1111)` (for backward compatibility with older versions.
1261 /// If you want to print only the name of the histogram call `SetOptStat(1000000001)`.
1262 /// - that in case of 2-D histograms, when selecting just underflow (10000)
1263 /// or overflow (100000), the stats box will show all combinations
1264 /// of underflow/overflows and not just one single number!
1265 
1267 {
1268  fOptStat = mode;
1269  if (gPad) {
1270  TObject *obj;
1271  TIter next(gPad->GetListOfPrimitives());
1272  while ((obj = next())) {
1273  TObject *stats = obj->FindObject("stats");
1274  if (stats) stats->SetBit(kTakeStyle);
1275  }
1276  gPad->Modified(); gPad->Update();
1277  }
1278 }
1279 
1280 ////////////////////////////////////////////////////////////////////////////////
1281 /// The parameter mode can be any combination of kKsSiourRmMen
1282 /// - k : kurtosis printed
1283 /// - K : kurtosis and kurtosis error printed
1284 /// - s : skewness printed
1285 /// - S : skewness and skewness error printed
1286 /// - i : integral of bins printed
1287 /// - I : integral of bins with option "width" printed
1288 /// - o : number of overflows printed
1289 /// - u : number of underflows printed
1290 /// - r : rms printed
1291 /// - R : rms and rms error printed
1292 /// - m : mean value printed
1293 /// - M : mean value mean error values printed
1294 /// - e : number of entries printed
1295 /// - n : name of histogram is printed
1296 ///
1297 /// Example: `gStyle->SetOptStat("ne");`
1298 /// print only name of histogram and number of entries.
1299 ///
1300 /// - `gStyle->SetOptStat("n")` print only the name of the histogram
1301 /// - `gStyle->SetOptStat("nemr")` is the default
1302 
1304 {
1305  Int_t mode=0;
1306 
1307  TString opt = stat;
1308 
1309  if (opt.Contains("n")) mode+=1;
1310  if (opt.Contains("e")) mode+=10;
1311  if (opt.Contains("m")) mode+=100;
1312  if (opt.Contains("M")) mode+=200;
1313  if (opt.Contains("r")) mode+=1000;
1314  if (opt.Contains("R")) mode+=2000;
1315  if (opt.Contains("u")) mode+=10000;
1316  if (opt.Contains("o")) mode+=100000;
1317  if (opt.Contains("i")) mode+=1000000;
1318  if (opt.Contains("I")) mode+=2000000;
1319  if (opt.Contains("s")) mode+=10000000;
1320  if (opt.Contains("S")) mode+=20000000;
1321  if (opt.Contains("k")) mode+=100000000;
1322  if (opt.Contains("K")) mode+=200000000;
1323  if (mode == 1) mode = 1000000001;
1324 
1325  SetOptStat(mode);
1326 }
1327 
1328 ////////////////////////////////////////////////////////////////////////////////
1329 /// Set paper size for PostScript output.
1330 
1332 {
1333  switch (size) {
1334  case kA4:
1335  SetPaperSize(20, 26);
1336  break;
1337  case kUSLetter:
1338  SetPaperSize(20, 24);
1339  break;
1340  default:
1341  Error("SetPaperSize", "illegal paper size %d\n", (int)size);
1342  break;
1343  }
1344 }
1345 
1346 ////////////////////////////////////////////////////////////////////////////////
1347 /// Set paper size for PostScript output.
1348 /// The paper size is specified in centimeters. Default is 20x26.
1349 /// See also TPad::Print
1350 
1352 {
1353  fPaperSizeX = xsize;
1354  fPaperSizeY = ysize;
1355 }
1356 
1357 ////////////////////////////////////////////////////////////////////////////////
1358 /// Set the tick marks length for an axis.
1359 /// axis specifies which axis ("x","y","z"), default = "x"
1360 /// if axis="xyz" set all 3 axes
1361 
1363 {
1364  TString opt = axis;
1365  opt.ToLower();
1366 
1367  if (opt.Contains("x")) fXaxis.SetTickLength(length);
1368  if (opt.Contains("y")) fYaxis.SetTickLength(length);
1369  if (opt.Contains("z")) fZaxis.SetTickLength(length);
1370 }
1371 
1372 ////////////////////////////////////////////////////////////////////////////////
1373 /// - if axis =="x" set the X axis title color
1374 /// - if axis =="y" set the Y axis title color
1375 /// - if axis =="z" set the Z axis title color
1376 ///
1377 /// any other value of axis will set the pad title color
1378 ///
1379 /// if axis="xyz" set all 3 axes
1380 
1382 {
1383  TString opt = axis;
1384  opt.ToLower();
1385 
1386  Bool_t set = kFALSE;
1387  if (opt.Contains("x")) {fXaxis.SetTitleColor(color); set = kTRUE;}
1388  if (opt.Contains("y")) {fYaxis.SetTitleColor(color); set = kTRUE;}
1389  if (opt.Contains("z")) {fZaxis.SetTitleColor(color); set = kTRUE;}
1390  if (!set) fTitleColor = color;
1391 }
1392 
1393 ////////////////////////////////////////////////////////////////////////////////
1394 /// - if axis =="x" set the X axis title font
1395 /// - if axis =="y" set the Y axis title font
1396 /// - if axis =="z" set the Z axis title font
1397 ///
1398 /// any other value of axis will set the pad title font
1399 ///
1400 /// if axis="xyz" set all 3 axes
1401 
1403 {
1404  TString opt = axis;
1405  opt.ToLower();
1406 
1407  Bool_t set = kFALSE;
1408  if (opt.Contains("x")) {fXaxis.SetTitleFont(font); set = kTRUE;}
1409  if (opt.Contains("y")) {fYaxis.SetTitleFont(font); set = kTRUE;}
1410  if (opt.Contains("z")) {fZaxis.SetTitleFont(font); set = kTRUE;}
1411  if (!set) fTitleFont = font;
1412 }
1413 
1414 ////////////////////////////////////////////////////////////////////////////////
1415 /// Specify a parameter offset to control the distance between the axis
1416 /// and the axis title.
1417 ///
1418 /// - offset = 1 means : use the default distance
1419 /// - offset = 1.2 means: the distance will be 1.2*(default distance)
1420 /// - offset = 0.8 means: the distance will be 0.8*(default distance)
1421 ///
1422 /// axis specifies which axis ("x","y","z"), default = "x"
1423 /// if axis="xyz" set all 3 axes
1424 
1426 {
1427  TString opt = axis;
1428  opt.ToLower();
1429 
1430  if (opt.Contains("x")) fXaxis.SetTitleOffset(offset);
1431  if (opt.Contains("y")) fYaxis.SetTitleOffset(offset);
1432  if (opt.Contains("z")) fZaxis.SetTitleOffset(offset);
1433 }
1434 
1435 ////////////////////////////////////////////////////////////////////////////////
1436 /// - if axis =="x" set the X axis title size
1437 /// - if axis =="y" set the Y axis title size
1438 /// - if axis =="z" set the Z axis title size
1439 ///
1440 /// any other value of axis will set the pad title size
1441 ///
1442 /// if axis="xyz" set all 3 axes
1443 
1445 {
1446  TString opt = axis;
1447  opt.ToLower();
1448 
1449  Bool_t set = kFALSE;
1450  if (opt.Contains("x")) {fXaxis.SetTitleSize(size); set = kTRUE;}
1451  if (opt.Contains("y")) {fYaxis.SetTitleSize(size); set = kTRUE;}
1452  if (opt.Contains("z")) {fZaxis.SetTitleSize(size); set = kTRUE;}
1453  if (!set) fTitleFontSize = size;
1454 }
1455 
1456 ////////////////////////////////////////////////////////////////////////////////
1457 /// See TColor::SetPalette.
1458 
1460 {
1461  TColor::SetPalette(ncolors,colors,alpha);
1462 }
1463 
1464 ////////////////////////////////////////////////////////////////////////////////
1465 /// Change the time offset for time plotting.
1466 /// Times are expressed in seconds. The corresponding numbers usually have 9
1467 /// digits (or more if one takes into account fractions of seconds).
1468 /// Thus, since it is very inconvenient to plot very large numbers on a scale,
1469 /// one has to set an offset time that will be added to the axis beginning,
1470 /// in order to plot times correctly and conveniently. A convenient way to
1471 /// set the time offset is to use TDatime::Convert().
1472 ///
1473 /// By default the time offset is set to 788918400 which corresponds to
1474 /// 01/01/1995. This allows to have valid dates until 2072. The standard
1475 /// UNIX time offset in 1970 allows only valid dates until 2030.
1476 
1478 {
1479  fTimeOffset = toffset;
1480 }
1481 
1482 ////////////////////////////////////////////////////////////////////////////////
1483 /// Set option to strip decimals when drawing axis labels.
1484 /// By default, TGaxis::PaintAxis removes trailing 0s after a dot
1485 /// in the axis labels. Ex: {0,0.5,1,1.5,2,2.5, etc}
1486 /// If this function is called with strip=kFALSE, TGAxis::PaintAxis will
1487 /// draw labels with the same number of digits after the dot
1488 /// Ex: (0.0,0.5,1.0,1.5,2.0,2.5,etc}
1489 
1491 {
1492  fStripDecimals = strip;
1493 }
1494 
1495 ////////////////////////////////////////////////////////////////////////////////
1496 /// Save the current style in a C++ macro file.
1497 
1498 void TStyle::SaveSource(const char *filename, Option_t *option)
1499 {
1500  // Opens a file named filename or "Rootstyl.C"
1501  TString ff = strlen(filename) ? filename : "Rootstyl.C";
1502 
1503  // Computes the main method name.
1504  const char *fname = gSystem->BaseName(ff);
1505  Int_t lenfname = strlen(fname);
1506  char *sname = new char[lenfname + 1];
1507  Int_t i = 0;
1508  while ((i < lenfname) && (fname[i] != '.')) {
1509  sname[i] = fname[i];
1510  i++;
1511  }
1512  if (i == lenfname) ff += ".C";
1513  sname[i] = 0;
1514 
1515  // Tries to open the file.
1516  std::ofstream out;
1517  out.open(ff.Data(), std::ios::out);
1518  if (!out.good()) {
1519  delete [] sname;
1520  Error("SaveSource", "cannot open file: %s", ff.Data());
1521  return;
1522  }
1523 
1524  // Writes macro header, date/time stamp as string, and the used Root version
1525  TDatime t;
1526  out <<"// Mainframe macro generated from application: " << gApplication->Argv(0) << std::endl;
1527  out <<"// By ROOT version " << gROOT->GetVersion() << " on " << t.AsSQLString() << std::endl;
1528  out << std::endl;
1529 
1530  char quote = '"';
1531 
1532  // Writes include.
1533  out << "#if !defined( __CINT__) || defined (__MAKECINT__)" << std::endl << std::endl;
1534  out << "#ifndef ROOT_TStyle" << std::endl;
1535  out << "#include " << quote << "TStyle.h" << quote << std::endl;
1536  out << "#endif" << std::endl;
1537  out << std::endl << "#endif" << std::endl;
1538 
1539  // Writes the macro entry point equal to the fname
1540  out << std::endl;
1541  out << "void " << sname << "()" << std::endl;
1542  out << "{" << std::endl;
1543  delete [] sname;
1544 
1545  TStyle::SavePrimitive(out, option);
1546 
1547  out << "}" << std::endl;
1548  out.close();
1549 
1550  printf(" C++ macro file %s has been generated\n", gSystem->BaseName(ff));
1551 }
1552 
1553 ////////////////////////////////////////////////////////////////////////////////
1554 /// Save a main frame widget as a C++ statement(s) on output stream out.
1555 
1556 void TStyle::SavePrimitive(std::ostream &out, Option_t * /*= ""*/)
1557 {
1558  char quote = '"';
1559 
1560  out << " // Add the saved style to the current ROOT session." << std::endl;
1561  out << std::endl;
1562  out<<" "<<"delete gROOT->GetStyle("<<quote<<GetName()<<quote<<");"<< std::endl;
1563  out << std::endl;
1564  out<<" "<<"TStyle *tmpStyle = new TStyle("
1565  << quote << GetName() << quote << ", "
1566  << quote << GetTitle() << quote << ");" << std::endl;
1567 
1568  // fXAxis, fYAxis and fZAxis
1569  out<<" "<<"tmpStyle->SetNdivisions(" <<GetNdivisions("x") <<", \"x\");"<<std::endl;
1570  out<<" "<<"tmpStyle->SetNdivisions(" <<GetNdivisions("y") <<", \"y\");"<<std::endl;
1571  out<<" "<<"tmpStyle->SetNdivisions(" <<GetNdivisions("z") <<", \"z\");"<<std::endl;
1572  out<<" "<<"tmpStyle->SetAxisColor(" <<GetAxisColor("x") <<", \"x\");"<<std::endl;
1573  out<<" "<<"tmpStyle->SetAxisColor(" <<GetAxisColor("y") <<", \"y\");"<<std::endl;
1574  out<<" "<<"tmpStyle->SetAxisColor(" <<GetAxisColor("z") <<", \"z\");"<<std::endl;
1575  out<<" "<<"tmpStyle->SetLabelColor(" <<GetLabelColor("x") <<", \"x\");"<<std::endl;
1576  out<<" "<<"tmpStyle->SetLabelColor(" <<GetLabelColor("y") <<", \"y\");"<<std::endl;
1577  out<<" "<<"tmpStyle->SetLabelColor(" <<GetLabelColor("z") <<", \"z\");"<<std::endl;
1578  out<<" "<<"tmpStyle->SetLabelFont(" <<GetLabelFont("x") <<", \"x\");"<<std::endl;
1579  out<<" "<<"tmpStyle->SetLabelFont(" <<GetLabelFont("y") <<", \"y\");"<<std::endl;
1580  out<<" "<<"tmpStyle->SetLabelFont(" <<GetLabelFont("z") <<", \"z\");"<<std::endl;
1581  out<<" "<<"tmpStyle->SetLabelOffset("<<GetLabelOffset("x")<<", \"x\");"<<std::endl;
1582  out<<" "<<"tmpStyle->SetLabelOffset("<<GetLabelOffset("y")<<", \"y\");"<<std::endl;
1583  out<<" "<<"tmpStyle->SetLabelOffset("<<GetLabelOffset("z")<<", \"z\");"<<std::endl;
1584  out<<" "<<"tmpStyle->SetLabelSize(" <<GetLabelSize("x") <<", \"x\");"<<std::endl;
1585  out<<" "<<"tmpStyle->SetLabelSize(" <<GetLabelSize("y") <<", \"y\");"<<std::endl;
1586  out<<" "<<"tmpStyle->SetLabelSize(" <<GetLabelSize("z") <<", \"z\");"<<std::endl;
1587  out<<" "<<"tmpStyle->SetTickLength(" <<GetTickLength("x") <<", \"x\");"<<std::endl;
1588  out<<" "<<"tmpStyle->SetTickLength(" <<GetTickLength("y") <<", \"y\");"<<std::endl;
1589  out<<" "<<"tmpStyle->SetTickLength(" <<GetTickLength("z") <<", \"z\");"<<std::endl;
1590  out<<" "<<"tmpStyle->SetTitleOffset("<<GetTitleOffset("x")<<", \"x\");"<<std::endl;
1591  out<<" "<<"tmpStyle->SetTitleOffset("<<GetTitleOffset("y")<<", \"y\");"<<std::endl;
1592  out<<" "<<"tmpStyle->SetTitleOffset("<<GetTitleOffset("z")<<", \"z\");"<<std::endl;
1593  out<<" "<<"tmpStyle->SetTitleSize(" <<GetTitleSize("x") <<", \"x\");"<<std::endl;
1594  out<<" "<<"tmpStyle->SetTitleSize(" <<GetTitleSize("y") <<", \"y\");"<<std::endl;
1595  out<<" "<<"tmpStyle->SetTitleSize(" <<GetTitleSize("z") <<", \"z\");"<<std::endl;
1596  out<<" "<<"tmpStyle->SetTitleColor(" <<GetTitleColor("x") <<", \"x\");"<<std::endl;
1597  out<<" "<<"tmpStyle->SetTitleColor(" <<GetTitleColor("y") <<", \"y\");"<<std::endl;
1598  out<<" "<<"tmpStyle->SetTitleColor(" <<GetTitleColor("z") <<", \"z\");"<<std::endl;
1599  out<<" "<<"tmpStyle->SetTitleFont(" <<GetTitleFont("x") <<", \"x\");"<<std::endl;
1600  out<<" "<<"tmpStyle->SetTitleFont(" <<GetTitleFont("y") <<", \"y\");"<<std::endl;
1601  out<<" "<<"tmpStyle->SetTitleFont(" <<GetTitleFont("z") <<", \"z\");"<<std::endl;
1602 
1603  out<<" "<<"tmpStyle->SetBarWidth(" <<GetBarWidth() <<");"<<std::endl;
1604  out<<" "<<"tmpStyle->SetBarOffset(" <<GetBarOffset() <<");"<<std::endl;
1605  out<<" "<<"tmpStyle->SetDrawBorder(" <<GetDrawBorder() <<");"<<std::endl;
1606  out<<" "<<"tmpStyle->SetOptLogx(" <<GetOptLogx() <<");"<<std::endl;
1607  out<<" "<<"tmpStyle->SetOptLogy(" <<GetOptLogy() <<");"<<std::endl;
1608  out<<" "<<"tmpStyle->SetOptLogz(" <<GetOptLogz() <<");"<<std::endl;
1609  out<<" "<<"tmpStyle->SetOptDate(" <<GetOptDate() <<");"<<std::endl;
1610  out<<" "<<"tmpStyle->SetOptStat(" <<GetOptStat() <<");"<<std::endl;
1611 
1612  if (GetOptTitle()) out << " tmpStyle->SetOptTitle(kTRUE);" << std::endl;
1613  else out << " tmpStyle->SetOptTitle(kFALSE);" << std::endl;
1614  out<<" "<<"tmpStyle->SetOptFit(" <<GetOptFit() <<");"<<std::endl;
1615  out<<" "<<"tmpStyle->SetNumberContours(" <<GetNumberContours() <<");"<<std::endl;
1616 
1617  // fAttDate
1618  out<<" "<<"tmpStyle->GetAttDate()->SetTextFont(" <<GetAttDate()->GetTextFont() <<");"<<std::endl;
1619  out<<" "<<"tmpStyle->GetAttDate()->SetTextSize(" <<GetAttDate()->GetTextSize() <<");"<<std::endl;
1620  out<<" "<<"tmpStyle->GetAttDate()->SetTextAngle("<<GetAttDate()->GetTextAngle()<<");"<<std::endl;
1621  out<<" "<<"tmpStyle->GetAttDate()->SetTextAlign("<<GetAttDate()->GetTextAlign()<<");"<<std::endl;
1622  out<<" "<<"tmpStyle->GetAttDate()->SetTextColor("<<GetAttDate()->GetTextColor()<<");"<<std::endl;
1623 
1624  out<<" "<<"tmpStyle->SetDateX(" <<GetDateX() <<");"<<std::endl;
1625  out<<" "<<"tmpStyle->SetDateY(" <<GetDateY() <<");"<<std::endl;
1626  out<<" "<<"tmpStyle->SetEndErrorSize(" <<GetEndErrorSize() <<");"<<std::endl;
1627  out<<" "<<"tmpStyle->SetErrorX(" <<GetErrorX() <<");"<<std::endl;
1628  out<<" "<<"tmpStyle->SetFuncColor(" <<GetFuncColor() <<");"<<std::endl;
1629  out<<" "<<"tmpStyle->SetFuncStyle(" <<GetFuncStyle() <<");"<<std::endl;
1630  out<<" "<<"tmpStyle->SetFuncWidth(" <<GetFuncWidth() <<");"<<std::endl;
1631  out<<" "<<"tmpStyle->SetGridColor(" <<GetGridColor() <<");"<<std::endl;
1632  out<<" "<<"tmpStyle->SetGridStyle(" <<GetGridStyle() <<");"<<std::endl;
1633  out<<" "<<"tmpStyle->SetGridWidth(" <<GetGridWidth() <<");"<<std::endl;
1634  out<<" "<<"tmpStyle->SetLegendBorderSize("<<GetLegendBorderSize()<<");"<<std::endl;
1635  out<<" "<<"tmpStyle->SetLegendFillColor(" <<GetLegendFillColor() <<");"<<std::endl;
1636  out<<" "<<"tmpStyle->SetLegendFont(" <<GetLegendFont() <<");"<<std::endl;
1637  out<<" "<<"tmpStyle->SetLegendTextSize(" <<GetLegendTextSize() <<");"<<std::endl;
1638  out<<" "<<"tmpStyle->SetHatchesLineWidth("<<GetHatchesLineWidth()<<");"<<std::endl;
1639  out<<" "<<"tmpStyle->SetHatchesSpacing(" <<GetHatchesSpacing() <<");"<<std::endl;
1640  out<<" "<<"tmpStyle->SetFrameFillColor(" <<GetFrameFillColor() <<");"<<std::endl;
1641  out<<" "<<"tmpStyle->SetFrameLineColor(" <<GetFrameLineColor() <<");"<<std::endl;
1642  out<<" "<<"tmpStyle->SetFrameFillStyle(" <<GetFrameFillStyle() <<");"<<std::endl;
1643  out<<" "<<"tmpStyle->SetFrameLineStyle(" <<GetFrameLineStyle() <<");"<<std::endl;
1644  out<<" "<<"tmpStyle->SetFrameLineWidth(" <<GetFrameLineWidth() <<");"<<std::endl;
1645  out<<" "<<"tmpStyle->SetFrameBorderSize(" <<GetFrameBorderSize() <<");"<<std::endl;
1646  out<<" "<<"tmpStyle->SetFrameBorderMode(" <<GetFrameBorderMode() <<");"<<std::endl;
1647  out<<" "<<"tmpStyle->SetHistFillColor(" <<GetHistFillColor() <<");"<<std::endl;
1648  out<<" "<<"tmpStyle->SetHistLineColor(" <<GetHistLineColor() <<");"<<std::endl;
1649  out<<" "<<"tmpStyle->SetHistFillStyle(" <<GetHistFillStyle() <<");"<<std::endl;
1650  out<<" "<<"tmpStyle->SetHistLineStyle(" <<GetHistLineStyle() <<");"<<std::endl;
1651  out<<" "<<"tmpStyle->SetHistLineWidth(" <<GetHistLineWidth() <<");"<<std::endl;
1652  if (GetHistMinimumZero()) out<<" tmpStyle->SetHistMinimumZero(kTRUE);" <<std::endl;
1653  else out<<" tmpStyle->SetHistMinimumZero(kFALSE);"<<std::endl;
1654  if (GetCanvasPreferGL()) out<<" tmpStyle->SetCanvasPreferGL(kTRUE);" <<std::endl;
1655  else out<<" tmpStyle->SetCanvasPreferGL(kFALSE);"<<std::endl;
1656  out<<" "<<"tmpStyle->SetCanvasColor(" <<GetCanvasColor() <<");"<<std::endl;
1657  out<<" "<<"tmpStyle->SetCanvasBorderSize("<<GetCanvasBorderSize()<<");"<<std::endl;
1658  out<<" "<<"tmpStyle->SetCanvasBorderMode("<<GetCanvasBorderMode()<<");"<<std::endl;
1659  out<<" "<<"tmpStyle->SetCanvasDefH(" <<GetCanvasDefH() <<");"<<std::endl;
1660  out<<" "<<"tmpStyle->SetCanvasDefW(" <<GetCanvasDefW() <<");"<<std::endl;
1661  out<<" "<<"tmpStyle->SetCanvasDefX(" <<GetCanvasDefX() <<");"<<std::endl;
1662  out<<" "<<"tmpStyle->SetCanvasDefY(" <<GetCanvasDefY() <<");"<<std::endl;
1663  out<<" "<<"tmpStyle->SetPadColor(" <<GetPadColor() <<");"<<std::endl;
1664  out<<" "<<"tmpStyle->SetPadBorderSize(" <<GetPadBorderSize() <<");"<<std::endl;
1665  out<<" "<<"tmpStyle->SetPadBorderMode(" <<GetPadBorderMode() <<");"<<std::endl;
1666  out<<" "<<"tmpStyle->SetPadBottomMargin(" <<GetPadBottomMargin() <<");"<<std::endl;
1667  out<<" "<<"tmpStyle->SetPadTopMargin(" <<GetPadTopMargin() <<");"<<std::endl;
1668  out<<" "<<"tmpStyle->SetPadLeftMargin(" <<GetPadLeftMargin() <<");"<<std::endl;
1669  out<<" "<<"tmpStyle->SetPadRightMargin(" <<GetPadRightMargin() <<");"<<std::endl;
1670  if (GetPadGridX()) out<<" tmpStyle->SetPadGridX(kTRUE);" <<std::endl;
1671  else out<<" tmpStyle->SetPadGridX(kFALSE);"<<std::endl;
1672  if (GetPadGridY()) out<<" tmpStyle->SetPadGridY(kTRUE);" <<std::endl;
1673  else out<<" tmpStyle->SetPadGridY(kFALSE);"<<std::endl;
1674  out<<" "<<"tmpStyle->SetPadTickX(" <<GetPadTickX() <<");"<<std::endl;
1675  out<<" "<<"tmpStyle->SetPadTickY(" <<GetPadTickY() <<");"<<std::endl;
1676 
1677  // fPaperSizeX, fPaperSizeY
1678  out<<" "<<"tmpStyle->SetPaperSize(" <<fPaperSizeX <<", "
1679  <<fPaperSizeY <<");"<<std::endl;
1680 
1681  out<<" "<<"tmpStyle->SetScreenFactor(" <<GetScreenFactor() <<");"<<std::endl;
1682  out<<" "<<"tmpStyle->SetStatColor(" <<GetStatColor() <<");"<<std::endl;
1683  out<<" "<<"tmpStyle->SetStatTextColor(" <<GetStatTextColor() <<");"<<std::endl;
1684  out<<" "<<"tmpStyle->SetStatBorderSize(" <<GetStatBorderSize() <<");"<<std::endl;
1685  out<<" "<<"tmpStyle->SetStatFont(" <<GetStatFont() <<");"<<std::endl;
1686  out<<" "<<"tmpStyle->SetStatFontSize(" <<GetStatFontSize() <<");"<<std::endl;
1687  out<<" "<<"tmpStyle->SetStatStyle(" <<GetStatStyle() <<");"<<std::endl;
1688  out<<" "<<"tmpStyle->SetStatFormat(" <<quote << GetStatFormat()
1689  <<quote <<");"<<std::endl;
1690  out<<" "<<"tmpStyle->SetStatX(" <<GetStatX() <<");"<<std::endl;
1691  out<<" "<<"tmpStyle->SetStatY(" <<GetStatY() <<");"<<std::endl;
1692  out<<" "<<"tmpStyle->SetStatW(" <<GetStatW() <<");"<<std::endl;
1693  out<<" "<<"tmpStyle->SetStatH(" <<GetStatH() <<");"<<std::endl;
1694  if (GetStripDecimals()) out<<" tmpStyle->SetStripDecimals(kTRUE);" <<std::endl;
1695  else out<<" tmpStyle->SetStripDecimals(kFALSE);"<<std::endl;
1696  out<<" "<<"tmpStyle->SetTitleAlign(" <<GetTitleAlign() <<");"<<std::endl;
1697  out<<" "<<"tmpStyle->SetTitleFillColor(" <<GetTitleFillColor() <<");"<<std::endl;
1698  out<<" "<<"tmpStyle->SetTitleTextColor(" <<GetTitleTextColor() <<");"<<std::endl;
1699  out<<" "<<"tmpStyle->SetTitleBorderSize("<<GetTitleBorderSize()<<");"<<std::endl;
1700  out<<" "<<"tmpStyle->SetTitleFont(" <<GetTitleFont() <<");"<<std::endl;
1701  out<<" "<<"tmpStyle->SetTitleFontSize(" <<GetTitleFontSize() <<");"<<std::endl;
1702  out<<" "<<"tmpStyle->SetTitleStyle(" <<GetTitleStyle() <<");"<<std::endl;
1703  out<<" "<<"tmpStyle->SetTitleX(" <<GetTitleX() <<");"<<std::endl;
1704  out<<" "<<"tmpStyle->SetTitleY(" <<GetTitleY() <<");"<<std::endl;
1705  out<<" "<<"tmpStyle->SetTitleW(" <<GetTitleW() <<");"<<std::endl;
1706  out<<" "<<"tmpStyle->SetTitleH(" <<GetTitleH() <<");"<<std::endl;
1707  out<<" "<<"tmpStyle->SetLegoInnerR(" <<GetLegoInnerR() <<");"<<std::endl;
1708  out<<std::endl;
1709 
1710  // fPalette
1711  out<<" "<<"Int_t fPaletteColor[" <<GetNumberOfColors() <<"] = {";
1712  for (Int_t ci=0; ci<GetNumberOfColors()-1; ++ci) {
1713  if (ci % 10 == 9)
1714  out<<std::endl<<" ";
1715  out<<GetColorPalette(ci)<<", ";
1716  }
1717  out<<GetColorPalette(GetNumberOfColors() - 1) <<"};"<<std::endl;
1718  out<<" "<<"tmpStyle->SetPalette(" << GetNumberOfColors()
1719  << ", fPaletteColor);" << std::endl;
1720  out<<std::endl;
1721 
1722  // fLineStyle
1723  out<<" "<<"TString fLineStyleArrayTmp[30] = {";
1724  for (Int_t li=0; li<29; ++li) {
1725  if (li % 5 == 4)
1726  out<<std::endl<<" ";
1727  out<<quote << fLineStyle[li].Data() << quote << ", ";
1728  }
1729  out<<quote<<fLineStyle[29].Data()<<quote<<"};"<<std::endl;
1730  out<<" "<<"for (Int_t i=0; i<30; i++)"<<std::endl;
1731  out<<" "<<" tmpStyle->SetLineStyleString(i, fLineStyleArrayTmp[i]);"<<std::endl;
1732  out<<std::endl;
1733 
1734  out<<" "<<"tmpStyle->SetHeaderPS(" <<quote<<GetHeaderPS()
1735  <<quote <<");"<<std::endl;
1736  out<<" "<<"tmpStyle->SetTitlePS(" <<quote<<GetTitlePS()
1737  <<quote <<");"<<std::endl;
1738  out<<" "<<"tmpStyle->SetFitFormat(" <<quote<<GetFitFormat()
1739  <<quote <<");"<<std::endl;
1740  out<<" "<<"tmpStyle->SetPaintTextFormat("<<quote<<GetPaintTextFormat()
1741  <<quote <<");"<<std::endl;
1742  out<<" "<<"tmpStyle->SetLineScalePS(" <<GetLineScalePS() <<");"<<std::endl;
1743  out<<" "<<"tmpStyle->SetJoinLinePS(" <<GetJoinLinePS() <<");"<<std::endl;
1744  out<<" "<<"tmpStyle->SetColorModelPS(" <<GetColorModelPS() <<");"<<std::endl;
1745  out<<" "<<Form("tmpStyle->SetTimeOffset(%9.0f);", GetTimeOffset()) <<std::endl;
1746  out<<std::endl;
1747 
1748  // Inheritance :
1749  // TAttLine :
1750  out <<" " <<"tmpStyle->SetLineColor(" <<GetLineColor() <<");" <<std::endl;
1751  out <<" " <<"tmpStyle->SetLineStyle(" <<GetLineStyle() <<");" <<std::endl;
1752  out <<" " <<"tmpStyle->SetLineWidth(" <<GetLineWidth() <<");" <<std::endl;
1753 
1754  // TAttFill
1755  out <<" " <<"tmpStyle->SetFillColor(" <<GetFillColor() <<");" <<std::endl;
1756  out <<" " <<"tmpStyle->SetFillStyle(" <<GetFillStyle() <<");" <<std::endl;
1757 
1758  // TAttMarker
1759  out <<" " <<"tmpStyle->SetMarkerColor(" <<GetMarkerColor() <<");" <<std::endl;
1760  out <<" " <<"tmpStyle->SetMarkerSize(" <<GetMarkerSize() <<");" <<std::endl;
1761  out <<" " <<"tmpStyle->SetMarkerStyle(" <<GetMarkerStyle() <<");" <<std::endl;
1762 
1763  // TAttText
1764  out <<" " <<"tmpStyle->SetTextAlign(" <<GetTextAlign() <<");" <<std::endl;
1765  out <<" " <<"tmpStyle->SetTextAngle(" <<GetTextAngle() <<");" <<std::endl;
1766  out <<" " <<"tmpStyle->SetTextColor(" <<GetTextColor() <<");" <<std::endl;
1767  out <<" " <<"tmpStyle->SetTextFont(" <<GetTextFont() <<");" <<std::endl;
1768  out <<" " <<"tmpStyle->SetTextSize(" <<GetTextSize() <<");" <<std::endl;
1769 }
Color_t fFuncColor
Function color.
Definition: TStyle.h:55
Int_t GetColorModelPS() const
Definition: TStyle.h:182
Style_t GetFrameLineStyle() const
Definition: TStyle.h:213
Style_t GetLegendFont() const
Definition: TStyle.h:190
virtual const char * BaseName(const char *pathname)
Base name of a file name. Base name of /user/root is root.
Definition: TSystem.cxx:932
virtual void SetTitleOffset(Float_t offset=1)
Set distance between the axis and the axis title Offset is a correction factor with respect to the "s...
Definition: TAttAxis.cxx:294
virtual const char * GetName() const
Returns name of object.
Definition: TNamed.h:47
Int_t fOptFit
True if option Fit is selected.
Definition: TStyle.h:44
Width_t fFuncWidth
Function line width.
Definition: TStyle.h:57
virtual void SetLineWidth(Width_t lwidth)
Set the line width.
Definition: TAttLine.h:43
Float_t fLineScalePS
Line scale factor when drawing lines on Postscript.
Definition: TStyle.h:132
virtual Float_t GetTickLength() const
Definition: TAttAxis.h:44
Float_t GetLineScalePS() const
Definition: TStyle.h:272
TString fTitlePS
User defined Postscript file title.
Definition: TStyle.h:129
Color_t GetStatColor() const
Definition: TStyle.h:241
Float_t fPadRightMargin
Pad right margin.
Definition: TStyle.h:95
Style_t GetTitleFont(Option_t *axis="X") const
Return title font.
Definition: TStyle.cxx:843
Color_t fLegendFillColor
Legend fill color.
Definition: TStyle.h:62
Color_t GetLabelColor(Option_t *axis="X") const
Return the label color number in the axis.
Definition: TStyle.cxx:743
Float_t fTitleH
Height of title box.
Definition: TStyle.h:125
void SetEndErrorSize(Float_t np=2)
Set the size (in pixels) of the small lines drawn at the end of the error bars (TH1 or TGraphErrors)...
Definition: TStyle.cxx:968
TString fFitFormat
Printing format for fit parameters.
Definition: TStyle.h:130
TString fLineStyle[30]
String describing line style i (for postScript)
Definition: TStyle.h:127
void SetPadLeftMargin(Float_t margin=0.1)
Definition: TStyle.h:334
Float_t GetPadLeftMargin() const
Definition: TStyle.h:198
Int_t fOptStat
True if option Stat is selected.
Definition: TStyle.h:41
Bool_t fHistMinimumZero
True if default minimum is 0, false if minimum is automatic.
Definition: TStyle.h:79
Float_t GetLabelSize(Option_t *axis="X") const
Return label size.
Definition: TStyle.cxx:779
Float_t fTitleW
Width of title box.
Definition: TStyle.h:124
short Style_t
Definition: RtypesCore.h:76
void SetStatColor(Color_t color=19)
Definition: TStyle.h:363
void SetFrameBorderMode(Int_t mode=1)
Definition: TStyle.h:352
Color_t GetTitleTextColor() const
Definition: TStyle.h:256
Int_t GetNumberContours() const
Definition: TStyle.h:225
virtual void ResetAttText(Option_t *toption="")
Reset this text attributes to default values.
Definition: TAttText.cxx:335
virtual Color_t GetTextColor() const
Return the text color.
Definition: TAttText.h:34
float Float_t
Definition: RtypesCore.h:53
Style_t GetGridStyle() const
Definition: TStyle.h:208
Style_t fFrameLineStyle
Pad frame line style.
Definition: TStyle.h:70
virtual Float_t GetLabelOffset() const
Definition: TAttAxis.h:40
void SetLabelFont(Style_t font=62, Option_t *axis="X")
Set font number used to draw axis labels.
Definition: TStyle.cxx:1041
virtual Short_t GetTextAlign() const
Return the text alignment.
Definition: TAttText.h:32
const char Option_t
Definition: RtypesCore.h:62
Int_t fFrameBorderMode
Pad frame border mode.
Definition: TStyle.h:73
Color_t GetAxisColor(Option_t *axis="X") const
Return the axis color number in the axis.
Definition: TStyle.cxx:723
Width_t fFrameBorderSize
Pad frame border size.
Definition: TStyle.h:72
Int_t fHatchesLineWidth
Hatches line width for hatch styles > 3100.
Definition: TStyle.h:65
Definition: Rtypes.h:59
TAttAxis fZaxis
Z axis attributes.
Definition: TStyle.h:32
void SetDateY(Float_t y=0.01)
Definition: TStyle.h:313
virtual void ResetAttAxis(Option_t *option="")
Reset axis attributes.
Definition: TAttAxis.cxx:79
void SetAxisColor(Color_t color=1, Option_t *axis="X")
Set color to draw the axis line and tick marks.
Definition: TStyle.cxx:951
void SetHistLineWidth(Width_t width=1)
Definition: TStyle.h:357
Color_t fStatColor
Stat fill area color.
Definition: TStyle.h:103
Int_t fPadBorderMode
Pad border mode.
Definition: TStyle.h:91
Int_t fCanvasDefX
Default canvas top X position.
Definition: TStyle.h:87
#define BIT(n)
Definition: Rtypes.h:78
virtual Color_t GetAxisColor() const
Definition: TAttAxis.h:37
Definition: Rtypes.h:58
virtual void SetLabelColor(Color_t color=1, Float_t alpha=1.)
Set color of labels.
Definition: TAttAxis.cxx:173
Float_t fStatY
Y position of top right corner of stat box.
Definition: TStyle.h:111
Bool_t GetPadGridY() const
Definition: TStyle.h:201
Color_t GetLegendFillColor() const
Definition: TStyle.h:189
void GetPaperSize(Float_t &xsize, Float_t &ysize) const
Set paper size for PostScript output.
Definition: TStyle.cxx:810
void SaveSource(const char *filename, Option_t *option=0)
Save the current style in a C++ macro file.
Definition: TStyle.cxx:1498
virtual Float_t GetTextAngle() const
Return the text angle.
Definition: TAttText.h:33
virtual void SetNdivisions(Int_t n=510, Bool_t optim=kTRUE)
Set the number of divisions for this axis.
Definition: TAttAxis.cxx:229
TAttAxis fYaxis
Y axis attributes.
Definition: TStyle.h:31
void SetFrameLineWidth(Width_t width=1)
Definition: TStyle.h:350
static Int_t GetNumberOfColors()
Static function returning number of colors in the color palette.
Definition: TColor.cxx:1397
TStyle()
Default constructor.
Definition: TStyle.cxx:55
Style_t fTitleStyle
Fill area style of title PaveLabel.
Definition: TStyle.h:121
#define gROOT
Definition: TROOT.h:402
Float_t GetEndErrorSize() const
Definition: TStyle.h:171
Int_t GetPadTickY() const
Definition: TStyle.h:203
Width_t fPadBorderSize
Pad border size.
Definition: TStyle.h:90
Float_t fTitleFontSize
Font size in pixels for fonts with precision type 3.
Definition: TStyle.h:120
void SetStatBorderSize(Width_t size=2)
Definition: TStyle.h:366
void SetTitleFont(Style_t font=62, Option_t *axis="X")
Definition: TStyle.cxx:1402
Basic string class.
Definition: TString.h:125
virtual void SetTitleFont(Style_t font=62)
Set the title font.
Definition: TAttAxis.cxx:322
void ToLower()
Change string to lower-case.
Definition: TString.cxx:1099
int Int_t
Definition: RtypesCore.h:41
bool Bool_t
Definition: RtypesCore.h:59
R__EXTERN TVirtualMutex * gROOTMutex
Definition: TROOT.h:57
void Copy(TAttMarker &attmarker) const
Copy this marker attributes to a new TAttMarker.
Definition: TAttMarker.cxx:209
virtual void SetFillStyle(Style_t fstyle)
Set the fill area style.
Definition: TAttFill.h:39
TAttText * GetAttDate()
Definition: TStyle.h:156
Float_t fDateY
Y position of the date in the canvas (in NDC)
Definition: TStyle.h:52
Width_t GetLegendBorderSize() const
Definition: TStyle.h:188
Definition: Rtypes.h:59
void SetStatY(Float_t y=0)
Definition: TStyle.h:371
virtual Float_t GetLabelSize() const
Definition: TAttAxis.h:41
Color_t GetFrameLineColor() const
Definition: TStyle.h:211
Width_t fTitleBorderSize
Border size of Title PavelLabel.
Definition: TStyle.h:118
R__EXTERN TApplication * gApplication
Definition: TApplication.h:165
void SetTimeOffset(Double_t toffset)
Change the time offset for time plotting.
Definition: TStyle.cxx:1477
Float_t GetScreenFactor() const
Definition: TStyle.h:240
Float_t GetTitleY() const
Definition: TStyle.h:265
Int_t fCanvasDefH
Default canvas height.
Definition: TStyle.h:85
Color_t GetFrameFillColor() const
Definition: TStyle.h:210
virtual void SetNameTitle(const char *name, const char *title)
Set all the TNamed parameters (name and title).
Definition: TNamed.cxx:154
void SetPadBottomMargin(Float_t margin=0.1)
Definition: TStyle.h:332
const char * GetFitFormat() const
Definition: TStyle.h:185
virtual void SetLabelOffset(Float_t offset=0.005)
Set distance between the axis and the labels The distance is expressed in per cent of the pad width...
Definition: TAttAxis.cxx:193
Style_t fFrameFillStyle
Pad frame fill style.
Definition: TStyle.h:69
Int_t GetCanvasDefW() const
Definition: TStyle.h:178
Width_t fFrameLineWidth
Pad frame line width.
Definition: TStyle.h:71
Style_t fTitleFont
Font style of Title PaveLabel.
Definition: TStyle.h:119
void SetTitlePS(const char *pstitle)
Define a string to be used in the %Title of the Postscript files.
Definition: TStyle.cxx:1011
void SetLineStyleString(Int_t i, const char *text)
Set line style string using the PostScript convention.
Definition: TStyle.cxx:1111
virtual Width_t GetLineWidth() const
Return the line width.
Definition: TAttLine.h:35
Style_t GetLabelFont(Option_t *axis="X") const
Return label font.
Definition: TStyle.cxx:755
Float_t fPaperSizeY
PostScript paper size along Y.
Definition: TStyle.h:101
Width_t GetFuncWidth() const
Definition: TStyle.h:206
Double_t GetLegendTextSize() const
Definition: TStyle.h:191
Int_t GetHatchesLineWidth() const
Definition: TStyle.h:186
void SetBit(UInt_t f, Bool_t set)
Set or unset the user status bits as specified in f.
Definition: TObject.cxx:694
Int_t GetCanvasDefX() const
Definition: TStyle.h:179
Int_t fOptLogy
True if log scale in y.
Definition: TStyle.h:38
Color_t GetGridColor() const
Definition: TStyle.h:207
Int_t fOptLogx
True if log scale in X.
Definition: TStyle.h:37
Width_t GetHistLineWidth() const
Definition: TStyle.h:221
Int_t GetCanvasBorderMode() const
Definition: TStyle.h:176
void SetCanvasColor(Color_t color=19)
Definition: TStyle.h:318
Double_t GetHatchesSpacing() const
Definition: TStyle.h:187
void SetNdivisions(Int_t n=510, Option_t *axis="X")
Set the number of divisions to draw an axis.
Definition: TStyle.cxx:937
virtual void SetLabelFont(Style_t font=62)
Set labels&#39; font.
Definition: TAttAxis.cxx:183
static void SetPalette(Int_t ncolors, Int_t *colors, Float_t alpha=1.)
Static function.
Definition: TColor.cxx:2390
virtual void cd()
Change current style.
Definition: TStyle.cxx:306
TString fPaintTextFormat
Printing format for TH2::PaintText.
Definition: TStyle.h:131
Int_t fPadTickX
True to set special pad ticks along X.
Definition: TStyle.h:98
virtual Style_t GetMarkerStyle() const
Return the marker style.
Definition: TAttMarker.h:32
void SetTitleSize(Float_t size=0.02, Option_t *axis="X")
Definition: TStyle.cxx:1444
Marker Attributes class.
Definition: TAttMarker.h:19
virtual Style_t GetTitleFont() const
Definition: TAttAxis.h:46
void SetTitleAlign(Int_t a=13)
Definition: TStyle.h:376
Int_t GetTitleAlign()
Definition: TStyle.h:254
virtual Style_t GetLineStyle() const
Return the line style.
Definition: TAttLine.h:34
void SetNumberContours(Int_t number=20)
Set the default number of contour levels when drawing 2-d plots.
Definition: TStyle.cxx:1128
void SetTitleBorderSize(Width_t size=2)
Definition: TStyle.h:381
void SetLegendBorderSize(Width_t size=4)
Definition: TStyle.h:325
static Int_t GetColorPalette(Int_t i)
Static function returning the color number i in current palette.
Definition: TColor.cxx:1377
Double_t fHistTopMargin
Margin between histogram&#39;s top and pad&#39;s top.
Definition: TStyle.h:80
Fill Area Attributes class.
Definition: TAttFill.h:19
void SetFrameFillColor(Color_t color=1)
Definition: TStyle.h:346
void SetLabelColor(Color_t color=1, Option_t *axis="X")
Set axis labels color.
Definition: TStyle.cxx:1021
Float_t GetTitleFontSize() const
Definition: TStyle.h:258
Bool_t GetPadGridX() const
Definition: TStyle.h:200
virtual void ResetAttFill(Option_t *option="")
Reset this fill attributes to default values.
Definition: TAttFill.cxx:223
Int_t GetPadTickX() const
Definition: TStyle.h:202
void Copy(TAttLine &attline) const
Copy this line attributes to a new TAttLine.
Definition: TAttLine.cxx:162
The TNamed class is the base class for all named ROOT classes.
Definition: TNamed.h:29
virtual Float_t GetTextSize() const
Return the text size.
Definition: TAttText.h:36
Width_t fHistLineWidth
Histogram line width.
Definition: TStyle.h:78
Int_t fCanvasDefW
Default canvas width.
Definition: TStyle.h:86
void SetTitleX(Float_t x=0)
Definition: TStyle.h:386
Bool_t fStripDecimals
Strip decimals in axis labels.
Definition: TStyle.h:114
Int_t GetOptFit() const
Definition: TStyle.h:228
Float_t fPadTopMargin
Pad top margin.
Definition: TStyle.h:93
void SetPadTickX(Int_t tickx)
Definition: TStyle.h:338
Float_t fDateX
X position of the date in the canvas (in NDC)
Definition: TStyle.h:51
Style_t fLegendFont
Legend font style.
Definition: TStyle.h:63
Style_t GetHistFillStyle() const
Definition: TStyle.h:219
virtual Size_t GetMarkerSize() const
Return the marker size.
Definition: TAttMarker.h:33
Float_t GetStatX() const
Definition: TStyle.h:248
Float_t GetTitleX() const
Definition: TStyle.h:264
void SetTitleTextColor(Color_t color=1)
Definition: TStyle.h:378
Int_t fOptDate
True if date option is selected.
Definition: TStyle.h:40
Int_t GetOptDate() const
Definition: TStyle.h:226
void SetHeaderPS(const char *header)
Define a string to be inserted in the Postscript header.
Definition: TStyle.cxx:990
Style_t fStatStyle
Fill area style of Stats PaveLabel.
Definition: TStyle.h:108
Int_t fColorModelPS
PostScript color model: 0 = RGB, 1 = CMYK.
Definition: TStyle.h:35
Double_t fLegendTextSize
Legend text size. If 0 the size is computed automatically.
Definition: TStyle.h:64
Int_t GetFrameBorderMode() const
Definition: TStyle.h:216
Float_t GetBarWidth() const
Definition: TStyle.h:169
Int_t GetColorPalette(Int_t i) const
Return color number i in current palette.
Definition: TStyle.cxx:735
Width_t fStatBorderSize
Border size of Stats PaveLabel.
Definition: TStyle.h:105
Int_t fDrawBorder
Flag to draw border(=1) or not (0)
Definition: TStyle.h:36
Style_t GetStatStyle() const
Definition: TStyle.h:246
virtual void ResetAttLine(Option_t *option="")
Reset this line attributes to default values.
Definition: TAttLine.cxx:250
Float_t fStatH
Height of stat box.
Definition: TStyle.h:113
virtual Color_t GetLabelColor() const
Definition: TAttAxis.h:38
Style_t fHistLineStyle
Histogram line style.
Definition: TStyle.h:77
Color_t fStatTextColor
Stat text color.
Definition: TStyle.h:104
short Color_t
Definition: RtypesCore.h:79
Color_t fTitleTextColor
Title text color.
Definition: TStyle.h:117
Width_t GetFrameBorderSize() const
Definition: TStyle.h:215
virtual Int_t GetNdivisions() const
Definition: TAttAxis.h:36
virtual void SetTextAlign(Short_t align=11)
Set the text alignment.
Definition: TAttText.h:41
void SetTitleColor(Color_t color=1, Option_t *axis="X")
Definition: TStyle.cxx:1381
Style_t fFuncStyle
Function style.
Definition: TStyle.h:56
void SetStatFont(Style_t font=62)
Definition: TStyle.h:367
Int_t fCanvasBorderMode
Canvas border mode.
Definition: TStyle.h:84
TStyle objects may be created to define special styles.
Definition: TStyle.h:27
void Copy(TAttText &atttext) const
Copy this text attributes to a new TAttText.
Definition: TAttText.cxx:294
Float_t fTitleX
X position of top left corner of title box.
Definition: TStyle.h:122
Float_t GetErrorX() const
Definition: TStyle.h:172
const char * GetPaintTextFormat() const
Definition: TStyle.h:234
Using a TBrowser one can browse all ROOT objects.
Definition: TBrowser.h:37
Float_t GetLegoInnerR() const
Definition: TStyle.h:224
virtual TObject * FindObject(const char *name) const
Must be redefined in derived classes.
Definition: TObject.cxx:321
void SetPadBorderMode(Int_t mode=1)
Definition: TStyle.h:331
void SetCanvasBorderMode(Int_t mode=1)
Definition: TStyle.h:320
Color_t fFrameLineColor
Pad frame line color.
Definition: TStyle.h:68
TAttText fAttDate
Canvas date attribute.
Definition: TStyle.h:50
Width_t fGridWidth
Grid line width.
Definition: TStyle.h:60
R__EXTERN TSystem * gSystem
Definition: TSystem.h:540
Float_t GetTitleH() const
Definition: TStyle.h:267
Float_t fBarWidth
Width of bar for graphs.
Definition: TStyle.h:33
Color_t fTitleColor
Title fill area color.
Definition: TStyle.h:116
void SetPadColor(Color_t color=19)
Definition: TStyle.h:329
Int_t GetPadBorderMode() const
Definition: TStyle.h:195
Style_t GetStatFont() const
Definition: TStyle.h:244
virtual void SetFillColor(Color_t fcolor)
Set the fill area color.
Definition: TAttFill.h:37
const UInt_t kTakeStyle
Definition: TStyle.cxx:28
TStyle * gStyle
Definition: TStyle.cxx:27
Float_t GetStatY() const
Definition: TStyle.h:249
virtual Font_t GetTextFont() const
Return the text font.
Definition: TAttText.h:35
const char * GetLineStyleString(Int_t i=1) const
Return line style string (used by PostScript).
Definition: TStyle.cxx:792
void SetOptDate(Int_t datefl=1)
If optdate is non null, the current date/time will be printed in the canvas.
Definition: TStyle.cxx:1174
Float_t GetStatW() const
Definition: TStyle.h:250
void SetTitleStyle(Style_t style=1001)
Definition: TStyle.h:379
void SetIsReading(Bool_t reading=kTRUE)
Sets the fIsReading member to reading (default=kTRUE).
Definition: TStyle.cxx:1002
Float_t GetPadBottomMargin() const
Definition: TStyle.h:196
Width_t GetCanvasBorderSize() const
Definition: TStyle.h:175
Float_t GetPadRightMargin() const
Definition: TStyle.h:199
Text Attributes class.
Definition: TAttText.h:18
Bool_t GetHistMinimumZero() const
Definition: TStyle.h:222
TString fHeaderPS
User defined additional Postscript header.
Definition: TStyle.h:128
void SetOptFit(Int_t fit=1)
The type of information about fit parameters printed in the histogram statistics box can be selected ...
Definition: TStyle.cxx:1218
const char * GetTitlePS() const
Definition: TStyle.h:269
virtual Int_t DistancetoPrimitive(Int_t px, Int_t py)
Function used by the TStyle manager when drawing a canvas showing the current style.
Definition: TStyle.cxx:434
const char * AsSQLString() const
Return the date & time in SQL compatible string format, like: 1997-01-15 20:16:28.
Definition: TDatime.cxx:151
Style_t GetFrameFillStyle() const
Definition: TStyle.h:212
void Copy(TAttAxis &attaxis) const
Copy of the object.
Definition: TAttAxis.cxx:61
unsigned int UInt_t
Definition: RtypesCore.h:42
virtual void Paint(Option_t *option="")
Show the options from the current style.
Definition: TStyle.cxx:879
virtual Float_t GetTitleOffset() const
Definition: TAttAxis.h:42
virtual void Copy(TObject &style) const
Copy this style.
Definition: TStyle.cxx:314
Int_t fShowEventStatus
Show event status panel.
Definition: TStyle.h:45
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
Definition: TObject.cxx:880
char * Form(const char *fmt,...)
Float_t fErrorX
Per cent of bin width for errors along X.
Definition: TStyle.h:54
Int_t GetOptLogy() const
Definition: TStyle.h:232
void SetTickLength(Float_t length=0.03, Option_t *axis="X")
Set the tick marks length for an axis.
Definition: TStyle.cxx:1362
virtual ~TStyle()
Destructor.
Definition: TStyle.cxx:264
Double_t fHatchesSpacing
Hatches spacing for hatch styles > 3100.
Definition: TStyle.h:66
void SetFuncWidth(Width_t width=4)
Definition: TStyle.h:342
void SavePrimitive(std::ostream &out, Option_t *="")
Save a main frame widget as a C++ statement(s) on output stream out.
Definition: TStyle.cxx:1556
Color_t fCanvasColor
Canvas color.
Definition: TStyle.h:82
void SetColorModelPS(Int_t c=0)
Define the color model used by TPostScript and TPDF (RGB or CMYK).
Definition: TStyle.cxx:903
virtual Color_t GetTitleColor() const
Definition: TAttAxis.h:45
Float_t fScreenFactor
Multiplication factor for canvas size and position.
Definition: TStyle.h:102
Bool_t fIsReading
! Set to FALSE when userclass::UseCurrentStyle is called by the style manager
Definition: TStyle.h:135
Bool_t fPadGridX
True to get the grid along X.
Definition: TStyle.h:96
Int_t fNumberContours
Default number of contours for 2-d plots.
Definition: TStyle.h:49
Float_t GetDateX() const
Definition: TStyle.h:183
Int_t GetOptLogz() const
Definition: TStyle.h:233
virtual void SetAxisColor(Color_t color=1, Float_t alpha=1.)
Set color of the line axis and tick marks.
Definition: TAttAxis.cxx:163
void SetHistMinimumZero(Bool_t zero=kTRUE)
If the argument zero=kTRUE the minimum value for the Y axis of 1-d histograms is set to 0...
Definition: TStyle.cxx:916
Int_t GetNumberOfColors() const
Return number of colors in the color palette.
Definition: TStyle.cxx:801
Int_t GetOptLogx() const
Definition: TStyle.h:231
virtual void SetLabelSize(Float_t size=0.04)
Set size of axis labels The size is expressed in per cent of the pad width.
Definition: TAttAxis.cxx:204
virtual void SetTitleColor(Color_t color=1)
Set color of axis title.
Definition: TAttAxis.cxx:313
virtual void SetTitleSize(Float_t size=0.04)
Set size of axis title The size is expressed in per cent of the pad width.
Definition: TAttAxis.cxx:304
EPaperSize
Definition: TStyle.h:137
const char * GetHeaderPS() const
Definition: TStyle.h:268
void SetDateX(Float_t x=0.01)
Definition: TStyle.h:312
Color_t GetTitleFillColor() const
Definition: TStyle.h:255
Int_t GetJoinLinePS() const
Definition: TStyle.h:271
virtual void ResetAttMarker(Option_t *toption="")
Reset this marker attributes to the default values.
Definition: TAttMarker.cxx:234
Float_t GetTitleOffset(Option_t *axis="X") const
Return title offset.
Definition: TStyle.cxx:855
const Bool_t kFALSE
Definition: RtypesCore.h:88
TAttAxis fXaxis
X axis attributes.
Definition: TStyle.h:30
Float_t fTitleY
Y position of top left corner of title box.
Definition: TStyle.h:123
virtual Color_t GetLineColor() const
Return the line color.
Definition: TAttLine.h:33
Width_t fLegendBorderSize
Legend box border size.
Definition: TStyle.h:61
Float_t fEndErrorSize
Size of lines at the end of error bars.
Definition: TStyle.h:53
void SetLabelOffset(Float_t offset=0.005, Option_t *axis="X")
Set offset between axis and axis labels.
Definition: TStyle.cxx:1057
Color * colors
Definition: X3DBuffer.c:19
Width_t GetTitleBorderSize() const
Definition: TStyle.h:259
Float_t GetTitleW() const
Definition: TStyle.h:266
Color_t GetTitleColor(Option_t *axis="X") const
Return title color.
Definition: TStyle.cxx:831
Color_t GetHistFillColor() const
Definition: TStyle.h:217
void SetJoinLinePS(Int_t joinline=0)
Definition: TStyle.h:284
static void BuildStyles()
Create some standard styles.
Definition: TStyle.cxx:290
#define ClassImp(name)
Definition: Rtypes.h:359
Bool_t fPadGridY
True to get the grid along Y.
Definition: TStyle.h:97
void SetTitleOffset(Float_t offset=1, Option_t *axis="X")
Specify a parameter offset to control the distance between the axis and the axis title.
Definition: TStyle.cxx:1425
double Double_t
Definition: RtypesCore.h:55
Int_t GetOptStat() const
Definition: TStyle.h:229
TText * text
Int_t fOptLogz
True if log scale in z.
Definition: TStyle.h:39
Color_t GetHistLineColor() const
Definition: TStyle.h:218
Int_t fOptTitle
True if option Title is selected.
Definition: TStyle.h:42
R__EXTERN TEnv * gEnv
Definition: TEnv.h:171
unsigned long ULong_t
Definition: RtypesCore.h:51
Int_t GetDrawBorder() const
Definition: TStyle.h:170
Float_t GetPadTopMargin() const
Definition: TStyle.h:197
Int_t AxisChoice(Option_t *axis) const
Definition: TStyle.h:143
TCanvas * style()
Definition: style.C:1
char ** Argv() const
Definition: TApplication.h:136
virtual Color_t GetFillColor() const
Return the fill area color.
Definition: TAttFill.h:30
Float_t fPaperSizeX
PostScript paper size along X.
Definition: TStyle.h:100
virtual void Reset(Option_t *option="")
Reset.
Definition: TStyle.cxx:443
void SetLineScalePS(Float_t scale=3)
Definition: TStyle.h:285
Bool_t Contains(const char *pat, ECaseCompare cmp=kExact) const
Definition: TString.h:570
Float_t fPadLeftMargin
Pad left margin.
Definition: TStyle.h:94
#define R__LOCKGUARD(mutex)
The color creation and management class.
Definition: TColor.h:19
Float_t fBarOffset
Offset of bar for graphs.
Definition: TStyle.h:34
Float_t fStatFontSize
Font size in pixels for fonts with precision type 3.
Definition: TStyle.h:107
virtual Float_t GetTitleSize() const
Definition: TAttAxis.h:43
Style_t fHistFillStyle
Histogram fill style.
Definition: TStyle.h:76
Width_t GetStatBorderSize() const
Definition: TStyle.h:243
virtual void Browse(TBrowser *b)
Browse the style object.
Definition: TStyle.cxx:282
Int_t GetCanvasDefH() const
Definition: TStyle.h:177
Int_t fShowEditor
Show pad editor.
Definition: TStyle.h:46
Color_t fHistFillColor
Histogram fill color.
Definition: TStyle.h:74
Width_t GetPadBorderSize() const
Definition: TStyle.h:194
Color_t fFrameFillColor
Pad frame fill color.
Definition: TStyle.h:67
Style_t fGridStyle
Grid line style.
Definition: TStyle.h:59
Color_t fPadColor
Pad color.
Definition: TStyle.h:89
void SetPaperSize(EPaperSize size)
Set paper size for PostScript output.
Definition: TStyle.cxx:1331
Mother of all ROOT objects.
Definition: TObject.h:37
Int_t fJoinLinePS
Determines the appearance of joining lines on PostScript.
Definition: TStyle.h:133
void SetLabelSize(Float_t size=0.04, Option_t *axis="X")
Set size of axis labels.
Definition: TStyle.cxx:1072
Width_t GetFrameLineWidth() const
Definition: TStyle.h:214
Float_t GetStatFontSize() const
Definition: TStyle.h:245
Float_t GetTitleSize(Option_t *axis="X") const
Return title size.
Definition: TStyle.cxx:867
Style_t GetHistLineStyle() const
Definition: TStyle.h:220
Int_t fOptFile
True if option File is selected.
Definition: TStyle.h:43
void SetLegendFont(Style_t font=62)
Definition: TStyle.h:327
Int_t fTitleAlign
Title box alignment.
Definition: TStyle.h:115
Int_t fShowToolBar
Show toolbar.
Definition: TStyle.h:47
Float_t GetDateY() const
Definition: TStyle.h:184
Float_t GetTickLength(Option_t *axis="X") const
Return tick length.
Definition: TStyle.cxx:819
Style_t GetFuncStyle() const
Definition: TStyle.h:205
auto * l
Definition: textangle.C:4
void SetTitleFillColor(Color_t color=1)
Definition: TStyle.h:377
Color_t fGridColor
Grid line color (if 0 use axis line color)
Definition: TStyle.h:58
Float_t GetStatH() const
Definition: TStyle.h:251
Width_t fCanvasBorderSize
Canvas border size.
Definition: TStyle.h:83
Float_t GetLabelOffset(Option_t *axis="X") const
Return label offset.
Definition: TStyle.cxx:767
void SetOptStat(Int_t stat=1)
The type of information printed in the histogram statistics box can be selected via the parameter mod...
Definition: TStyle.cxx:1266
void SetOptTitle(Int_t tit=1)
Definition: TStyle.h:309
TString fStatFormat
Printing format for stats.
Definition: TStyle.h:109
#define snprintf
Definition: civetweb.c:822
Color_t GetFuncColor() const
Definition: TStyle.h:204
#define gPad
Definition: TVirtualPad.h:285
virtual void SetTickLength(Float_t length=0.03)
Set tick mark length The length is expressed in per cent of the pad width.
Definition: TAttAxis.cxx:280
Color_t GetCanvasColor() const
Definition: TStyle.h:174
void SetPadTickY(Int_t ticky)
Definition: TStyle.h:339
Float_t GetBarOffset() const
Definition: TStyle.h:168
Style_t GetTitleStyle() const
Definition: TStyle.h:257
void SetStatFormat(const char *format="6.4g")
Definition: TStyle.h:369
Int_t GetCanvasDefY() const
Definition: TStyle.h:180
Definition: Rtypes.h:59
Double_t fTimeOffset
Time offset to the beginning of an axis.
Definition: TStyle.h:134
Width_t GetGridWidth() const
Definition: TStyle.h:209
virtual Color_t GetMarkerColor() const
Return the marker color.
Definition: TAttMarker.h:31
void SetPaintTextFormat(const char *format="g")
Definition: TStyle.h:360
Bool_t fCanvasPreferGL
If true, rendering in canvas is with GL.
Definition: TStyle.h:81
virtual Style_t GetFillStyle() const
Return the fill area style.
Definition: TAttFill.h:31
virtual void SetTextSize(Float_t tsize=1)
Set the text size.
Definition: TAttText.h:46
void SetFitFormat(const char *format="5.4g")
Definition: TStyle.h:279
Color_t GetStatTextColor() const
Definition: TStyle.h:242
Int_t GetNdivisions(Option_t *axis="X") const
Return number of divisions.
Definition: TStyle.cxx:711
void SetLegendFillColor(Color_t color=0)
Definition: TStyle.h:326
Bool_t GetCanvasPreferGL() const
Definition: TStyle.h:173
Color_t fHistLineColor
Histogram line color.
Definition: TStyle.h:75
void SetHistLineColor(Color_t color=1)
Definition: TStyle.h:354
virtual Int_t GetValue(const char *name, Int_t dflt) const
Returns the integer value for a resource.
Definition: TEnv.cxx:491
const Bool_t kTRUE
Definition: RtypesCore.h:87
Int_t GetStripDecimals() const
Definition: TStyle.h:252
const Int_t n
Definition: legend1.C:16
Float_t fStatW
Width of stat box.
Definition: TStyle.h:112
Float_t fPadBottomMargin
Pad bottom margin.
Definition: TStyle.h:92
Line Attributes class.
Definition: TAttLine.h:18
void SetPalette(Int_t ncolors=kBird, Int_t *colors=0, Float_t alpha=1.)
See TColor::SetPalette.
Definition: TStyle.cxx:1459
Float_t fStatX
X position of top right corner of stat box.
Definition: TStyle.h:110
Int_t fCanvasDefY
Default canvas top Y position.
Definition: TStyle.h:88
Style_t fStatFont
Font style of Stats PaveLabel.
Definition: TStyle.h:106
void SetFuncColor(Color_t color=1)
Definition: TStyle.h:341
char name[80]
Definition: TGX11.cxx:109
Float_t fLegoInnerR
Inner radius for cylindrical legos.
Definition: TStyle.h:126
virtual Style_t GetLabelFont() const
Definition: TAttAxis.h:39
void SetStripDecimals(Bool_t strip=kTRUE)
Set option to strip decimals when drawing axis labels.
Definition: TStyle.cxx:1490
const char * GetStatFormat() const
Definition: TStyle.h:247
virtual const char * GetTitle() const
Returns title of object.
Definition: TNamed.h:48
This class stores the date and time with a precision of one second in an unsigned 32 bit word (950130...
Definition: TDatime.h:37
void Copy(TAttFill &attfill) const
Copy this fill attributes to a new TAttFill.
Definition: TAttFill.cxx:200
Int_t GetOptTitle() const
Definition: TStyle.h:230
Color_t GetPadColor() const
Definition: TStyle.h:193
const char * Data() const
Definition: TString.h:345
Int_t fPadTickY
True to set special pad ticks along Y.
Definition: TStyle.h:99
Double_t GetTimeOffset() const
Definition: TStyle.h:253
void SetLegendTextSize(Double_t size=0.)
Definition: TStyle.h:328