Logo ROOT   6.10/09
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 /// if (TClass::GetClass("TStyleManager")) gSystem->Load("libGed");
879 
880 void TStyle::Paint(Option_t *option)
881 {
882  gROOT->ProcessLine(Form("TStyleManager::PaintStyle((TStyle*)0x%lx,\"%s\")",
883  (ULong_t)this,option));
884 }
885 
886 ////////////////////////////////////////////////////////////////////////////////
887 /// Define the color model used by TPostScript and TPDF (RGB or CMYK).
888 /// CMY and CMYK models are subtractive color models unlike RGB which is
889 /// additive. They are mainly used for printing purposes. CMY means Cyan Magenta
890 /// Yellow. To convert RGB to CMY it is enough to do: C=1-R, M=1-G and Y=1-B.
891 /// CMYK has one more component K (black). The conversion from RGB to CMYK is:
892 /// ~~~ {.cpp}
893 /// Double_t Black = TMath::Min(TMath::Min(1-Red,1-Green),1-Blue);
894 /// Double_t Cyan = (1-Red-Black)/(1-Black);
895 /// Double_t Magenta = (1-Green-Black)/(1-Black);
896 /// Double_t Yellow = (1-Blue-Black)/(1-Black);
897 /// ~~~
898 /// CMYK adds the black component which allows better quality for black
899 /// printing. PostScript and PDF support the CMYK model.
900 ///
901 /// - c = 0 means TPostScript and TPDF will use RGB color model (default)
902 /// - c = 1 means TPostScript and TPDF will use CMYK color model
903 
905 {
906  fColorModelPS = c;
907 }
908 
909 ////////////////////////////////////////////////////////////////////////////////
910 /// If the argument zero=kTRUE the minimum value for the Y axis of 1-d histograms
911 /// is set to 0.
912 ///
913 /// If the minimum bin content is greater than 0 and TH1::SetMinimum
914 /// has not been called.
915 /// Otherwise the minimum is based on the minimum bin content.
916 
918 {
919  fHistMinimumZero = zero;
920 }
921 
922 ////////////////////////////////////////////////////////////////////////////////
923 /// Set the number of divisions to draw an axis.
924 /// ndiv : Number of divisions.
925 /// ~~~ {.cpp}
926 /// n = N1 + 100*N2 + 10000*N3
927 /// N1=number of primary divisions.
928 /// N2=number of secondary divisions.
929 /// N3=number of 3rd divisions.
930 /// e.g.:
931 /// nndi=0 --> no tick marks.
932 /// nndi=2 --> 2 divisions, one tick mark in the middle
933 /// of the axis.
934 /// ~~~
935 /// axis specifies which axis ("x","y","z"), default = "x"
936 /// if axis="xyz" set all 3 axes
937 
939 {
940  TString opt = axis;
941  opt.ToLower();
942  if (opt.Contains("x")) fXaxis.SetNdivisions(n);
943  if (opt.Contains("y")) fYaxis.SetNdivisions(n);
944  if (opt.Contains("z")) fZaxis.SetNdivisions(n);
945 }
946 
947 ////////////////////////////////////////////////////////////////////////////////
948 /// Set color to draw the axis line and tick marks.
949 /// axis specifies which axis ("x","y","z"), default = "x"
950 /// if axis="xyz" set all 3 axes
951 
953 {
954  TString opt = axis;
955  opt.ToLower();
956 
957  if (opt.Contains("x")) fXaxis.SetAxisColor(color);
958  if (opt.Contains("y")) fYaxis.SetAxisColor(color);
959  if (opt.Contains("z")) fZaxis.SetAxisColor(color);
960 }
961 
962 ////////////////////////////////////////////////////////////////////////////////
963 /// Set the size (in pixels) of the small lines drawn at the
964 /// end of the error bars (TH1 or TGraphErrors).
965 ///
966 /// The default value is 2 pixels.
967 /// Set np=0 to remove these lines
968 
970 {
971  if (np >= 0) fEndErrorSize = np;
972  else fEndErrorSize = 0;
973 }
974 
975 ////////////////////////////////////////////////////////////////////////////////
976 /// Define a string to be inserted in the Postscript header.
977 ///
978 /// The string in header will be added to the Postscript file
979 /// immediately following the %%Page line
980 /// For example, this string may contain special Postscript instructions like
981 /// ~~~ {.cpp}
982 /// 200 200 translate
983 /// ~~~
984 /// the following header string will print the string "my annotation" at the
985 /// bottom left corner of the page (outside the user area)
986 /// ~~~ {.cpp}
987 /// "gsave 100 -100 t 0 r 0 0 m /Helvetica-Bold findfont 56 sf 0 0 m ( my annotation ) show gr"
988 /// ~~~
989 /// This information is used in TPostScript::Initialize
990 
991 void TStyle::SetHeaderPS(const char *header)
992 {
993  fHeaderPS = header;
994 }
995 
996 ////////////////////////////////////////////////////////////////////////////////
997 /// Sets the `fIsReading` member to reading (default=kTRUE).
998 ///
999 /// `fIsReading` (used via `gStyle->IsReading()`) can be used in
1000 /// the functions `myclass::UseCurrentStyle` to read from the current style
1001 /// or write to the current style
1002 
1004 {
1005  fIsReading = reading;
1006 }
1007 
1008 ////////////////////////////////////////////////////////////////////////////////
1009 /// Define a string to be used in the %%Title of the Postscript files.
1010 /// If this string is not defined, ROOT will use the canvas title.
1011 
1012 void TStyle::SetTitlePS(const char *pstitle)
1013 {
1014  fTitlePS = pstitle;
1015 }
1016 
1017 ////////////////////////////////////////////////////////////////////////////////
1018 /// Set axis labels color.
1019 /// axis specifies which axis ("x","y","z"), default = "x"
1020 /// if axis="xyz" set all 3 axes
1021 
1023 {
1024  TString opt = axis;
1025  opt.ToLower();
1026 
1027  if (opt.Contains("x")) fXaxis.SetLabelColor(color);
1028  if (opt.Contains("y")) fYaxis.SetLabelColor(color);
1029  if (opt.Contains("z")) fZaxis.SetLabelColor(color);
1030 }
1031 
1032 ////////////////////////////////////////////////////////////////////////////////
1033 /// Set font number used to draw axis labels.
1034 /// - font : Text font code = 10*fontnumber + precision
1035 /// - Font numbers must be between 1 and 14
1036 /// - precision = 1 fast hardware fonts (steps in the size)
1037 /// - precision = 2 scalable and rotatable hardware fonts
1038 /// The default font number is 62.
1039 /// axis specifies which axis ("x","y","z"), default = "x"
1040 /// if axis="xyz" set all 3 axes
1041 
1043 {
1044  TString opt = axis;
1045  opt.ToLower();
1046 
1047  if (opt.Contains("x")) fXaxis.SetLabelFont(font);
1048  if (opt.Contains("y")) fYaxis.SetLabelFont(font);
1049  if (opt.Contains("z")) fZaxis.SetLabelFont(font);
1050 }
1051 
1052 ////////////////////////////////////////////////////////////////////////////////
1053 /// Set offset between axis and axis labels.
1054 /// The offset is expressed as a percent of the pad height.
1055 /// axis specifies which axis ("x","y","z"), default = "x"
1056 /// if axis="xyz" set all 3 axes
1057 
1059 {
1060  TString opt = axis;
1061  opt.ToLower();
1062 
1063  if (opt.Contains("x")) fXaxis.SetLabelOffset(offset);
1064  if (opt.Contains("y")) fYaxis.SetLabelOffset(offset);
1065  if (opt.Contains("z")) fZaxis.SetLabelOffset(offset);
1066 }
1067 
1068 ////////////////////////////////////////////////////////////////////////////////
1069 /// Set size of axis labels. The size is expressed as a percent of the pad height.
1070 /// axis specifies which axis ("x","y","z"), default = "x"
1071 /// if axis="xyz" set all 3 axes
1072 
1074 {
1075  TString opt = axis;
1076  opt.ToLower();
1077 
1078  if (opt.Contains("x")) fXaxis.SetLabelSize(size);
1079  if (opt.Contains("y")) fYaxis.SetLabelSize(size);
1080  if (opt.Contains("z")) fZaxis.SetLabelSize(size);
1081 }
1082 
1083 ////////////////////////////////////////////////////////////////////////////////
1084 /// Set line style string using the PostScript convention.
1085 /// A line is a suite of segments, each segment is described by the number of
1086 /// pixels. The initial and alternating elements (second, fourth, and so on)
1087 /// are the dashes, and the others spaces between dashes.
1088 ///
1089 /// Default fixed line styles are pre-defined as:
1090 /// ~~~ {.cpp}
1091 /// linestyle 1 "[]" solid
1092 /// linestyle 2 "[12 12]" dashed
1093 /// linestyle 3 "[4 8]" dotted
1094 /// linestyle 4 "[12 16 4 16]" dash-dotted
1095 /// ~~~
1096 /// For example the following lines define the line style 5 to 9.
1097 /// ~~~ {.cpp}
1098 /// gStyle->SetLineStyleString(5,"20 12 4 12");
1099 /// gStyle->SetLineStyleString(6,"20 12 4 12 4 12 4 12");
1100 /// gStyle->SetLineStyleString(7,"20 20");
1101 /// gStyle->SetLineStyleString(8,"20 12 4 12 4 12");
1102 /// gStyle->SetLineStyleString(9,"80 20");
1103 /// ~~~
1104 /// \image html base_linestyle.png
1105 /// Note:
1106 /// - Up to 30 different styles may be defined.
1107 /// - The opening and closing brackets may be omitted
1108 /// - It is recommended to use 4 as the smallest segment length and multiple of
1109 /// 4 for other lengths.
1110 /// - The line style 1 to 10 are predefined. 1 to 4 cannot be changed.
1111 
1113 {
1114 
1115  char *l;
1116  Int_t nch = strlen(text);
1117  char *st = new char[nch+10];
1118  snprintf(st,nch+10," ");
1119  strlcat(st,text,nch+10);
1120  l = strstr(st,"["); if (l) l[0] = ' ';
1121  l = strstr(st,"]"); if (l) l[0] = ' ';
1122  if (i >= 1 && i <= 29) fLineStyle[i] = st;
1123  delete [] st;
1124 }
1125 
1126 ////////////////////////////////////////////////////////////////////////////////
1127 /// Set the default number of contour levels when drawing 2-d plots.
1128 
1130 {
1131  if (number > 0 && number < 1000) {
1132  fNumberContours = number;
1133  return;
1134  }
1135 
1136  Error("SetNumberContours","Illegal number of contours: %d, must be > 0 and < 1000",number);
1137 }
1138 
1139 ////////////////////////////////////////////////////////////////////////////////
1140 /// If optdate is non null, the current date/time will be printed in the canvas.
1141 /// The position of the date string can be controlled by:
1142 /// optdate = 10*format + mode
1143 /// - mode = 1 (default) date is printed in the bottom/left corner.
1144 /// - mode = 2 date is printed in the bottom/right corner.
1145 /// - mode = 3 date is printed in the top/right corner.
1146 /// - format = 0 (default) date has the format like: "Wed Sep 25 17:10:35 2002"
1147 /// - format = 1 date has the format like: "2002-09-25"
1148 /// - format = 2 date has the format like: "2002-09-25 17:10:35"
1149 ///
1150 /// examples:
1151 /// - optdate = 1 date like "Wed Sep 25 17:10:35 2002" in the bottom/left corner.
1152 /// - optdate = 13 date like "2002-09-25" in the top/right corner.
1153 ///
1154 /// The date position can also be controlled by:
1155 /// gStyle->SetDateX(x); x in NDC
1156 /// gStyle->SetDateY(y); y in NDC
1157 ///
1158 /// The date text attributes can be changed with:
1159 /// ~~~ {.cpp}
1160 /// gStyle->GetAttDate()->SetTextFont(font=62);
1161 /// gStyle->GetAttDate()->SetTextSize(size=0.025);
1162 /// gStyle->GetAttDate()->SetTextAngle(angle=0);
1163 /// gStyle->GetAttDate()->SetTextAlign(align=11);
1164 /// gStyle->GetAttDate()->SetTextColor(color=1);
1165 /// ~~~
1166 /// The current date attributes can be obtained via:
1167 /// ~~~ {.cpp}
1168 /// gStyle->GetAttDate()->GetTextxxxx();
1169 /// ~~~
1170 /// When the date option is active, a text object is created when the pad
1171 /// paint its list of primitives. The text object is named "DATE".
1172 /// The DATE attributes can also be edited interactively (position
1173 /// and attributes) via the normal context menu.
1174 
1176 {
1177  fOptDate = optdate;
1178  Int_t mode = optdate%10;
1179  if (mode == 1) {
1180  SetDateX(0.01);
1181  SetDateY(0.01);
1182  fAttDate.SetTextAlign(11);
1183  }
1184  if (mode == 2) {
1185  SetDateX(0.99);
1186  SetDateY(0.01);
1187  fAttDate.SetTextAlign(31);
1188  }
1189  if (mode == 3) {
1190  SetDateX(0.99);
1191  SetDateY(0.99);
1192  fAttDate.SetTextAlign(33);
1193  }
1194 }
1195 
1196 ////////////////////////////////////////////////////////////////////////////////
1197 /// The type of information about fit parameters printed in the histogram
1198 /// statistics box can be selected via the parameter `mode`.
1199 /// The parameter mode can be = `pcev`:
1200 /// - p = 1; print Probability
1201 /// - c = 1; print Chisquare/Number of degrees of freedom
1202 /// - e = 1; print errors (if e=1, v must be 1)
1203 /// - v = 1; print name/values of parameters
1204 /// Example: `gStyle->SetOptFit(1011);`
1205 /// print fit probability, parameter names/values and errors.
1206 /// - When "v"=1 is specified, only the non-fixed parameters are shown.
1207 /// - When "v"=2 all parameters are shown.
1208 ///
1209 /// #### Notes:
1210 /// - `gStyle->SetOptFit(1)` is a shortcut allowing to set the most common
1211 /// case and is equivalent to `gStyle->SetOptFit(111)`
1212 /// - At ROOT startup the option fit is set to `0`. So, to see the fit parameters
1213 /// on all plot resulting from a fit, a call to `gStyle->SetOptFit()` with a
1214 /// non null value should be done. One can put it in the `rootlogon.C` file to
1215 /// always have it.
1216 ///
1217 /// see also SetOptStat below.
1218 
1220 {
1221  fOptFit = mode;
1222  if (gPad) {
1223  TObject *obj;
1224  TIter next(gPad->GetListOfPrimitives());
1225  while ((obj = next())) {
1226  TObject *stats = obj->FindObject("stats");
1227  if (stats) stats->SetBit(kTakeStyle);
1228  }
1229  gPad->Modified(); gPad->Update();
1230  }
1231 }
1232 
1233 ////////////////////////////////////////////////////////////////////////////////
1234 /// The type of information printed in the histogram statistics box
1235 /// can be selected via the parameter mode.
1236 /// The parameter mode can be = `ksiourmen`
1237 /// - k = 1; kurtosis printed
1238 /// - k = 2; kurtosis and kurtosis error printed
1239 /// - s = 1; skewness printed
1240 /// - s = 2; skewness and skewness error printed
1241 /// - i = 1; integral of bins printed
1242 /// - i = 2; integral of bins with option "width" printed
1243 /// - o = 1; number of overflows printed
1244 /// - u = 1; number of underflows printed
1245 /// - r = 1; rms printed
1246 /// - r = 2; rms and rms error printed
1247 /// - m = 1; mean value printed
1248 /// - m = 2; mean and mean error values printed
1249 /// - e = 1; number of entries printed
1250 /// - n = 1; name of histogram is printed
1251 ///
1252 /// Example: `gStyle->SetOptStat(11);`
1253 /// print only name of histogram and number of entries.
1254 /// `gStyle->SetOptStat(1101);` displays the name of histogram, mean value and RMS.
1255 ///
1256 /// #### Notes:
1257 ///
1258 /// - never call `SetOptStat(000111);` but `SetOptStat(1111)`, 0001111 will
1259 /// be taken as an octal number !!
1260 /// - `SetOptStat(1)` is s shortcut allowing to set the most common case, and is
1261 /// taken as `SetOptStat(1111)` (for backward compatibility with older versions.
1262 /// If you want to print only the name of the histogram call `SetOptStat(1000000001)`.
1263 /// - that in case of 2-D histograms, when selecting just underflow (10000)
1264 /// or overflow (100000), the stats box will show all combinations
1265 /// of underflow/overflows and not just one single number!
1266 
1268 {
1269  fOptStat = mode;
1270  if (gPad) {
1271  TObject *obj;
1272  TIter next(gPad->GetListOfPrimitives());
1273  while ((obj = next())) {
1274  TObject *stats = obj->FindObject("stats");
1275  if (stats) stats->SetBit(kTakeStyle);
1276  }
1277  gPad->Modified(); gPad->Update();
1278  }
1279 }
1280 
1281 ////////////////////////////////////////////////////////////////////////////////
1282 /// The parameter mode can be any combination of kKsSiourRmMen
1283 /// - k : kurtosis printed
1284 /// - K : kurtosis and kurtosis error printed
1285 /// - s : skewness printed
1286 /// - S : skewness and skewness error printed
1287 /// - i : integral of bins printed
1288 /// - I : integral of bins with option "width" printed
1289 /// - o : number of overflows printed
1290 /// - u : number of underflows printed
1291 /// - r : rms printed
1292 /// - R : rms and rms error printed
1293 /// - m : mean value printed
1294 /// - M : mean value mean error values printed
1295 /// - e : number of entries printed
1296 /// - n : name of histogram is printed
1297 ///
1298 /// Example: `gStyle->SetOptStat("ne");`
1299 /// print only name of histogram and number of entries.
1300 ///
1301 /// - `gStyle->SetOptStat("n")` print only the name of the histogram
1302 /// - `gStyle->SetOptStat("nemr")` is the default
1303 
1305 {
1306  Int_t mode=0;
1307 
1308  TString opt = stat;
1309 
1310  if (opt.Contains("n")) mode+=1;
1311  if (opt.Contains("e")) mode+=10;
1312  if (opt.Contains("m")) mode+=100;
1313  if (opt.Contains("M")) mode+=200;
1314  if (opt.Contains("r")) mode+=1000;
1315  if (opt.Contains("R")) mode+=2000;
1316  if (opt.Contains("u")) mode+=10000;
1317  if (opt.Contains("o")) mode+=100000;
1318  if (opt.Contains("i")) mode+=1000000;
1319  if (opt.Contains("I")) mode+=2000000;
1320  if (opt.Contains("s")) mode+=10000000;
1321  if (opt.Contains("S")) mode+=20000000;
1322  if (opt.Contains("k")) mode+=100000000;
1323  if (opt.Contains("K")) mode+=200000000;
1324  if (mode == 1) mode = 1000000001;
1325 
1326  SetOptStat(mode);
1327 }
1328 
1329 ////////////////////////////////////////////////////////////////////////////////
1330 /// Set paper size for PostScript output.
1331 
1333 {
1334  switch (size) {
1335  case kA4:
1336  SetPaperSize(20, 26);
1337  break;
1338  case kUSLetter:
1339  SetPaperSize(20, 24);
1340  break;
1341  default:
1342  Error("SetPaperSize", "illegal paper size %d\n", (int)size);
1343  break;
1344  }
1345 }
1346 
1347 ////////////////////////////////////////////////////////////////////////////////
1348 /// Set paper size for PostScript output.
1349 /// The paper size is specified in centimeters. Default is 20x26.
1350 /// See also TPad::Print
1351 
1353 {
1354  fPaperSizeX = xsize;
1355  fPaperSizeY = ysize;
1356 }
1357 
1358 ////////////////////////////////////////////////////////////////////////////////
1359 /// Set the tick marks length for an axis.
1360 /// axis specifies which axis ("x","y","z"), default = "x"
1361 /// if axis="xyz" set all 3 axes
1362 
1364 {
1365  TString opt = axis;
1366  opt.ToLower();
1367 
1368  if (opt.Contains("x")) fXaxis.SetTickLength(length);
1369  if (opt.Contains("y")) fYaxis.SetTickLength(length);
1370  if (opt.Contains("z")) fZaxis.SetTickLength(length);
1371 }
1372 
1373 ////////////////////////////////////////////////////////////////////////////////
1374 /// - if axis =="x" set the X axis title color
1375 /// - if axis =="y" set the Y axis title color
1376 /// - if axis =="z" set the Z axis title color
1377 ///
1378 /// any other value of axis will set the pad title color
1379 ///
1380 /// if axis="xyz" set all 3 axes
1381 
1383 {
1384  TString opt = axis;
1385  opt.ToLower();
1386 
1387  Bool_t set = kFALSE;
1388  if (opt.Contains("x")) {fXaxis.SetTitleColor(color); set = kTRUE;}
1389  if (opt.Contains("y")) {fYaxis.SetTitleColor(color); set = kTRUE;}
1390  if (opt.Contains("z")) {fZaxis.SetTitleColor(color); set = kTRUE;}
1391  if (!set) fTitleColor = color;
1392 }
1393 
1394 ////////////////////////////////////////////////////////////////////////////////
1395 /// - if axis =="x" set the X axis title font
1396 /// - if axis =="y" set the Y axis title font
1397 /// - if axis =="z" set the Z axis title font
1398 ///
1399 /// any other value of axis will set the pad title font
1400 ///
1401 /// if axis="xyz" set all 3 axes
1402 
1404 {
1405  TString opt = axis;
1406  opt.ToLower();
1407 
1408  Bool_t set = kFALSE;
1409  if (opt.Contains("x")) {fXaxis.SetTitleFont(font); set = kTRUE;}
1410  if (opt.Contains("y")) {fYaxis.SetTitleFont(font); set = kTRUE;}
1411  if (opt.Contains("z")) {fZaxis.SetTitleFont(font); set = kTRUE;}
1412  if (!set) fTitleFont = font;
1413 }
1414 
1415 ////////////////////////////////////////////////////////////////////////////////
1416 /// Specify a parameter offset to control the distance between the axis
1417 /// and the axis title.
1418 ///
1419 /// - offset = 1 means : use the default distance
1420 /// - offset = 1.2 means: the distance will be 1.2*(default distance)
1421 /// - offset = 0.8 means: the distance will be 0.8*(default distance)
1422 ///
1423 /// axis specifies which axis ("x","y","z"), default = "x"
1424 /// if axis="xyz" set all 3 axes
1425 
1427 {
1428  TString opt = axis;
1429  opt.ToLower();
1430 
1431  if (opt.Contains("x")) fXaxis.SetTitleOffset(offset);
1432  if (opt.Contains("y")) fYaxis.SetTitleOffset(offset);
1433  if (opt.Contains("z")) fZaxis.SetTitleOffset(offset);
1434 }
1435 
1436 ////////////////////////////////////////////////////////////////////////////////
1437 /// - if axis =="x" set the X axis title size
1438 /// - if axis =="y" set the Y axis title size
1439 /// - if axis =="z" set the Z axis title size
1440 ///
1441 /// any other value of axis will set the pad title size
1442 ///
1443 /// if axis="xyz" set all 3 axes
1444 
1446 {
1447  TString opt = axis;
1448  opt.ToLower();
1449 
1450  Bool_t set = kFALSE;
1451  if (opt.Contains("x")) {fXaxis.SetTitleSize(size); set = kTRUE;}
1452  if (opt.Contains("y")) {fYaxis.SetTitleSize(size); set = kTRUE;}
1453  if (opt.Contains("z")) {fZaxis.SetTitleSize(size); set = kTRUE;}
1454  if (!set) fTitleFontSize = size;
1455 }
1456 
1457 ////////////////////////////////////////////////////////////////////////////////
1458 /// See TColor::SetPalette.
1459 
1461 {
1462  TColor::SetPalette(ncolors,colors,alpha);
1463 }
1464 
1465 ////////////////////////////////////////////////////////////////////////////////
1466 /// Change the time offset for time plotting.
1467 /// Times are expressed in seconds. The corresponding numbers usually have 9
1468 /// digits (or more if one takes into account fractions of seconds).
1469 /// Thus, since it is very inconvenient to plot very large numbers on a scale,
1470 /// one has to set an offset time that will be added to the axis beginning,
1471 /// in order to plot times correctly and conveniently. A convenient way to
1472 /// set the time offset is to use TDatime::Convert().
1473 ///
1474 /// By default the time offset is set to 788918400 which corresponds to
1475 /// 01/01/1995. This allows to have valid dates until 2072. The standard
1476 /// UNIX time offset in 1970 allows only valid dates until 2030.
1477 
1479 {
1480  fTimeOffset = toffset;
1481 }
1482 
1483 ////////////////////////////////////////////////////////////////////////////////
1484 /// Set option to strip decimals when drawing axis labels.
1485 /// By default, TGaxis::PaintAxis removes trailing 0s after a dot
1486 /// in the axis labels. Ex: {0,0.5,1,1.5,2,2.5, etc}
1487 /// If this function is called with strip=kFALSE, TGAxis::PaintAxis will
1488 /// draw labels with the same number of digits after the dot
1489 /// Ex: (0.0,0.5,1.0,1.5,2.0,2.5,etc}
1490 
1492 {
1493  fStripDecimals = strip;
1494 }
1495 
1496 ////////////////////////////////////////////////////////////////////////////////
1497 /// Save the current style in a C++ macro file.
1498 
1499 void TStyle::SaveSource(const char *filename, Option_t *option)
1500 {
1501  // Opens a file named filename or "Rootstyl.C"
1502  TString ff = strlen(filename) ? filename : "Rootstyl.C";
1503 
1504  // Computes the main method name.
1505  const char *fname = gSystem->BaseName(ff);
1506  Int_t lenfname = strlen(fname);
1507  char *sname = new char[lenfname + 1];
1508  Int_t i = 0;
1509  while ((fname[i] != '.') && (i < lenfname)) {
1510  sname[i] = fname[i];
1511  i++;
1512  }
1513  if (i == lenfname) ff += ".C";
1514  sname[i] = 0;
1515 
1516  // Tries to open the file.
1517  std::ofstream out;
1518  out.open(ff.Data(), std::ios::out);
1519  if (!out.good()) {
1520  delete [] sname;
1521  Error("SaveSource", "cannot open file: %s", ff.Data());
1522  return;
1523  }
1524 
1525  // Writes macro header, date/time stamp as string, and the used Root version
1526  TDatime t;
1527  out <<"// Mainframe macro generated from application: " << gApplication->Argv(0) << std::endl;
1528  out <<"// By ROOT version " << gROOT->GetVersion() << " on " << t.AsSQLString() << std::endl;
1529  out << std::endl;
1530 
1531  char quote = '"';
1532 
1533  // Writes include.
1534  out << "#if !defined( __CINT__) || defined (__MAKECINT__)" << std::endl << std::endl;
1535  out << "#ifndef ROOT_TStyle" << std::endl;
1536  out << "#include " << quote << "TStyle.h" << quote << std::endl;
1537  out << "#endif" << std::endl;
1538  out << std::endl << "#endif" << std::endl;
1539 
1540  // Writes the macro entry point equal to the fname
1541  out << std::endl;
1542  out << "void " << sname << "()" << std::endl;
1543  out << "{" << std::endl;
1544  delete [] sname;
1545 
1546  TStyle::SavePrimitive(out, option);
1547 
1548  out << "}" << std::endl;
1549  out.close();
1550 
1551  printf(" C++ macro file %s has been generated\n", gSystem->BaseName(ff));
1552 }
1553 
1554 ////////////////////////////////////////////////////////////////////////////////
1555 /// Save a main frame widget as a C++ statement(s) on output stream out.
1556 
1557 void TStyle::SavePrimitive(std::ostream &out, Option_t * /*= ""*/)
1558 {
1559  char quote = '"';
1560 
1561  out << " // Add the saved style to the current ROOT session." << std::endl;
1562  out << std::endl;
1563  out<<" "<<"delete gROOT->GetStyle("<<quote<<GetName()<<quote<<");"<< std::endl;
1564  out << std::endl;
1565  out<<" "<<"TStyle *tmpStyle = new TStyle("
1566  << quote << GetName() << quote << ", "
1567  << quote << GetTitle() << quote << ");" << std::endl;
1568 
1569  // fXAxis, fYAxis and fZAxis
1570  out<<" "<<"tmpStyle->SetNdivisions(" <<GetNdivisions("x") <<", \"x\");"<<std::endl;
1571  out<<" "<<"tmpStyle->SetNdivisions(" <<GetNdivisions("y") <<", \"y\");"<<std::endl;
1572  out<<" "<<"tmpStyle->SetNdivisions(" <<GetNdivisions("z") <<", \"z\");"<<std::endl;
1573  out<<" "<<"tmpStyle->SetAxisColor(" <<GetAxisColor("x") <<", \"x\");"<<std::endl;
1574  out<<" "<<"tmpStyle->SetAxisColor(" <<GetAxisColor("y") <<", \"y\");"<<std::endl;
1575  out<<" "<<"tmpStyle->SetAxisColor(" <<GetAxisColor("z") <<", \"z\");"<<std::endl;
1576  out<<" "<<"tmpStyle->SetLabelColor(" <<GetLabelColor("x") <<", \"x\");"<<std::endl;
1577  out<<" "<<"tmpStyle->SetLabelColor(" <<GetLabelColor("y") <<", \"y\");"<<std::endl;
1578  out<<" "<<"tmpStyle->SetLabelColor(" <<GetLabelColor("z") <<", \"z\");"<<std::endl;
1579  out<<" "<<"tmpStyle->SetLabelFont(" <<GetLabelFont("x") <<", \"x\");"<<std::endl;
1580  out<<" "<<"tmpStyle->SetLabelFont(" <<GetLabelFont("y") <<", \"y\");"<<std::endl;
1581  out<<" "<<"tmpStyle->SetLabelFont(" <<GetLabelFont("z") <<", \"z\");"<<std::endl;
1582  out<<" "<<"tmpStyle->SetLabelOffset("<<GetLabelOffset("x")<<", \"x\");"<<std::endl;
1583  out<<" "<<"tmpStyle->SetLabelOffset("<<GetLabelOffset("y")<<", \"y\");"<<std::endl;
1584  out<<" "<<"tmpStyle->SetLabelOffset("<<GetLabelOffset("z")<<", \"z\");"<<std::endl;
1585  out<<" "<<"tmpStyle->SetLabelSize(" <<GetLabelSize("x") <<", \"x\");"<<std::endl;
1586  out<<" "<<"tmpStyle->SetLabelSize(" <<GetLabelSize("y") <<", \"y\");"<<std::endl;
1587  out<<" "<<"tmpStyle->SetLabelSize(" <<GetLabelSize("z") <<", \"z\");"<<std::endl;
1588  out<<" "<<"tmpStyle->SetTickLength(" <<GetTickLength("x") <<", \"x\");"<<std::endl;
1589  out<<" "<<"tmpStyle->SetTickLength(" <<GetTickLength("y") <<", \"y\");"<<std::endl;
1590  out<<" "<<"tmpStyle->SetTickLength(" <<GetTickLength("z") <<", \"z\");"<<std::endl;
1591  out<<" "<<"tmpStyle->SetTitleOffset("<<GetTitleOffset("x")<<", \"x\");"<<std::endl;
1592  out<<" "<<"tmpStyle->SetTitleOffset("<<GetTitleOffset("y")<<", \"y\");"<<std::endl;
1593  out<<" "<<"tmpStyle->SetTitleOffset("<<GetTitleOffset("z")<<", \"z\");"<<std::endl;
1594  out<<" "<<"tmpStyle->SetTitleSize(" <<GetTitleSize("x") <<", \"x\");"<<std::endl;
1595  out<<" "<<"tmpStyle->SetTitleSize(" <<GetTitleSize("y") <<", \"y\");"<<std::endl;
1596  out<<" "<<"tmpStyle->SetTitleSize(" <<GetTitleSize("z") <<", \"z\");"<<std::endl;
1597  out<<" "<<"tmpStyle->SetTitleColor(" <<GetTitleColor("x") <<", \"x\");"<<std::endl;
1598  out<<" "<<"tmpStyle->SetTitleColor(" <<GetTitleColor("y") <<", \"y\");"<<std::endl;
1599  out<<" "<<"tmpStyle->SetTitleColor(" <<GetTitleColor("z") <<", \"z\");"<<std::endl;
1600  out<<" "<<"tmpStyle->SetTitleFont(" <<GetTitleFont("x") <<", \"x\");"<<std::endl;
1601  out<<" "<<"tmpStyle->SetTitleFont(" <<GetTitleFont("y") <<", \"y\");"<<std::endl;
1602  out<<" "<<"tmpStyle->SetTitleFont(" <<GetTitleFont("z") <<", \"z\");"<<std::endl;
1603 
1604  out<<" "<<"tmpStyle->SetBarWidth(" <<GetBarWidth() <<");"<<std::endl;
1605  out<<" "<<"tmpStyle->SetBarOffset(" <<GetBarOffset() <<");"<<std::endl;
1606  out<<" "<<"tmpStyle->SetDrawBorder(" <<GetDrawBorder() <<");"<<std::endl;
1607  out<<" "<<"tmpStyle->SetOptLogx(" <<GetOptLogx() <<");"<<std::endl;
1608  out<<" "<<"tmpStyle->SetOptLogy(" <<GetOptLogy() <<");"<<std::endl;
1609  out<<" "<<"tmpStyle->SetOptLogz(" <<GetOptLogz() <<");"<<std::endl;
1610  out<<" "<<"tmpStyle->SetOptDate(" <<GetOptDate() <<");"<<std::endl;
1611  out<<" "<<"tmpStyle->SetOptStat(" <<GetOptStat() <<");"<<std::endl;
1612 
1613  if (GetOptTitle()) out << " tmpStyle->SetOptTitle(kTRUE);" << std::endl;
1614  else out << " tmpStyle->SetOptTitle(kFALSE);" << std::endl;
1615  out<<" "<<"tmpStyle->SetOptFit(" <<GetOptFit() <<");"<<std::endl;
1616  out<<" "<<"tmpStyle->SetNumberContours(" <<GetNumberContours() <<");"<<std::endl;
1617 
1618  // fAttDate
1619  out<<" "<<"tmpStyle->GetAttDate()->SetTextFont(" <<GetAttDate()->GetTextFont() <<");"<<std::endl;
1620  out<<" "<<"tmpStyle->GetAttDate()->SetTextSize(" <<GetAttDate()->GetTextSize() <<");"<<std::endl;
1621  out<<" "<<"tmpStyle->GetAttDate()->SetTextAngle("<<GetAttDate()->GetTextAngle()<<");"<<std::endl;
1622  out<<" "<<"tmpStyle->GetAttDate()->SetTextAlign("<<GetAttDate()->GetTextAlign()<<");"<<std::endl;
1623  out<<" "<<"tmpStyle->GetAttDate()->SetTextColor("<<GetAttDate()->GetTextColor()<<");"<<std::endl;
1624 
1625  out<<" "<<"tmpStyle->SetDateX(" <<GetDateX() <<");"<<std::endl;
1626  out<<" "<<"tmpStyle->SetDateY(" <<GetDateY() <<");"<<std::endl;
1627  out<<" "<<"tmpStyle->SetEndErrorSize(" <<GetEndErrorSize() <<");"<<std::endl;
1628  out<<" "<<"tmpStyle->SetErrorX(" <<GetErrorX() <<");"<<std::endl;
1629  out<<" "<<"tmpStyle->SetFuncColor(" <<GetFuncColor() <<");"<<std::endl;
1630  out<<" "<<"tmpStyle->SetFuncStyle(" <<GetFuncStyle() <<");"<<std::endl;
1631  out<<" "<<"tmpStyle->SetFuncWidth(" <<GetFuncWidth() <<");"<<std::endl;
1632  out<<" "<<"tmpStyle->SetGridColor(" <<GetGridColor() <<");"<<std::endl;
1633  out<<" "<<"tmpStyle->SetGridStyle(" <<GetGridStyle() <<");"<<std::endl;
1634  out<<" "<<"tmpStyle->SetGridWidth(" <<GetGridWidth() <<");"<<std::endl;
1635  out<<" "<<"tmpStyle->SetLegendBorderSize("<<GetLegendBorderSize()<<");"<<std::endl;
1636  out<<" "<<"tmpStyle->SetLegendFillColor(" <<GetLegendFillColor() <<");"<<std::endl;
1637  out<<" "<<"tmpStyle->SetLegendFont(" <<GetLegendFont() <<");"<<std::endl;
1638  out<<" "<<"tmpStyle->SetLegendTextSize(" <<GetLegendTextSize() <<");"<<std::endl;
1639  out<<" "<<"tmpStyle->SetHatchesLineWidth("<<GetHatchesLineWidth()<<");"<<std::endl;
1640  out<<" "<<"tmpStyle->SetHatchesSpacing(" <<GetHatchesSpacing() <<");"<<std::endl;
1641  out<<" "<<"tmpStyle->SetFrameFillColor(" <<GetFrameFillColor() <<");"<<std::endl;
1642  out<<" "<<"tmpStyle->SetFrameLineColor(" <<GetFrameLineColor() <<");"<<std::endl;
1643  out<<" "<<"tmpStyle->SetFrameFillStyle(" <<GetFrameFillStyle() <<");"<<std::endl;
1644  out<<" "<<"tmpStyle->SetFrameLineStyle(" <<GetFrameLineStyle() <<");"<<std::endl;
1645  out<<" "<<"tmpStyle->SetFrameLineWidth(" <<GetFrameLineWidth() <<");"<<std::endl;
1646  out<<" "<<"tmpStyle->SetFrameBorderSize(" <<GetFrameBorderSize() <<");"<<std::endl;
1647  out<<" "<<"tmpStyle->SetFrameBorderMode(" <<GetFrameBorderMode() <<");"<<std::endl;
1648  out<<" "<<"tmpStyle->SetHistFillColor(" <<GetHistFillColor() <<");"<<std::endl;
1649  out<<" "<<"tmpStyle->SetHistLineColor(" <<GetHistLineColor() <<");"<<std::endl;
1650  out<<" "<<"tmpStyle->SetHistFillStyle(" <<GetHistFillStyle() <<");"<<std::endl;
1651  out<<" "<<"tmpStyle->SetHistLineStyle(" <<GetHistLineStyle() <<");"<<std::endl;
1652  out<<" "<<"tmpStyle->SetHistLineWidth(" <<GetHistLineWidth() <<");"<<std::endl;
1653  if (GetHistMinimumZero()) out<<" tmpStyle->SetHistMinimumZero(kTRUE);" <<std::endl;
1654  else out<<" tmpStyle->SetHistMinimumZero(kFALSE);"<<std::endl;
1655  if (GetCanvasPreferGL()) out<<" tmpStyle->SetCanvasPreferGL(kTRUE);" <<std::endl;
1656  else out<<" tmpStyle->SetCanvasPreferGL(kFALSE);"<<std::endl;
1657  out<<" "<<"tmpStyle->SetCanvasColor(" <<GetCanvasColor() <<");"<<std::endl;
1658  out<<" "<<"tmpStyle->SetCanvasBorderSize("<<GetCanvasBorderSize()<<");"<<std::endl;
1659  out<<" "<<"tmpStyle->SetCanvasBorderMode("<<GetCanvasBorderMode()<<");"<<std::endl;
1660  out<<" "<<"tmpStyle->SetCanvasDefH(" <<GetCanvasDefH() <<");"<<std::endl;
1661  out<<" "<<"tmpStyle->SetCanvasDefW(" <<GetCanvasDefW() <<");"<<std::endl;
1662  out<<" "<<"tmpStyle->SetCanvasDefX(" <<GetCanvasDefX() <<");"<<std::endl;
1663  out<<" "<<"tmpStyle->SetCanvasDefY(" <<GetCanvasDefY() <<");"<<std::endl;
1664  out<<" "<<"tmpStyle->SetPadColor(" <<GetPadColor() <<");"<<std::endl;
1665  out<<" "<<"tmpStyle->SetPadBorderSize(" <<GetPadBorderSize() <<");"<<std::endl;
1666  out<<" "<<"tmpStyle->SetPadBorderMode(" <<GetPadBorderMode() <<");"<<std::endl;
1667  out<<" "<<"tmpStyle->SetPadBottomMargin(" <<GetPadBottomMargin() <<");"<<std::endl;
1668  out<<" "<<"tmpStyle->SetPadTopMargin(" <<GetPadTopMargin() <<");"<<std::endl;
1669  out<<" "<<"tmpStyle->SetPadLeftMargin(" <<GetPadLeftMargin() <<");"<<std::endl;
1670  out<<" "<<"tmpStyle->SetPadRightMargin(" <<GetPadRightMargin() <<");"<<std::endl;
1671  if (GetPadGridX()) out<<" tmpStyle->SetPadGridX(kTRUE);" <<std::endl;
1672  else out<<" tmpStyle->SetPadGridX(kFALSE);"<<std::endl;
1673  if (GetPadGridY()) out<<" tmpStyle->SetPadGridY(kTRUE);" <<std::endl;
1674  else out<<" tmpStyle->SetPadGridY(kFALSE);"<<std::endl;
1675  out<<" "<<"tmpStyle->SetPadTickX(" <<GetPadTickX() <<");"<<std::endl;
1676  out<<" "<<"tmpStyle->SetPadTickY(" <<GetPadTickY() <<");"<<std::endl;
1677 
1678  // fPaperSizeX, fPaperSizeY
1679  out<<" "<<"tmpStyle->SetPaperSize(" <<fPaperSizeX <<", "
1680  <<fPaperSizeY <<");"<<std::endl;
1681 
1682  out<<" "<<"tmpStyle->SetScreenFactor(" <<GetScreenFactor() <<");"<<std::endl;
1683  out<<" "<<"tmpStyle->SetStatColor(" <<GetStatColor() <<");"<<std::endl;
1684  out<<" "<<"tmpStyle->SetStatTextColor(" <<GetStatTextColor() <<");"<<std::endl;
1685  out<<" "<<"tmpStyle->SetStatBorderSize(" <<GetStatBorderSize() <<");"<<std::endl;
1686  out<<" "<<"tmpStyle->SetStatFont(" <<GetStatFont() <<");"<<std::endl;
1687  out<<" "<<"tmpStyle->SetStatFontSize(" <<GetStatFontSize() <<");"<<std::endl;
1688  out<<" "<<"tmpStyle->SetStatStyle(" <<GetStatStyle() <<");"<<std::endl;
1689  out<<" "<<"tmpStyle->SetStatFormat(" <<quote << GetStatFormat()
1690  <<quote <<");"<<std::endl;
1691  out<<" "<<"tmpStyle->SetStatX(" <<GetStatX() <<");"<<std::endl;
1692  out<<" "<<"tmpStyle->SetStatY(" <<GetStatY() <<");"<<std::endl;
1693  out<<" "<<"tmpStyle->SetStatW(" <<GetStatW() <<");"<<std::endl;
1694  out<<" "<<"tmpStyle->SetStatH(" <<GetStatH() <<");"<<std::endl;
1695  if (GetStripDecimals()) out<<" tmpStyle->SetStripDecimals(kTRUE);" <<std::endl;
1696  else out<<" tmpStyle->SetStripDecimals(kFALSE);"<<std::endl;
1697  out<<" "<<"tmpStyle->SetTitleAlign(" <<GetTitleAlign() <<");"<<std::endl;
1698  out<<" "<<"tmpStyle->SetTitleFillColor(" <<GetTitleFillColor() <<");"<<std::endl;
1699  out<<" "<<"tmpStyle->SetTitleTextColor(" <<GetTitleTextColor() <<");"<<std::endl;
1700  out<<" "<<"tmpStyle->SetTitleBorderSize("<<GetTitleBorderSize()<<");"<<std::endl;
1701  out<<" "<<"tmpStyle->SetTitleFont(" <<GetTitleFont() <<");"<<std::endl;
1702  out<<" "<<"tmpStyle->SetTitleFontSize(" <<GetTitleFontSize() <<");"<<std::endl;
1703  out<<" "<<"tmpStyle->SetTitleStyle(" <<GetTitleStyle() <<");"<<std::endl;
1704  out<<" "<<"tmpStyle->SetTitleX(" <<GetTitleX() <<");"<<std::endl;
1705  out<<" "<<"tmpStyle->SetTitleY(" <<GetTitleY() <<");"<<std::endl;
1706  out<<" "<<"tmpStyle->SetTitleW(" <<GetTitleW() <<");"<<std::endl;
1707  out<<" "<<"tmpStyle->SetTitleH(" <<GetTitleH() <<");"<<std::endl;
1708  out<<" "<<"tmpStyle->SetLegoInnerR(" <<GetLegoInnerR() <<");"<<std::endl;
1709  out<<std::endl;
1710 
1711  // fPalette
1712  out<<" "<<"Int_t fPaletteColor[" <<GetNumberOfColors() <<"] = {";
1713  for (Int_t ci=0; ci<GetNumberOfColors()-1; ++ci) {
1714  if (ci % 10 == 9)
1715  out<<std::endl<<" ";
1716  out<<GetColorPalette(ci)<<", ";
1717  }
1718  out<<GetColorPalette(GetNumberOfColors() - 1) <<"};"<<std::endl;
1719  out<<" "<<"tmpStyle->SetPalette(" << GetNumberOfColors()
1720  << ", fPaletteColor);" << std::endl;
1721  out<<std::endl;
1722 
1723  // fLineStyle
1724  out<<" "<<"TString fLineStyleArrayTmp[30] = {";
1725  for (Int_t li=0; li<29; ++li) {
1726  if (li % 5 == 4)
1727  out<<std::endl<<" ";
1728  out<<quote << fLineStyle[li].Data() << quote << ", ";
1729  }
1730  out<<quote<<fLineStyle[29].Data()<<quote<<"};"<<std::endl;
1731  out<<" "<<"for (Int_t i=0; i<30; i++)"<<std::endl;
1732  out<<" "<<" tmpStyle->SetLineStyleString(i, fLineStyleArrayTmp[i]);"<<std::endl;
1733  out<<std::endl;
1734 
1735  out<<" "<<"tmpStyle->SetHeaderPS(" <<quote<<GetHeaderPS()
1736  <<quote <<");"<<std::endl;
1737  out<<" "<<"tmpStyle->SetTitlePS(" <<quote<<GetTitlePS()
1738  <<quote <<");"<<std::endl;
1739  out<<" "<<"tmpStyle->SetFitFormat(" <<quote<<GetFitFormat()
1740  <<quote <<");"<<std::endl;
1741  out<<" "<<"tmpStyle->SetPaintTextFormat("<<quote<<GetPaintTextFormat()
1742  <<quote <<");"<<std::endl;
1743  out<<" "<<"tmpStyle->SetLineScalePS(" <<GetLineScalePS() <<");"<<std::endl;
1744  out<<" "<<"tmpStyle->SetJoinLinePS(" <<GetJoinLinePS() <<");"<<std::endl;
1745  out<<" "<<"tmpStyle->SetColorModelPS(" <<GetColorModelPS() <<");"<<std::endl;
1746  out<<" "<<Form("tmpStyle->SetTimeOffset(%9.0f);", GetTimeOffset()) <<std::endl;
1747  out<<std::endl;
1748 
1749  // Inheritance :
1750  // TAttLine :
1751  out <<" " <<"tmpStyle->SetLineColor(" <<GetLineColor() <<");" <<std::endl;
1752  out <<" " <<"tmpStyle->SetLineStyle(" <<GetLineStyle() <<");" <<std::endl;
1753  out <<" " <<"tmpStyle->SetLineWidth(" <<GetLineWidth() <<");" <<std::endl;
1754 
1755  // TAttFill
1756  out <<" " <<"tmpStyle->SetFillColor(" <<GetFillColor() <<");" <<std::endl;
1757  out <<" " <<"tmpStyle->SetFillStyle(" <<GetFillStyle() <<");" <<std::endl;
1758 
1759  // TAttMarker
1760  out <<" " <<"tmpStyle->SetMarkerColor(" <<GetMarkerColor() <<");" <<std::endl;
1761  out <<" " <<"tmpStyle->SetMarkerSize(" <<GetMarkerSize() <<");" <<std::endl;
1762  out <<" " <<"tmpStyle->SetMarkerStyle(" <<GetMarkerStyle() <<");" <<std::endl;
1763 
1764  // TAttText
1765  out <<" " <<"tmpStyle->SetTextAlign(" <<GetTextAlign() <<");" <<std::endl;
1766  out <<" " <<"tmpStyle->SetTextAngle(" <<GetTextAngle() <<");" <<std::endl;
1767  out <<" " <<"tmpStyle->SetTextColor(" <<GetTextColor() <<");" <<std::endl;
1768  out <<" " <<"tmpStyle->SetTextFont(" <<GetTextFont() <<");" <<std::endl;
1769  out <<" " <<"tmpStyle->SetTextSize(" <<GetTextSize() <<");" <<std::endl;
1770 }
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:931
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:262
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:969
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:1042
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:56
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:952
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:75
virtual Color_t GetAxisColor() const
Definition: TAttAxis.h:37
Definition: Rtypes.h:55
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:1499
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:1368
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:375
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:1403
Basic string class.
Definition: TString.h:129
virtual void SetTitleFont(Style_t font=62)
Set the title font.
Definition: TAttAxis.cxx:290
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:56
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:1478
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:145
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:1012
void SetLineStyleString(Int_t i, const char *text)
Set line style string using the PostScript convention.
Definition: TStyle.cxx:1112
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:687
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:938
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:2317
const UInt_t kTakeStyle
Definition: TStyle.cxx:28
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:1445
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:1129
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:1356
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:1022
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:991
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:1382
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:328
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:539
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
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:1175
Float_t GetStatW() const
Definition: TStyle.h:250
void SetTitleStyle(Style_t style=1001)
Definition: TStyle.h:379
virtual Int_t GetValue(const char *name, Int_t dflt)
Returns the integer value for a resource.
Definition: TEnv.cxx:482
void SetIsReading(Bool_t reading=kTRUE)
Sets the fIsReading member to reading (default=kTRUE).
Definition: TStyle.cxx:1003
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:1219
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 if (TClass::GetClass("TStyleManager")) gSystem->Load("libGed"...
Definition: TStyle.cxx:880
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:873
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:1363
virtual ~TStyle()
Destructor.
Definition: TStyle.cxx:264
TLine * l
Definition: textangle.C:4
Double_t fHatchesSpacing
Hatches spacing for hatch styles > 3100.
Definition: TStyle.h:66
void SetFuncWidth(Width_t width=4)
Definition: TStyle.h:342
const std::string sname
Definition: testIO.cxx:45
void SavePrimitive(std::ostream &out, Option_t *="")
Save a main frame widget as a C++ statement(s) on output stream out.
Definition: TStyle.cxx:1557
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:904
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
void Reset(Detail::TBranchProxy *x)
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:917
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:281
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:272
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
#define R__LOCKGUARD2(mutex)
Float_t GetTitleOffset(Option_t *axis="X") const
Return title offset.
Definition: TStyle.cxx:855
const Bool_t kFALSE
Definition: RtypesCore.h:92
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:1058
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:336
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:1426
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:170
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:572
Float_t fPadLeftMargin
Pad left margin.
Definition: TStyle.h:94
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:1332
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:1073
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
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:1267
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:284
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:249
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:56
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
const Bool_t kTRUE
Definition: RtypesCore.h:91
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:1460
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
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:1491
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
TStyle * gStyle
Definition: TStyle.cxx:27
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:347
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