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