Logo ROOT  
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 <cstring>
13#include <cstdio>
14#include <cctype>
15#include <cmath>
16#include <iostream>
17#include <fstream>
18
19#include "strlcpy.h"
20#include "TApplication.h"
21#include "TColor.h"
22#include "TDatime.h"
23#include "TROOT.h"
24#include "TStyle.h"
25#include "TSystem.h"
26#include "TVirtualPad.h"
27#include "TVirtualMutex.h"
28#include "TEnv.h"
29
31const UInt_t kTakeStyle = BIT(17);
32
34
35/** \class TStyle
36\ingroup Base
37 \ingroup GraphicsAtt
38
39TStyle objects may be created to define special styles.
40By default ROOT creates a default style that can be accessed via
41the gStyle pointer.
42
43This class includes functions to set some of the following object attributes.
44 - Canvas
45 - Pad
46 - Histogram axis
47 - Lines
48 - Fill areas
49 - Text
50 - Markers
51 - Functions
52 - Histogram Statistics and Titles
53
54All objects that can be drawn in a pad inherit from one or more attribute classes
55like TAttLine, TAttFill, TAttText, TAttMarker. When the objects are created, their
56default attributes are taken from the current style. The current style is an object
57of the class[TStyle](https://root.cern.ch/doc/master/classTStyle.html) and can be
58referenced via the global variable `gStyle` (in TStyle.h).
59
60ROOT provides two styles called "Default" and "Plain". The "Default"
61style is created simply by:
62
63~~~ .cpp
64auto default = new TStyle("Default","Default Style");
65~~~
66
67The `Plain` style can be used if you are working on a monochrome display or
68if you want to get a "conventional" Postscript output. These are the instructions
69in the ROOT constructor to create the `Plain` style.
70
71```
72auto plain = new TStyle("Plain","Plain Style (no colors/fill areas)");
73
74 plain->SetCanvasBorderMode(0);
75 plain->SetPadBorderMode(0);
76 plain->SetPadColor(0);
77 plain->SetCanvasColor(0);
78 plain->SetTitleColor(0);
79 plain->SetStatColor(0);
80```
81
82You can set the current style with:
83
84```
85gROOT->SetStyle(style_name);
86```
87
88You can get a pointer to an existing style with:
89
90```
91auto style = gROOT->GetStyle(style_name);
92```
93
94You can create additional styles with:
95
96```
97 TStyle *st1 = new TStyle("st1","my style");
98 st1->Set....
99 st1->cd(); this becomes now the current style gStyle
100```
101
102In your [rootlogon.C](https://root.cern.ch/doc/master/classexamples/startsession.log.html)
103file, you can redefine the default parameters via statements like:
104
105```
106 gStyle->SetStatX(0.7);
107 gStyle->SetStatW(0.2);
108 gStyle->SetLabelOffset(1.2);
109 gStyle->SetLabelFont(72);
110```
111
112Note that when an object is created, its attributes are taken from the current
113style. For example, you may have created an histogram in a previous session,
114saved it in a file. Meanwhile, if you have changed the style, the histogram will
115be drawn with the old attributes. You can force the current style attributes to
116be set when you read an object from a file by calling:
117
118```
119gROOT->ForceStyle();
120```
121
122before reading the objects from the file.
123
124Let's assume you have a canvas or pad with your histogram or any other object,
125you can force these objects to get the attributes of the current style via:
126
127```
128canvas->UseCurrentStyle();
129```
130
131The description of the style functions should be clear from the name of the
132TStyle Setters or Getters. Some functions have an extended description, in particular:
133
134 - TStyle:SetLabelFont.
135 - TStyle:SetLineStyleString, to set the format of dashed lines.
136 - TStyle:SetOptStat.
137 - TStyle:SetPalette to change the colors palette.
138 - TStyle:SetTitleOffset.
139
140*/
141
142////////////////////////////////////////////////////////////////////////////////
143/// Default constructor.
144
146{
147 Reset();
148}
149
150////////////////////////////////////////////////////////////////////////////////
151/// Create a new TStyle.
152/// The following names are reserved to create special styles:
153///
154/// - `Classic`: Similar to `Default` style set in TStyle::Reset
155/// - `Plain`: a black&white oriented style
156/// - `Bold`
157/// - `Video`
158/// - `Pub`
159/// - `Modern`: Used when ROOT starts
160/// - `ATLAS`: style used by the ATLAS experiment
161/// - `BELLE2`: style used by the BELLE II experiment
162/// (see the definition of these styles below).
163///
164/// Note a side-effect of calling gStyle->SetFillColor(0). This is nearly
165/// equivalent of selecting the "Plain" style.
166///
167/// Many graphics attributes may be set via the TStyle, see in particular
168/// - TStyle::SetNdivisions
169/// - TStyle::SetAxisColor
170/// - TStyle::SetHeaderPS
171/// - TStyle::SetTitlePS
172/// - TStyle::SetLabelColor
173/// - TStyle::SetLabelFont
174/// - TStyle::SetLabelOffset
175/// - TStyle::SetLabelSize
176/// - TStyle::SetOptDate
177/// - TStyle::SetLineStyleString
178/// - TStyle::SetOptFit
179/// - TStyle::SetOptStat
180/// - TStyle::SetPaperSize
181/// - TStyle::SetTickLength
182/// - TStyle::SetTitleOffset
183/// - TStyle::SetTitleSize
184/// - TStyle::SetPalette
185/// - TStyle::SetTimeOffset
186/// - TStyle::SetStripDecimals
187///
188/// The current style is pointed by gStyle.
189///
190/// When calling myStyle->cd(), gStyle is set to myStyle.
191///
192/// One can also use gROOT to change the current style, e.g.
193///
194/// gROOT->SetStyle("Plain") will change the current style gStyle to the
195/// "Plain" style
196///
197/// See also TROOT::ForceStyle and TROOT::UseCurrentStyle
198
199TStyle::TStyle(const char *name, const char *title)
200{
201 TString style_name = name;
202
203 SetNameTitle(style_name, title);
204
205 // If another style was already created with the same name, it is overwrite.
206 delete gROOT->GetStyle(style_name);
207
208 Reset();
209
210 {
212 gROOT->GetListOfStyles()->Add(this);
213 }
214
215 if (strcmp(style_name,"Modern") == 0) {
216 // Modern style
222 SetPadColor(0);
223 SetStatColor(0);
224 SetTitleFont(42,"");
225 SetLabelFont(42,"x");
226 SetTitleFont(42,"x");
227 SetLabelFont(42,"y");
228 SetTitleFont(42,"y");
229 SetLabelFont(42,"z");
230 SetTitleFont(42,"z");
231 SetStatFont(42);
232 SetLabelSize(0.035,"x");
233 SetTitleSize(0.035,"x");
234 SetLabelSize(0.035,"y");
235 SetTitleSize(0.035,"y");
236 SetLabelSize(0.035,"z");
237 SetTitleSize(0.035,"z");
238 SetTitleSize(0.050,"");
239 SetTitleAlign(23);
240 SetTitleX(0.5);
243 SetTitleStyle(0);
244 SetTitleOffset(0.,"Y");
246 SetOptStat(1111);
247 SetStatY(0.935);
251 SetLegendFont(42);
253 SetFuncWidth(2);
254 SetFuncColor(2);
255 }
256 if (strcmp(style_name,"Plain") == 0) {
257 // May be a standard style to be initialised
262 SetPadColor(0);
266 SetStatColor(0);
269 return;
270 }
271 if (strcmp(style_name,"Bold") == 0) {
272 // Authors: Art Poskanzer and Jim Thomas, LBNL, Oct. 2000
273 SetPalette(1,nullptr);
274 SetCanvasColor(10);
278 SetPadColor(10);
279 SetPadTickX(1);
280 SetPadTickY(1);
281 SetPadBottomMargin(0.15);
282 SetPadLeftMargin(0.15);
285 SetFuncWidth(3);
287 SetLineWidth(3);
288 SetLabelSize(0.05,"xyz");
289 SetLabelOffset(0.01,"y");
290 SetLabelColor(kBlue,"xy");
291 SetTitleSize(0.06,"xyz");
292 SetTitleOffset(1.3,"Y");
295 SetStatColor(10);
296 return;
297 }
298 if (strcmp(style_name,"Video") == 0) {
299 // Author: Art Poskanzer, LBNL, Oct. 1999
300 SetPalette(1,nullptr);
301 SetCanvasColor(10);
305 SetPadColor(10);
306 SetPadTickX(1);
307 SetPadTickY(1);
309 SetPadLeftMargin(0.2);
312 SetLabelSize(0.06,"xyz");
313 SetLabelColor(kBlue,"xyz");
314 SetTitleSize(0.08,"xyz");
317 SetStatColor(10);
318 SetFuncWidth(8);
320 SetLineWidth(3);
321 return;
322 }
323 if (strcmp(style_name,"Pub") == 0) {
324 // Authors: Art Poskanzer and Jim Thomas, LBNL, Oct. 2000
325 SetOptTitle(0);
326 SetOptStat(0);
327 SetPalette(8,nullptr);
328 SetCanvasColor(10);
332 SetPadColor(10);
333 SetPadTickX(1);
334 SetPadTickY(1);
335 SetPadBottomMargin(0.15);
336 SetPadLeftMargin(0.15);
339 SetFuncWidth(3);
341 SetLineWidth(3);
342 SetLabelSize(0.05,"xyz");
343 SetLabelOffset(0.01,"y");
344 SetLabelColor(kBlack,"xyz");
345 SetTitleSize(0.06,"xyz");
346 SetTitleOffset(1.3,"y");
349 return;
350 }
351 if (strcmp(style_name,"ATLAS") == 0) {
352 // Author: M.Sutton - Atlas Collaboration 2010
358 SetPadColor(0);
359 SetStatColor(0);
360 SetPaperSize(20,26);
361 SetPadTopMargin(0.05);
362 SetPadRightMargin(0.05);
363 SetPadBottomMargin(0.16);
364 SetPadLeftMargin(0.16);
365 SetTitleXOffset(1.4);
366 SetTitleYOffset(1.4);
367 Int_t font = 42;
368 Double_t tsize=0.05;
369 SetTextFont(font);
370 SetTextSize(tsize);
371 SetLabelFont(font,"x");
372 SetTitleFont(font,"x");
373 SetLabelFont(font,"y");
374 SetTitleFont(font,"y");
375 SetLabelFont(font,"z");
376 SetTitleFont(font,"z");
377 SetLabelSize(tsize,"x");
378 SetTitleSize(tsize,"x");
379 SetLabelSize(tsize,"y");
380 SetTitleSize(tsize,"y");
381 SetLabelSize(tsize,"z");
382 SetTitleSize(tsize,"z");
383 SetMarkerStyle(20);
384 SetMarkerSize(1.2);
386 SetLineStyleString(2,"[12 12]");
387 SetEndErrorSize(0.); // get rid of error bar caps
388 SetOptTitle(0);
389 SetOptStat(0);
390 SetOptFit(0);
391 SetPadTickX(1);
392 SetPadTickY(1);
393 }
394 if (strcmp(style_name,"BELLE2") == 0) {
395 // use plain black on white colors
396 Int_t icol=0; // WHITE
397 SetFrameBorderMode(icol);
398 SetFrameFillColor(icol);
400 SetCanvasColor(icol);
401 SetPadBorderMode(icol);
402 SetPadColor(icol);
403 SetStatColor(icol);
404 //SetFillColor(icol); // don't use: white fill color for *all* objects
405
406 // set the paper & margin sizes
407 SetPaperSize(20,26);
408
409 // set margin sizes
410 SetPadTopMargin(0.05);
411 SetPadRightMargin(0.05);
412 SetPadBottomMargin(0.16);
413 SetPadLeftMargin(0.16);
414
415 // set title offsets (for axis label)
416 SetTitleXOffset(1.0);
417 SetTitleYOffset(1.0);
418
419 // use large fonts
420 //Int_t font=72; // Helvetica italics
421 Int_t font=42; // Helvetica
422 Double_t tsize=0.05;
423 SetTextFont(font);
424 SetTextSize(tsize);
425
426 SetLabelFont(font,"x");
427 SetTitleFont(font,"x");
428 SetLabelFont(font,"y");
429 SetTitleFont(font,"y");
430 SetLabelFont(font,"z");
431 SetTitleFont(font,"z");
432
433 SetLabelSize(tsize,"x");
434 SetTitleSize(.065,"x");
435 SetLabelSize(tsize,"y");
436 SetTitleSize(.065,"y");
437 SetLabelSize(tsize,"z");
438 SetTitleSize(.065,"z");
439
440 SetTitleOffset(1.1,"x");
441 SetTitleOffset(1.1,"y");
442 SetTitleOffset(1.1,"z");
443
444 SetLabelOffset(0.015,"x");
445 SetLabelOffset(0.015,"y");
446 SetLabelOffset(0.015,"z");
447
448 SetTickLength(0.03,"x");
449 SetTickLength(0.02,"y"); // This way we slightly achieve equal length ticks for x and y
450
451 // use bold lines and markers
452 SetMarkerStyle(20);
453 SetMarkerSize(0.9);
455 SetLineStyleString(2,"[12 12]"); // postscript dashes
456
457 // get rid of X error bars
458 SetErrorX(0.001);
459 // get rid of error bar caps
460 SetEndErrorSize(0.);
461
462 // do not display any of the standard histogram decorations
463 SetOptTitle(0);
464 SetOptStat(0);
465 SetOptFit(0);
466
467 // put tick marks on top and RHS of plots
468 SetPadTickX(0);
469 SetPadTickY(0);
470
472 }
473}
474
475////////////////////////////////////////////////////////////////////////////////
476/// Destructor.
477
479{
481 gROOT->GetListOfStyles()->Remove(this);
482 if (gStyle == this) gStyle = (TStyle*)gROOT->GetListOfStyles()->Last();
483}
484
485////////////////////////////////////////////////////////////////////////////////
486/// Copy constructor
487
489{
490 style.TStyle::Copy(*this);
491}
492
493////////////////////////////////////////////////////////////////////////////////
494/// Assignment operator.
495
497{
498 if (this != &style)
499 style.TStyle::Copy(*this);
500 return *this;
501}
502
503////////////////////////////////////////////////////////////////////////////////
504// Return axis number (1 for X, 2 for Y, 3 for Z), otherwise 0
505
507{
508 UChar_t a = axis ? *axis : 0;
509 a -= (a >= 'x') ? 'x' : 'X'; // toupper and a-='X'; intentional underflow
510 return (a > 2) ? 0 : (Int_t)(a+1);
511}
512
513////////////////////////////////////////////////////////////////////////////////
514/// Browse the style object.
515
517{
518 cd();
519}
520
521////////////////////////////////////////////////////////////////////////////////
522/// Create some standard styles.
523
525{
526 TColor *col = new TColor(); // force the initialisation of fgPalette
527 new TStyle("Plain", "Plain Style (no colors/fill areas)");
528 new TStyle("Bold", "Bold Style");;
529 new TStyle("Video", "Style for video presentation histograms");
530 new TStyle("Pub", "Style for Publications");
531 new TStyle("Classic","Classic Style");
532 new TStyle("Default","Equivalent to Classic");
533 new TStyle("Modern", "Modern Style");
534 new TStyle("ATLAS", "ATLAS Style");
535 new TStyle("BELLE2", "Belle II Style");
536 delete col;
537}
538
539////////////////////////////////////////////////////////////////////////////////
540/// Change current style.
541
543{
544 gStyle = this;
545}
546
547////////////////////////////////////////////////////////////////////////////////
548/// Copy this style.
549
550void TStyle::Copy(TObject &obj) const
551{
552 TAttLine::Copy(((TStyle&)obj));
553 TAttFill::Copy(((TStyle&)obj));
554 TAttMarker::Copy(((TStyle&)obj));
555 TAttText::Copy(((TStyle&)obj));
556 fXaxis.Copy(((TStyle&)obj).fXaxis);
557 fYaxis.Copy(((TStyle&)obj).fYaxis);
558 fZaxis.Copy(((TStyle&)obj).fZaxis);
559 fAttDate.Copy(((TStyle&)obj).fAttDate);
560 ((TStyle&)obj).fIsReading = fIsReading;
561 ((TStyle&)obj).fScreenFactor = fScreenFactor;
562 ((TStyle&)obj).fCanvasPreferGL = fCanvasPreferGL;
563 ((TStyle&)obj).fCanvasColor = fCanvasColor;
564 ((TStyle&)obj).fCanvasBorderSize = fCanvasBorderSize;
565 ((TStyle&)obj).fCanvasBorderMode = fCanvasBorderMode;
566 ((TStyle&)obj).fCanvasDefH = fCanvasDefH;
567 ((TStyle&)obj).fCanvasDefW = fCanvasDefW;
568 ((TStyle&)obj).fCanvasDefX = fCanvasDefX;
569 ((TStyle&)obj).fCanvasDefY = fCanvasDefY;
570 ((TStyle&)obj).fPadColor = fPadColor;
571 ((TStyle&)obj).fPadBorderSize = fPadBorderSize;
572 ((TStyle&)obj).fPadBorderMode = fPadBorderMode;
573 ((TStyle&)obj).fPadBottomMargin = fPadBottomMargin;
574 ((TStyle&)obj).fPadTopMargin = fPadTopMargin;
575 ((TStyle&)obj).fPadLeftMargin = fPadLeftMargin;
576 ((TStyle&)obj).fPadRightMargin = fPadRightMargin;
577 ((TStyle&)obj).fPadGridX = fPadGridX;
578 ((TStyle&)obj).fPadGridY = fPadGridY;
579 ((TStyle&)obj).fPadTickX = fPadTickX;
580 ((TStyle&)obj).fPadTickY = fPadTickY;
581 ((TStyle&)obj).fPaperSizeX = fPaperSizeX;
582 ((TStyle&)obj).fPaperSizeY = fPaperSizeY;
583 ((TStyle&)obj).fFuncColor = fFuncColor;
584 ((TStyle&)obj).fFuncStyle = fFuncStyle;
585 ((TStyle&)obj).fFuncWidth = fFuncWidth;
586 ((TStyle&)obj).fGridColor = fGridColor;
587 ((TStyle&)obj).fGridStyle = fGridStyle;
588 ((TStyle&)obj).fGridWidth = fGridWidth;
589 ((TStyle&)obj).fHatchesSpacing = fHatchesSpacing;
590 ((TStyle&)obj).fHatchesLineWidth = fHatchesLineWidth;
591 ((TStyle&)obj).fFrameFillColor = fFrameFillColor;
592 ((TStyle&)obj).fFrameFillStyle = fFrameFillStyle;
593 ((TStyle&)obj).fFrameLineColor = fFrameLineColor;
594 ((TStyle&)obj).fFrameLineStyle = fFrameLineStyle;
595 ((TStyle&)obj).fFrameLineWidth = fFrameLineWidth;
596 ((TStyle&)obj).fFrameBorderSize = fFrameBorderSize;
597 ((TStyle&)obj).fFrameBorderMode = fFrameBorderMode;
598 ((TStyle&)obj).fHistFillColor = fHistFillColor;
599 ((TStyle&)obj).fHistFillStyle = fHistFillStyle;
600 ((TStyle&)obj).fHistLineColor = fHistLineColor;
601 ((TStyle&)obj).fHistLineStyle = fHistLineStyle;
602 ((TStyle&)obj).fHistLineWidth = fHistLineWidth;
603 ((TStyle&)obj).fHistMinimumZero = fHistMinimumZero;
604 ((TStyle&)obj).fHistTopMargin = fHistTopMargin;
605 ((TStyle&)obj).fBarWidth = fBarWidth;
606 ((TStyle&)obj).fBarOffset = fBarOffset;
607 ((TStyle&)obj).fDrawBorder = fDrawBorder;
608 ((TStyle&)obj).fOptLogx = fOptLogx;
609 ((TStyle&)obj).fOptLogy = fOptLogy;
610 ((TStyle&)obj).fOptLogz = fOptLogz;
611 ((TStyle&)obj).fOptDate = fOptDate;
612 ((TStyle&)obj).fOptFile = fOptFile;
613 ((TStyle&)obj).fOptFit = fOptFit;
614 ((TStyle&)obj).fOptStat = fOptStat;
615 ((TStyle&)obj).fOptTitle = fOptTitle;
616 ((TStyle&)obj).fEndErrorSize = fEndErrorSize;
617 ((TStyle&)obj).fErrorX = fErrorX;
618 ((TStyle&)obj).fStatColor = fStatColor;
619 ((TStyle&)obj).fStatTextColor = fStatTextColor;
620 ((TStyle&)obj).fStatBorderSize = fStatBorderSize;
621 ((TStyle&)obj).fStatFont = fStatFont;
622 ((TStyle&)obj).fStatFontSize = fStatFontSize;
623 ((TStyle&)obj).fStatStyle = fStatStyle;
624 ((TStyle&)obj).fStatFormat = fStatFormat;
625 ((TStyle&)obj).fStatW = fStatW;
626 ((TStyle&)obj).fStatH = fStatH ;
627 ((TStyle&)obj).fStatX = fStatX;
628 ((TStyle&)obj).fStatY = fStatY;
629 ((TStyle&)obj).fTitleAlign = fTitleAlign;
630 ((TStyle&)obj).fTitleColor = fTitleColor;
631 ((TStyle&)obj).fTitleTextColor = fTitleTextColor;
632 ((TStyle&)obj).fTitleFont = fTitleFont;
633 ((TStyle&)obj).fTitleFontSize = fTitleFontSize;
634 ((TStyle&)obj).fTitleStyle = fTitleStyle;
635 ((TStyle&)obj).fTitleBorderSize = fTitleBorderSize;
636 ((TStyle&)obj).fTitleW = fTitleW;
637 ((TStyle&)obj).fTitleH = fTitleH;
638 ((TStyle&)obj).fTitleX = fTitleX;
639 ((TStyle&)obj).fTitleY = fTitleY;
640 ((TStyle&)obj).fDateX = fDateX;
641 ((TStyle&)obj).fDateY = fDateY;
642 ((TStyle&)obj).fFitFormat = fFitFormat;
643 ((TStyle&)obj).fPaintTextFormat = fPaintTextFormat;
644 ((TStyle&)obj).fShowEventStatus = fShowEventStatus;
645 ((TStyle&)obj).fShowEditor = fShowEditor;
646 ((TStyle&)obj).fShowToolBar = fShowToolBar;
647 ((TStyle&)obj).fLegoInnerR = fLegoInnerR;
648 ((TStyle&)obj).fStripDecimals = fStripDecimals;
649 ((TStyle&)obj).fNumberContours = fNumberContours;
650 ((TStyle&)obj).fLegendBorderSize = fLegendBorderSize;
651 ((TStyle&)obj).fLegendFillColor = fLegendFillColor;
652 ((TStyle&)obj).fLegendFont = fLegendFont;
653 ((TStyle&)obj).fLegendTextSize = fLegendTextSize;
654
655 for (Int_t i=0;i<30;i++)
656 ((TStyle&)obj).fLineStyle[i] = fLineStyle[i];
657
658 ((TStyle&)obj).fHeaderPS = fHeaderPS;
659 ((TStyle&)obj).fTitlePS = fTitlePS;
660 ((TStyle&)obj).fLineScalePS = fLineScalePS;
661 ((TStyle&)obj).fJoinLinePS = fJoinLinePS;
662 ((TStyle&)obj).fCapLinePS = fCapLinePS;
663 ((TStyle&)obj).fColorModelPS = fColorModelPS;
664 ((TStyle&)obj).fTimeOffset = fTimeOffset;
665 ((TStyle&)obj).fImageScaling = fImageScaling;
666
667 ((TStyle&)obj).fCandleWhiskerRange = fCandleWhiskerRange;
668 ((TStyle&)obj).fCandleBoxRange = fCandleBoxRange;
669 ((TStyle&)obj).fCandleScaled = fCandleScaled;
670 ((TStyle&)obj).fViolinScaled = fViolinScaled;
671 ((TStyle&)obj).fXAxisExpXOffset = fXAxisExpXOffset;
672 ((TStyle&)obj).fXAxisExpYOffset = fXAxisExpYOffset;
673 ((TStyle&)obj).fYAxisExpXOffset = fYAxisExpXOffset;
674 ((TStyle&)obj).fYAxisExpYOffset = fYAxisExpYOffset;
675 ((TStyle&)obj).fAxisMaxDigits = fAxisMaxDigits;
676}
677
678////////////////////////////////////////////////////////////////////////////////
679/// Function used by the TStyle manager when drawing a canvas showing the
680/// current style.
681
683{
684 gPad->SetSelected(this);
685 return 0;
686}
687
688////////////////////////////////////////////////////////////////////////////////
689/// Reset.
690
692{
698 SetFillStyle(1001);
699 SetFillColor(19);
700 fXaxis.ResetAttAxis("X");
701 fYaxis.ResetAttAxis("Y");
702 fZaxis.ResetAttAxis("Z");
703 if (gEnv) fCanvasPreferGL = gEnv->GetValue("OpenGL.CanvasPreferGL",0);
704 else fCanvasPreferGL = kFALSE;
705 fCanvasColor = 19;
708 fCanvasDefH = 500;
709 fCanvasDefW = 700;
710 fCanvasDefX = 10;
711 fCanvasDefY = 10;
715 fPadBottomMargin= 0.1;
716 fPadTopMargin = 0.1;
717 fPadLeftMargin = 0.1;
718 fPadRightMargin = 0.1;
721 fPadTickX = 0;
722 fPadTickY = 0;
723 fFuncColor = 1;
724 fFuncStyle = 1;
725 fFuncWidth = 3;
726 fGridColor = 0;
727 fGridStyle = 3;
728 fGridWidth = 1;
729 fHatchesSpacing = 1;
731 fHistLineColor = 1;
732 fHistFillColor = 0;
733 fHistFillStyle = 1001;
734 fHistLineStyle = 1;
735 fHistLineWidth = 1;
737 fHistTopMargin = 0.05;
738 fFrameLineColor = 1;
739 fFrameFillColor = 0;
740 fFrameFillStyle = 1001;
741 fFrameLineStyle = 1;
742 fFrameLineWidth = 1;
745 fBarWidth = 1;
746 fBarOffset = 0;
747 fDrawBorder = 0;
748 fOptLogx = 0;
749 fOptLogy = 0;
750 fOptLogz = 0;
751 fOptDate = 0;
752 fOptFile = 0;
753 fOptFit = 0;
754 fOptStat = 1;
755 fOptTitle = 1;
756 fEndErrorSize = 2;
757 fErrorX = 0.5;
758 fScreenFactor = 1;
760 fStatTextColor = 1;
761 fStatBorderSize = 2;
762 fStatFont = 62;
763 fStatFontSize = 0;
764 fStatStyle = 1001;
765 fStatW = 0.20;
766 fStatH = 0.16;
767 fStatX = 0.98;
768 fStatY = 0.995;
770 SetFitFormat();
772 fTitleAlign = 13;
774 fTitleTextColor = 1;
775 fTitleFont = 62;
776 fTitleFontSize = 0;
777 fTitleStyle = 1001;
779 fTitleW = 0;
780 fTitleH = 0;
781 fTitleX = 0.01;
782 fTitleY = 0.995;
784 fShowEditor = 0;
785 fShowToolBar = 0;
786 fLegoInnerR = 0.5;
787 fHeaderPS = "";
788 fTitlePS = "";
790 fNumberContours = 20;
792 fLegendFont = 62;
793 fLegendTextSize = 0.,
795 fImageScaling = 1.;
796
797 SetDateX();
798 SetDateY();
799 fAttDate.SetTextSize(0.025);
803 SetCapLinePS();
805 SetLineStyleString(1," ");
806 SetLineStyleString(2,"12 12");
807 SetLineStyleString(3,"4 8");
808 SetLineStyleString(4,"12 16 4 16");
809 SetLineStyleString(5,"20 12 4 12");
810 SetLineStyleString(6,"20 12 4 12 4 12 4 12");
811 SetLineStyleString(7,"20 20");
812 SetLineStyleString(8,"20 12 4 12 4 12");
813 SetLineStyleString(9,"80 20");
814 SetLineStyleString(10,"80 40 4 40");
815 for (Int_t i=11;i<30;i++) SetLineStyleString(i," ");
816
817 SetPaperSize();
818
819 SetPalette();
820
821 fTimeOffset = 788918400; // UTC time at 01/01/95
822
824 fCandleBoxRange = 0.5;
831 fAxisMaxDigits = 5;
832
833 TString style_name = opt;
834
835 if (strcmp(style_name,"Modern") == 0) {
836 // Modern style
842 SetPadColor(0);
843 SetStatColor(0);
844 SetTitleFont(42,"");
845 SetLabelFont(42,"x");
846 SetTitleFont(42,"x");
847 SetLabelFont(42,"y");
848 SetTitleFont(42,"y");
849 SetLabelFont(42,"z");
850 SetTitleFont(42,"z");
851 SetStatFont(42);
852 SetLabelSize(0.035,"x");
853 SetTitleSize(0.035,"x");
854 SetLabelSize(0.035,"y");
855 SetTitleSize(0.035,"y");
856 SetLabelSize(0.035,"z");
857 SetTitleSize(0.035,"z");
858 SetTitleSize(0.050,"");
859 SetTitleAlign(23);
860 SetTitleX(0.5);
863 SetTitleStyle(0);
864 SetTitleOffset(0.,"Y");
866 SetOptStat(1111);
867 SetStatY(0.935);
871 SetLegendFont(42);
873 SetFuncWidth(2);
874 SetFuncColor(2);
875 }
876 if (strcmp(style_name,"Plain") == 0) {
880 SetPadColor(0);
884 SetStatColor(0);
887 return;
888 }
889 if (strcmp(style_name,"Bold") == 0) {
890 SetPalette(1,nullptr);
891 SetCanvasColor(10);
895 SetPadColor(10);
896 SetPadTickX(1);
897 SetPadTickY(1);
898 SetPadBottomMargin(0.15);
899 SetPadLeftMargin(0.15);
902 SetFuncWidth(3);
904 SetLineWidth(3);
905 SetLabelSize(0.05,"xyz");
906 SetLabelOffset(0.01,"y");
907 SetLabelColor(kBlue,"xy");
908 SetTitleSize(0.06,"xyz");
909 SetTitleOffset(1.3,"Y");
912 SetStatColor(10);
913 return;
914 }
915 if (strcmp(style_name,"Video") == 0) {
916 SetPalette(1,nullptr);
917 SetCanvasColor(10);
921 SetPadColor(10);
922 SetPadTickX(1);
923 SetPadTickY(1);
925 SetPadLeftMargin(0.2);
928 SetLabelSize(0.06,"xyz");
929 SetLabelColor(kBlue,"xyz");
930 SetTitleSize(0.08,"xyz");
933 SetStatColor(10);
934 SetFuncWidth(8);
936 SetLineWidth(3);
937 return;
938 }
939 if (strcmp(style_name,"Pub") == 0) {
940 SetOptTitle(0);
941 SetOptStat(0);
942 SetPalette(8,nullptr);
943 SetCanvasColor(10);
947 SetPadColor(10);
948 SetPadTickX(1);
949 SetPadTickY(1);
950 SetPadBottomMargin(0.15);
951 SetPadLeftMargin(0.15);
954 SetFuncWidth(3);
956 SetLineWidth(3);
957 SetLabelSize(0.05,"xyz");
958 SetLabelOffset(0.01,"y");
959 SetLabelColor(kBlack,"xyz");
960 SetTitleSize(0.06,"xyz");
961 SetTitleOffset(1.3,"y");
964 return;
965 }
966 if (strcmp(style_name,"ATLAS") == 0) {
972 SetPadColor(0);
973 SetStatColor(0);
974 SetPaperSize(20,26);
975 SetPadTopMargin(0.05);
976 SetPadRightMargin(0.05);
977 SetPadBottomMargin(0.16);
978 SetPadLeftMargin(0.16);
979 SetTitleXOffset(1.4);
980 SetTitleYOffset(1.4);
981 Int_t font = 42;
982 Double_t tsize=0.05;
983 SetTextFont(font);
984 SetTextSize(tsize);
985 SetLabelFont(font,"x");
986 SetTitleFont(font,"x");
987 SetLabelFont(font,"y");
988 SetTitleFont(font,"y");
989 SetLabelFont(font,"z");
990 SetTitleFont(font,"z");
991 SetLabelSize(tsize,"x");
992 SetTitleSize(tsize,"x");
993 SetLabelSize(tsize,"y");
994 SetTitleSize(tsize,"y");
995 SetLabelSize(tsize,"z");
996 SetTitleSize(tsize,"z");
997 SetMarkerStyle(20);
998 SetMarkerSize(1.2);
1000 SetLineStyleString(2,"[12 12]");
1001 SetEndErrorSize(0.);
1002 SetOptTitle(0);
1003 SetOptStat(0);
1004 SetOptFit(0);
1005 SetPadTickX(1);
1006 SetPadTickY(1);
1007 return;
1008 }
1009 if (strcmp(style_name,"BELLE2") == 0) {
1010 Int_t icol=0;
1011 SetFrameBorderMode(icol);
1012 SetFrameFillColor(icol);
1013 SetCanvasBorderMode(icol);
1014 SetCanvasColor(icol);
1015 SetPadBorderMode(icol);
1016 SetPadColor(icol);
1017 SetStatColor(icol);
1018 SetPaperSize(20,26);
1019 SetPadTopMargin(0.05);
1020 SetPadRightMargin(0.05);
1021 SetPadBottomMargin(0.16);
1022 SetPadLeftMargin(0.16);
1023 SetTitleXOffset(1.0);
1024 SetTitleYOffset(1.0);
1025 Int_t font=42;
1026 Double_t tsize=0.05;
1027 SetTextFont(font);
1028 SetTextSize(tsize);
1029 SetLabelFont(font,"x");
1030 SetTitleFont(font,"x");
1031 SetLabelFont(font,"y");
1032 SetTitleFont(font,"y");
1033 SetLabelFont(font,"z");
1034 SetTitleFont(font,"z");
1035 SetLabelSize(tsize,"x");
1036 SetTitleSize(.065,"x");
1037 SetLabelSize(tsize,"y");
1038 SetTitleSize(.065,"y");
1039 SetLabelSize(tsize,"z");
1040 SetTitleSize(.065,"z");
1041 SetTitleOffset(1.1,"x");
1042 SetTitleOffset(1.1,"y");
1043 SetTitleOffset(1.1,"z");
1044 SetLabelOffset(0.015,"x");
1045 SetLabelOffset(0.015,"y");
1046 SetLabelOffset(0.015,"z");
1047 SetTickLength(0.03,"x");
1048 SetTickLength(0.02,"y");
1049 SetMarkerStyle(20);
1050 SetMarkerSize(0.9);
1052 SetLineStyleString(2,"[12 12]");
1053 SetErrorX(0.001);
1054 SetEndErrorSize(0.);
1055 SetOptTitle(0);
1056 SetOptStat(0);
1057 SetOptFit(0);
1058 SetPadTickX(0);
1059 SetPadTickY(0);
1061 }
1062}
1063
1064////////////////////////////////////////////////////////////////////////////////
1065/// Return number of divisions.
1066
1068{
1069 Int_t ax = AxisChoice(axis);
1070 if (ax == 1) return fXaxis.GetNdivisions();
1071 if (ax == 2) return fYaxis.GetNdivisions();
1072 if (ax == 3) return fZaxis.GetNdivisions();
1073 return 0;
1074}
1075
1076////////////////////////////////////////////////////////////////////////////////
1077/// Return the axis color number in the axis.
1078
1080{
1081 Int_t ax = AxisChoice(axis);
1082 if (ax == 1) return fXaxis.GetAxisColor();
1083 if (ax == 2) return fYaxis.GetAxisColor();
1084 if (ax == 3) return fZaxis.GetAxisColor();
1085 return 0;
1086}
1087
1088////////////////////////////////////////////////////////////////////////////////
1089/// Return color number i in current palette.
1090
1092{
1093 return TColor::GetColorPalette(i);
1094}
1095
1096////////////////////////////////////////////////////////////////////////////////
1097/// Return the label color number in the axis.
1098
1100{
1101 Int_t ax = AxisChoice(axis);
1102 if (ax == 1) return fXaxis.GetLabelColor();
1103 if (ax == 2) return fYaxis.GetLabelColor();
1104 if (ax == 3) return fZaxis.GetLabelColor();
1105 return 0;
1106}
1107
1108////////////////////////////////////////////////////////////////////////////////
1109/// Return label font.
1110
1112{
1113 Int_t ax = AxisChoice(axis);
1114 if (ax == 1) return fXaxis.GetLabelFont();
1115 if (ax == 2) return fYaxis.GetLabelFont();
1116 if (ax == 3) return fZaxis.GetLabelFont();
1117 return 0;
1118}
1119
1120////////////////////////////////////////////////////////////////////////////////
1121/// Return label offset.
1122
1124{
1125 Int_t ax = AxisChoice(axis);
1126 if (ax == 1) return fXaxis.GetLabelOffset();
1127 if (ax == 2) return fYaxis.GetLabelOffset();
1128 if (ax == 3) return fZaxis.GetLabelOffset();
1129 return 0;
1130}
1131
1132////////////////////////////////////////////////////////////////////////////////
1133/// Return label size.
1134
1136{
1137 Int_t ax = AxisChoice(axis);
1138 if (ax == 1) return fXaxis.GetLabelSize();
1139 if (ax == 2) return fYaxis.GetLabelSize();
1140 if (ax == 3) return fZaxis.GetLabelSize();
1141 return 0;
1142}
1143
1144////////////////////////////////////////////////////////////////////////////////
1145/// Method returns maximum number of digits permitted for the axis labels above which the
1146/// notation with 10^N is used. See @ref SetAxisMaxDigits for more details
1148{
1149 return fAxisMaxDigits;
1150}
1151
1152////////////////////////////////////////////////////////////////////////////////
1153/// Return line style string (used by PostScript).
1154/// See SetLineStyleString for more explanations
1155
1157{
1158 if (i < 1 || i > 29) return fLineStyle[0].Data();
1159 return fLineStyle[i].Data();
1160}
1161
1162////////////////////////////////////////////////////////////////////////////////
1163/// Return number of colors in the color palette.
1164
1166{
1168}
1169
1170////////////////////////////////////////////////////////////////////////////////
1171/// Set paper size for PostScript output.
1172
1173void TStyle::GetPaperSize(Float_t &xsize, Float_t &ysize) const
1174{
1175 xsize = fPaperSizeX;
1176 ysize = fPaperSizeY;
1177}
1178
1179////////////////////////////////////////////////////////////////////////////////
1180/// Return tick length.
1181
1183{
1184 Int_t ax = AxisChoice(axis);
1185 if (ax == 1) return fXaxis.GetTickLength();
1186 if (ax == 2) return fYaxis.GetTickLength();
1187 if (ax == 3) return fZaxis.GetTickLength();
1188 return 0;
1189}
1190
1191////////////////////////////////////////////////////////////////////////////////
1192/// Return title color.
1193
1195{
1196 Int_t ax = AxisChoice(axis);
1197 if (ax == 1) return fXaxis.GetTitleColor();
1198 if (ax == 2) return fYaxis.GetTitleColor();
1199 if (ax == 3) return fZaxis.GetTitleColor();
1200 return fTitleTextColor;
1201}
1202
1203////////////////////////////////////////////////////////////////////////////////
1204/// Return title font.
1205
1207{
1208 Int_t ax = AxisChoice(axis);
1209 if (ax == 1) return fXaxis.GetTitleFont();
1210 if (ax == 2) return fYaxis.GetTitleFont();
1211 if (ax == 3) return fZaxis.GetTitleFont();
1212 return fTitleFont;
1213}
1214
1215////////////////////////////////////////////////////////////////////////////////
1216/// Return title offset.
1217
1219{
1220 Int_t ax = AxisChoice(axis);
1221 if (ax == 1) return fXaxis.GetTitleOffset();
1222 if (ax == 2) return fYaxis.GetTitleOffset();
1223 if (ax == 3) return fZaxis.GetTitleOffset();
1224 return 0;
1225}
1226
1227////////////////////////////////////////////////////////////////////////////////
1228/// Return title size.
1229
1231{
1232 Int_t ax = AxisChoice(axis);
1233 if (ax == 1) return fXaxis.GetTitleSize();
1234 if (ax == 2) return fYaxis.GetTitleSize();
1235 if (ax == 3) return fZaxis.GetTitleSize();
1236 return fTitleFontSize;
1237}
1238
1239////////////////////////////////////////////////////////////////////////////////
1240/// Copy this style to gStyle.
1241
1243{
1244 Copy(*gStyle);
1245}
1246
1247////////////////////////////////////////////////////////////////////////////////
1248/// Define the color model used by TPostScript and TPDF (RGB or CMYK).
1249/// CMY and CMYK models are subtractive color models unlike RGB which is
1250/// additive. They are mainly used for printing purposes. CMY means Cyan Magenta
1251/// Yellow. To convert RGB to CMY it is enough to do: C=1-R, M=1-G and Y=1-B.
1252/// CMYK has one more component K (black). The conversion from RGB to CMYK is:
1253/// ~~~ {.cpp}
1254/// Double_t Black = TMath::Min(TMath::Min(1-Red,1-Green),1-Blue);
1255/// Double_t Cyan = (1-Red-Black)/(1-Black);
1256/// Double_t Magenta = (1-Green-Black)/(1-Black);
1257/// Double_t Yellow = (1-Blue-Black)/(1-Black);
1258/// ~~~
1259/// CMYK adds the black component which allows better quality for black
1260/// printing. PostScript and PDF support the CMYK model.
1261///
1262/// - c = 0 means TPostScript and TPDF will use RGB color model (default)
1263/// - c = 1 means TPostScript and TPDF will use CMYK color model
1264
1266{
1267 fColorModelPS = c;
1268}
1269
1270////////////////////////////////////////////////////////////////////////////////
1271/// If the argument zero=kTRUE the minimum value for the Y axis of 1-d histograms
1272/// is set to 0.
1273///
1274/// If the minimum bin content is greater than 0 and TH1::SetMinimum
1275/// has not been called.
1276/// Otherwise the minimum is based on the minimum bin content.
1277
1279{
1280 fHistMinimumZero = zero;
1281}
1282
1283////////////////////////////////////////////////////////////////////////////////
1284/// Set the number of divisions to draw an axis.
1285/// ndiv : Number of divisions.
1286/// ~~~ {.cpp}
1287/// n = N1 + 100*N2 + 10000*N3
1288/// N1=number of primary divisions.
1289/// N2=number of secondary divisions.
1290/// N3=number of 3rd divisions.
1291/// e.g.:
1292/// nndi=0 --> no tick marks.
1293/// nndi=2 --> 2 divisions, one tick mark in the middle
1294/// of the axis.
1295/// ~~~
1296/// axis specifies which axis ("x","y","z"), default = "x"
1297/// if axis="xyz" set all 3 axes
1298
1300{
1301 TString opt = axis;
1302 opt.ToLower();
1303 if (opt.Contains("x")) fXaxis.SetNdivisions(n);
1304 if (opt.Contains("y")) fYaxis.SetNdivisions(n);
1305 if (opt.Contains("z")) fZaxis.SetNdivisions(n);
1306}
1307
1308////////////////////////////////////////////////////////////////////////////////
1309/// Set color to draw the axis line and tick marks.
1310/// axis specifies which axis ("x","y","z"), default = "x"
1311/// if axis="xyz" set all 3 axes
1312
1314{
1315 TString opt = axis;
1316 opt.ToLower();
1317
1318 if (opt.Contains("x")) fXaxis.SetAxisColor(color);
1319 if (opt.Contains("y")) fYaxis.SetAxisColor(color);
1320 if (opt.Contains("z")) fZaxis.SetAxisColor(color);
1321}
1322
1323////////////////////////////////////////////////////////////////////////////////
1324/// Set the size (in pixels) of the small lines drawn at the
1325/// end of the error bars (TH1 or TGraphErrors).
1326///
1327/// The default value is 2 pixels.
1328/// Set np=0 to remove these lines
1329
1331{
1332 if (np >= 0) fEndErrorSize = np;
1333 else fEndErrorSize = 0;
1334}
1335
1336////////////////////////////////////////////////////////////////////////////////
1337/// Define a string to be inserted in the Postscript header.
1338///
1339/// The string in header will be added to the Postscript file
1340/// immediately following the %%Page line
1341/// For example, this string may contain special Postscript instructions like
1342/// ~~~ {.cpp}
1343/// 200 200 translate
1344/// ~~~
1345/// the following header string will print the string "my annotation" at the
1346/// bottom left corner of the page (outside the user area)
1347/// ~~~ {.cpp}
1348/// "gsave 100 -100 t 0 r 0 0 m /Helvetica-Bold findfont 56 sf 0 0 m ( my annotation ) show gr"
1349/// ~~~
1350/// This information is used in TPostScript::Initialize
1351
1352void TStyle::SetHeaderPS(const char *header)
1353{
1354 fHeaderPS = header;
1355}
1356
1357////////////////////////////////////////////////////////////////////////////////
1358/// Sets the `fIsReading` member to reading (default=kTRUE).
1359///
1360/// `fIsReading` (used via `gStyle->IsReading()`) can be used in
1361/// the functions `myclass::UseCurrentStyle` to read from the current style
1362/// or write to the current style
1363
1365{
1366 fIsReading = reading;
1367}
1368
1369////////////////////////////////////////////////////////////////////////////////
1370/// Define a string to be used in the %%Title of the Postscript files.
1371/// If this string is not defined, ROOT will use the canvas title.
1372
1373void TStyle::SetTitlePS(const char *pstitle)
1374{
1375 fTitlePS = pstitle;
1376}
1377
1378////////////////////////////////////////////////////////////////////////////////
1379/// Set axis labels color.
1380/// axis specifies which axis ("x","y","z"), default = "x"
1381/// if axis="xyz" set all 3 axes
1382
1384{
1385 TString opt = axis;
1386 opt.ToLower();
1387
1388 if (opt.Contains("x")) fXaxis.SetLabelColor(color);
1389 if (opt.Contains("y")) fYaxis.SetLabelColor(color);
1390 if (opt.Contains("z")) fZaxis.SetLabelColor(color);
1391}
1392
1393////////////////////////////////////////////////////////////////////////////////
1394/// Set font number used to draw axis labels.
1395/// - font : Text font code = 10*fontnumber + precision
1396/// - Font numbers must be between 1 and 14
1397/// - precision = 1 fast hardware fonts (steps in the size)
1398/// - precision = 2 scalable and rotatable hardware fonts
1399/// The default font number is 62.
1400/// axis specifies which axis ("x","y","z"), default = "x"
1401/// if axis="xyz" set all 3 axes
1402
1404{
1405 TString opt = axis;
1406 opt.ToLower();
1407
1408 if (opt.Contains("x")) fXaxis.SetLabelFont(font);
1409 if (opt.Contains("y")) fYaxis.SetLabelFont(font);
1410 if (opt.Contains("z")) fZaxis.SetLabelFont(font);
1411}
1412
1413////////////////////////////////////////////////////////////////////////////////
1414/// Set offset between axis and axis labels.
1415/// The offset is expressed as a percent of the pad height.
1416/// axis specifies which axis ("x","y","z"), default = "x"
1417/// if axis="xyz" set all 3 axes
1418
1420{
1421 TString opt = axis;
1422 opt.ToLower();
1423
1424 if (opt.Contains("x")) fXaxis.SetLabelOffset(offset);
1425 if (opt.Contains("y")) fYaxis.SetLabelOffset(offset);
1426 if (opt.Contains("z")) fZaxis.SetLabelOffset(offset);
1427}
1428
1429////////////////////////////////////////////////////////////////////////////////
1430/// Set size of axis labels. The size is expressed as a percent of the pad height.
1431/// axis specifies which axis ("x","y","z"), default = "x"
1432/// if axis="xyz" set all 3 axes
1433
1435{
1436 TString opt = axis;
1437 opt.ToLower();
1438
1439 if (opt.Contains("x")) fXaxis.SetLabelSize(size);
1440 if (opt.Contains("y")) fYaxis.SetLabelSize(size);
1441 if (opt.Contains("z")) fZaxis.SetLabelSize(size);
1442}
1443
1444////////////////////////////////////////////////////////////////////////////////
1445/// Set line style string using the PostScript convention.
1446/// A line is a suite of segments, each segment is described by the number of
1447/// pixels. The initial and alternating elements (second, fourth, and so on)
1448/// are the dashes, and the others spaces between dashes.
1449///
1450/// Default fixed line styles are pre-defined as:
1451/// ~~~ {.cpp}
1452/// linestyle 1 "[]" solid
1453/// linestyle 2 "[12 12]" dashed
1454/// linestyle 3 "[4 8]" dotted
1455/// linestyle 4 "[12 16 4 16]" dash-dotted
1456/// ~~~
1457/// For example the following lines define the line style 5 to 9.
1458/// ~~~ {.cpp}
1459/// gStyle->SetLineStyleString(5,"20 12 4 12");
1460/// gStyle->SetLineStyleString(6,"20 12 4 12 4 12 4 12");
1461/// gStyle->SetLineStyleString(7,"20 20");
1462/// gStyle->SetLineStyleString(8,"20 12 4 12 4 12");
1463/// gStyle->SetLineStyleString(9,"80 20");
1464/// ~~~
1465/// \image html base_linestyle.png
1466/// Note:
1467/// - Up to 30 different styles may be defined.
1468/// - The opening and closing brackets may be omitted
1469/// - It is recommended to use 4 as the smallest segment length and multiple of
1470/// 4 for other lengths.
1471/// - The line style 1 to 10 are predefined. 1 to 4 cannot be changed.
1472
1474{
1475 if (!text) text = "";
1476 char *l;
1477 Int_t nch = strlen(text);
1478 char *st = new char[nch+10];
1479 snprintf(st,nch+10," ");
1480 strlcat(st,text,nch+10);
1481 l = strstr(st,"["); if (l) l[0] = ' ';
1482 l = strstr(st,"]"); if (l) l[0] = ' ';
1483 if (i >= 1 && i <= 29) fLineStyle[i] = st;
1484 delete [] st;
1485}
1486
1487////////////////////////////////////////////////////////////////////////////////
1488/// Set the default number of contour levels when drawing 2-d plots.
1489
1491{
1492 if (number > 0 && number < 1000) {
1493 fNumberContours = number;
1494 return;
1495 }
1496
1497 Error("SetNumberContours","Illegal number of contours: %d, must be > 0 and < 1000",number);
1498}
1499
1500////////////////////////////////////////////////////////////////////////////////
1501/// If optdate is non null, the current date/time will be printed in the canvas.
1502/// The position of the date string can be controlled by:
1503/// optdate = 10*format + mode
1504/// - mode = 1 (default) date is printed in the bottom/left corner.
1505/// - mode = 2 date is printed in the bottom/right corner.
1506/// - mode = 3 date is printed in the top/right corner.
1507/// - format = 0 (default) date has the format like: "Wed Sep 25 17:10:35 2002"
1508/// - format = 1 date has the format like: "2002-09-25"
1509/// - format = 2 date has the format like: "2002-09-25 17:10:35"
1510///
1511/// examples:
1512/// - optdate = 1 date like "Wed Sep 25 17:10:35 2002" in the bottom/left corner.
1513/// - optdate = 13 date like "2002-09-25" in the top/right corner.
1514///
1515/// The date position can also be controlled by:
1516/// gStyle->SetDateX(x); x in NDC
1517/// gStyle->SetDateY(y); y in NDC
1518///
1519/// The date text attributes can be changed with:
1520/// ~~~ {.cpp}
1521/// gStyle->GetAttDate()->SetTextFont(font=62);
1522/// gStyle->GetAttDate()->SetTextSize(size=0.025);
1523/// gStyle->GetAttDate()->SetTextAngle(angle=0);
1524/// gStyle->GetAttDate()->SetTextAlign(align=11);
1525/// gStyle->GetAttDate()->SetTextColor(color=1);
1526/// ~~~
1527/// The current date attributes can be obtained via:
1528/// ~~~ {.cpp}
1529/// gStyle->GetAttDate()->GetTextxxxx();
1530/// ~~~
1531/// When the date option is active, a text object is created when the pad
1532/// paint its list of primitives. The text object is named "DATE".
1533/// The DATE attributes can also be edited interactively (position
1534/// and attributes) via the normal context menu.
1535
1537{
1538 fOptDate = optdate;
1539 Int_t mode = optdate % 10;
1540 if (mode == 1) {
1541 SetDateX(0.01);
1542 SetDateY(0.01);
1544 }
1545 if (mode == 2) {
1546 SetDateX(0.99);
1547 SetDateY(0.01);
1549 }
1550 if (mode == 3) {
1551 SetDateX(0.99);
1552 SetDateY(0.99);
1554 }
1555}
1556
1557////////////////////////////////////////////////////////////////////////////////
1558/// The type of information about fit parameters printed in the histogram
1559/// statistics box can be selected via the parameter `mode`.
1560/// The parameter mode can be = `pcev`:
1561/// - p = 1; print Probability
1562/// - c = 1; print Chisquare/Number of degrees of freedom
1563/// - e = 1; print errors (if e=1, v must be 1)
1564/// - v = 1; print name/values of parameters
1565/// Example: `gStyle->SetOptFit(1011);`
1566/// print fit probability, parameter names/values and errors.
1567/// - When "v"=1 is specified, only the non-fixed parameters are shown.
1568/// - When "v"=2 all parameters are shown.
1569///
1570/// #### Notes:
1571///
1572/// - never call `SetOptFit(000111);` but `SetOptFit(111)`, 000111 will
1573/// be taken as an octal number !!
1574/// - `gStyle->SetOptFit(1)` is a shortcut allowing to set the most common
1575/// case and is equivalent to `gStyle->SetOptFit(111)`
1576/// - At ROOT startup the option fit is set to `0`. So, to see the fit parameters
1577/// on all plot resulting from a fit, a call to `gStyle->SetOptFit()` with a
1578/// non null value should be done. One can put it in the `rootlogon.C` file to
1579/// always have it.
1580///
1581/// see also SetOptStat below.
1582
1584{
1585 fOptFit = mode;
1586 if (gPad) {
1587 TIter next(gPad->GetListOfPrimitives());
1588 while (auto obj = next()) {
1589 TObject *stats = obj->FindObject("stats");
1590 if (stats) stats->SetBit(kTakeStyle);
1591 }
1592 gPad->Modified(); gPad->Update();
1593 }
1594}
1595
1596////////////////////////////////////////////////////////////////////////////////
1597/// The type of information printed in the histogram statistics box
1598/// can be selected via the parameter mode.
1599/// The parameter mode can be = `ksiourmen`
1600/// - k = 1; kurtosis printed
1601/// - k = 2; kurtosis and kurtosis error printed
1602/// - s = 1; skewness printed
1603/// - s = 2; skewness and skewness error printed
1604/// - i = 1; integral of bins printed
1605/// - i = 2; integral of bins with option "width" printed
1606/// - o = 1; number of overflows printed
1607/// - u = 1; number of underflows printed
1608/// - r = 1; rms printed
1609/// - r = 2; rms and rms error printed
1610/// - m = 1; mean value printed
1611/// - m = 2; mean and mean error values printed
1612/// - e = 1; number of entries printed
1613/// - n = 1; name of histogram is printed
1614///
1615/// Example: `gStyle->SetOptStat(11);`
1616/// print only name of histogram and number of entries.
1617/// `gStyle->SetOptStat(1101);` displays the name of histogram, mean value and RMS.
1618///
1619/// #### Notes:
1620///
1621/// - never call `SetOptStat(000111);` but `SetOptStat(111)`, 000111 will
1622/// be taken as an octal number !!
1623/// - `SetOptStat(1)` is s shortcut allowing to set the most common case, and is
1624/// taken as `SetOptStat(1111)` (for backward compatibility with older versions.
1625/// If you want to print only the name of the histogram call `SetOptStat(1000000001)`.
1626/// - that in case of 2-D histograms, when selecting just underflow (10000)
1627/// or overflow (100000), the stats box will show all combinations
1628/// of underflow/overflows and not just one single number!
1629
1631{
1632 fOptStat = mode;
1633 if (gPad) {
1634 TIter next(gPad->GetListOfPrimitives());
1635 while (auto obj = next()) {
1636 TObject *stats = obj->FindObject("stats");
1637 if (stats) stats->SetBit(kTakeStyle);
1638 }
1639 gPad->Modified(); gPad->Update();
1640 }
1641}
1642
1643////////////////////////////////////////////////////////////////////////////////
1644/// The parameter mode can be any combination of kKsSiourRmMen
1645/// - k : kurtosis printed
1646/// - K : kurtosis and kurtosis error printed
1647/// - s : skewness printed
1648/// - S : skewness and skewness error printed
1649/// - i : integral of bins printed
1650/// - I : integral of bins with option "width" printed
1651/// - o : number of overflows printed
1652/// - u : number of underflows printed
1653/// - r : rms printed
1654/// - R : rms and rms error printed
1655/// - m : mean value printed
1656/// - M : mean value mean error values printed
1657/// - e : number of entries printed
1658/// - n : name of histogram is printed
1659///
1660/// Example: `gStyle->SetOptStat("ne");`
1661/// print only name of histogram and number of entries.
1662///
1663/// - `gStyle->SetOptStat("n")` print only the name of the histogram
1664/// - `gStyle->SetOptStat("nemr")` is the default
1665
1667{
1668 Int_t mode = 0;
1669
1670 TString opt = stat;
1671
1672 if (opt.Contains("n")) mode+=1;
1673 if (opt.Contains("e")) mode+=10;
1674 if (opt.Contains("m")) mode+=100;
1675 if (opt.Contains("M")) mode+=200;
1676 if (opt.Contains("r")) mode+=1000;
1677 if (opt.Contains("R")) mode+=2000;
1678 if (opt.Contains("u")) mode+=10000;
1679 if (opt.Contains("o")) mode+=100000;
1680 if (opt.Contains("i")) mode+=1000000;
1681 if (opt.Contains("I")) mode+=2000000;
1682 if (opt.Contains("s")) mode+=10000000;
1683 if (opt.Contains("S")) mode+=20000000;
1684 if (opt.Contains("k")) mode+=100000000;
1685 if (opt.Contains("K")) mode+=200000000;
1686 if (mode == 1) mode = 1000000001;
1687
1689}
1690
1691////////////////////////////////////////////////////////////////////////////////
1692/// Set paper size for PostScript output.
1693
1695{
1696 switch (size) {
1697 case kA4:
1698 SetPaperSize(20, 26);
1699 break;
1700 case kUSLetter:
1701 SetPaperSize(20, 24);
1702 break;
1703 default:
1704 Error("SetPaperSize", "illegal paper size %d\n", (int)size);
1705 break;
1706 }
1707}
1708
1709////////////////////////////////////////////////////////////////////////////////
1710/// Set paper size for PostScript output.
1711/// The paper size is specified in centimeters. Default is 20x26.
1712/// See also TPad::Print
1713
1715{
1716 fPaperSizeX = xsize;
1717 fPaperSizeY = ysize;
1718}
1719
1720////////////////////////////////////////////////////////////////////////////////
1721/// Set the tick marks length for an axis.
1722/// axis specifies which axis ("x","y","z"), default = "x"
1723/// if axis="xyz" set all 3 axes
1724
1726{
1727 TString opt = axis;
1728 opt.ToLower();
1729
1730 if (opt.Contains("x")) fXaxis.SetTickLength(length);
1731 if (opt.Contains("y")) fYaxis.SetTickLength(length);
1732 if (opt.Contains("z")) fZaxis.SetTickLength(length);
1733}
1734
1735////////////////////////////////////////////////////////////////////////////////
1736/// - if axis =="x" set the X axis title color
1737/// - if axis =="y" set the Y axis title color
1738/// - if axis =="z" set the Z axis title color
1739///
1740/// any other value of axis will set the pad title color
1741///
1742/// if axis="xyz" set all 3 axes
1743
1745{
1746 TString opt = axis;
1747 opt.ToLower();
1748
1749 Bool_t set = kFALSE;
1750 if (opt.Contains("x")) { fXaxis.SetTitleColor(color); set = kTRUE; }
1751 if (opt.Contains("y")) { fYaxis.SetTitleColor(color); set = kTRUE; }
1752 if (opt.Contains("z")) { fZaxis.SetTitleColor(color); set = kTRUE; }
1753 if (!set) fTitleColor = color;
1754}
1755
1756////////////////////////////////////////////////////////////////////////////////
1757/// - if axis =="x" set the X axis title font
1758/// - if axis =="y" set the Y axis title font
1759/// - if axis =="z" set the Z axis title font
1760///
1761/// any other value of axis will set the pad title font
1762///
1763/// if axis="xyz" set all 3 axes
1764
1766{
1767 TString opt = axis;
1768 opt.ToLower();
1769
1770 Bool_t set = kFALSE;
1771 if (opt.Contains("x")) { fXaxis.SetTitleFont(font); set = kTRUE; }
1772 if (opt.Contains("y")) { fYaxis.SetTitleFont(font); set = kTRUE; }
1773 if (opt.Contains("z")) { fZaxis.SetTitleFont(font); set = kTRUE; }
1774 if (!set) fTitleFont = font;
1775}
1776
1777////////////////////////////////////////////////////////////////////////////////
1778/// Specify a parameter offset to control the distance between the axis
1779/// and the axis title.
1780///
1781/// - offset = 1 means : use the default distance
1782/// - offset = 1.2 means: the distance will be 1.2*(default distance)
1783/// - offset = 0.8 means: the distance will be 0.8*(default distance)
1784///
1785/// axis specifies which axis ("x","y","z"), default = "x"
1786/// if axis="xyz" set all 3 axes
1787
1789{
1790 TString opt = axis;
1791 opt.ToLower();
1792
1793 if (opt.Contains("x")) fXaxis.SetTitleOffset(offset);
1794 if (opt.Contains("y")) fYaxis.SetTitleOffset(offset);
1795 if (opt.Contains("z")) fZaxis.SetTitleOffset(offset);
1796}
1797
1798////////////////////////////////////////////////////////////////////////////////
1799/// - if axis =="x" set the X axis title size
1800/// - if axis =="y" set the Y axis title size
1801/// - if axis =="z" set the Z axis title size
1802///
1803/// any other value of axis will set the pad title size
1804///
1805/// if axis="xyz" set all 3 axes
1806
1808{
1809 TString opt = axis;
1810 opt.ToLower();
1811
1812 Bool_t set = kFALSE;
1813 if (opt.Contains("x")) { fXaxis.SetTitleSize(size); set = kTRUE; }
1814 if (opt.Contains("y")) { fYaxis.SetTitleSize(size); set = kTRUE; }
1815 if (opt.Contains("z")) { fZaxis.SetTitleSize(size); set = kTRUE; }
1816 if (!set) fTitleFontSize = size;
1817}
1818
1819////////////////////////////////////////////////////////////////////////////////
1820/// Method set X and Y offset of the axis 10^n notation.
1821/// It applies on axis belonging to an histogram (TAxis). It has no effect on standalone TGaxis.
1822/// It is in % of the pad size. It can be negative.
1823/// axis specifies which axis ("x","y"), default = "x"
1824/// if axis="xz" set the two axes
1825
1827{
1828 TString opt = axis;
1829 opt.ToLower();
1830
1831 if (opt.Contains("x")) {
1832 fXAxisExpXOffset = xoff;
1833 fXAxisExpYOffset = yoff;
1834 }
1835 if (opt.Contains("y")) {
1836 fYAxisExpXOffset = xoff;
1837 fYAxisExpYOffset = yoff;
1838 }
1839}
1840
1841////////////////////////////////////////////////////////////////////////////////
1842/// Method returns X and Y offset of the axis 10^n notation.
1843/// It applies on axis belonging to an histogram (TAxis)
1844
1845void TStyle::GetExponentOffset(Float_t &xoff, Float_t &yoff, Option_t *axis) const
1846{
1847 TString opt = axis;
1848 opt.ToLower();
1849
1850 if (opt.Contains("x")) {
1851 xoff = fXAxisExpXOffset;
1852 yoff = fXAxisExpYOffset;
1853 } else if (opt.Contains("y")) {
1854 xoff = fYAxisExpXOffset;
1855 yoff = fYAxisExpYOffset;
1856 } else {
1857 xoff = yoff = 0.;
1858 }
1859}
1860
1861////////////////////////////////////////////////////////////////////////////////
1862/// Method set maximum number of digits permitted for the axis labels above which the
1863/// notation with 10^N is used. For example, to accept 6 digits number like 900000
1864/// on an axis call `gStyle->SetAxisMaxDigits(6)`. The default value is 5.
1865/// Warning: this function changes the max number of digits in all axes.
1866/// If you only want to change the digits of the current TGaxis instance, use
1867/// axis->SetNdivisions(N*1000000 + (axis->GetNdiv()%1000000))
1868/// instead of gStyle->SetAxisMaxDigits(N).
1869
1871{
1872 fAxisMaxDigits = (maxd > 1) ? maxd : 1;
1873}
1874
1875////////////////////////////////////////////////////////////////////////////////
1876/// See TColor::SetPalette.
1877
1879{
1880 TColor::SetPalette(ncolors,colors,alpha);
1881}
1882
1883////////////////////////////////////////////////////////////////////////////////
1884/// \see TColor::CreateColorTableFromFile, (which calls TColor::SetPalette)
1886{
1887 TColor::CreateColorTableFromFile(fileName, alpha);
1888}
1889
1890////////////////////////////////////////////////////////////////////////////////
1891/// Change the time offset for time plotting.
1892/// Times are expressed in seconds. The corresponding numbers usually have 9
1893/// digits (or more if one takes into account fractions of seconds).
1894/// Thus, since it is very inconvenient to plot very large numbers on a scale,
1895/// one has to set an offset time that will be added to the axis beginning,
1896/// in order to plot times correctly and conveniently. A convenient way to
1897/// set the time offset is to use TDatime::Convert().
1898///
1899/// By default the time offset is set to 788918400 which corresponds to
1900/// 01/01/1995. This allows to have valid dates until 2072. The standard
1901/// UNIX time offset in 1970 allows only valid dates until 2030.
1902
1904{
1905 fTimeOffset = toffset;
1906}
1907
1908////////////////////////////////////////////////////////////////////////////////
1909/// Set option to strip decimals when drawing axis labels.
1910/// By default, TGaxis::PaintAxis removes trailing 0s after a dot
1911/// in the axis labels. Ex: {0,0.5,1,1.5,2,2.5, etc}
1912/// If this function is called with strip=kFALSE, TGAxis::PaintAxis will
1913/// draw labels with the same number of digits after the dot
1914/// Ex: (0.0,0.5,1.0,1.5,2.0,2.5,etc}
1915
1917{
1918 fStripDecimals = strip;
1919}
1920
1921////////////////////////////////////////////////////////////////////////////////
1922/// By setting whisker-range for candle plot, one can force
1923/// the whiskers to cover the fraction of the distribution.
1924/// Set wRange between 0 and 1. Default is 1
1925/// gStyle->SetCandleWhiskerRange(0.95) will set all candle-charts to cover 95% of
1926/// the distribution with the whiskers.
1927/// Can only be used with the standard-whisker definition
1928
1930{
1931 if (wRange < 0)
1933 else if (wRange > 1)
1935 else
1936 fCandleWhiskerRange = wRange;
1937}
1938
1939////////////////////////////////////////////////////////////////////////////////
1940/// By setting box-range for candle plot, one can force the
1941/// box of the candle-chart to cover that given fraction of the distribution.
1942/// Set bRange between 0 and 1. Default is 0.5
1943/// gStyle->SetCandleBoxRange(0.68) will set all candle-charts to cover 68% of the
1944/// distribution by the box
1945
1947{
1948 if (bRange < 0)
1949 fCandleBoxRange = 0;
1950 else if (bRange > 1)
1951 fCandleBoxRange = 1;
1952 else
1953 fCandleBoxRange = bRange;
1954}
1955
1956////////////////////////////////////////////////////////////////////////////////
1957/// Save the current style in a C++ macro file.
1958
1960{
1961 // Opens a file named filename or "Rootstyl.C"
1962 TString ff = filename && *filename ? filename : "Rootstyl.C";
1963
1964 // Computes the main method name.
1965 const char *fname = gSystem->BaseName(ff);
1966 Int_t lenfname = strlen(fname);
1967 char *sname = new char[lenfname + 1];
1968 Int_t i = 0;
1969 while ((i < lenfname) && (fname[i] != '.')) {
1970 sname[i] = fname[i];
1971 i++;
1972 }
1973 if (i == lenfname) ff += ".C";
1974 sname[i] = 0;
1975
1976 // Tries to open the file.
1977 std::ofstream out;
1978 out.open(ff.Data(), std::ios::out);
1979 if (!out.good()) {
1980 delete [] sname;
1981 Error("SaveSource", "cannot open file: %s", ff.Data());
1982 return;
1983 }
1984
1985 // Writes macro header, date/time stamp as string, and the used Root version
1986 TDatime t;
1987 out <<"// Mainframe macro generated from application: " << gApplication->Argv(0) << std::endl;
1988 out <<"// By ROOT version " << gROOT->GetVersion() << " on " << t.AsSQLString() << std::endl;
1989 out << std::endl;
1990
1991 char quote = '"';
1992
1993 // Writes include.
1994 out << "#if !defined( __CINT__) || defined (__MAKECINT__)" << std::endl << std::endl;
1995 out << "#ifndef ROOT_TStyle" << std::endl;
1996 out << "#include " << quote << "TStyle.h" << quote << std::endl;
1997 out << "#endif" << std::endl;
1998 out << std::endl << "#endif" << std::endl;
1999
2000 // Writes the macro entry point equal to the fname
2001 out << std::endl;
2002 out << "void " << sname << "()" << std::endl;
2003 out << "{" << std::endl;
2004 delete [] sname;
2005
2007
2008 out << "}" << std::endl;
2009 out.close();
2010
2011 printf(" C++ macro file %s has been generated\n", gSystem->BaseName(ff));
2012}
2013
2014////////////////////////////////////////////////////////////////////////////////
2015/// Save a main frame widget as a C++ statement(s) on output stream out.
2016
2017void TStyle::SavePrimitive(std::ostream &out, Option_t * /*= ""*/)
2018{
2019 auto asBool = [](bool flag) { return flag ? "kTRUE" : "kFALSE"; };
2020
2021 const char *pre = " ";
2022
2023 out << pre << "// Add the saved style to the current ROOT session." << std::endl;
2024 out << std::endl;
2025 out<<pre<<"delete gROOT->GetStyle(\"" << GetName() << "\");" << std::endl;
2026 out << std::endl;
2027 out<<pre<<"TStyle *tmpStyle = new TStyle(\"" << GetName() << "\", \"" << GetTitle() << "\");" << std::endl;
2028
2029 // fXAxis, fYAxis and fZAxis
2030 out<<pre<<"tmpStyle->SetNdivisions(" <<GetNdivisions("x") <<", \"x\");"<<std::endl;
2031 out<<pre<<"tmpStyle->SetNdivisions(" <<GetNdivisions("y") <<", \"y\");"<<std::endl;
2032 out<<pre<<"tmpStyle->SetNdivisions(" <<GetNdivisions("z") <<", \"z\");"<<std::endl;
2033 out<<pre<<"tmpStyle->SetAxisColor(" <<GetAxisColor("x") <<", \"x\");"<<std::endl;
2034 out<<pre<<"tmpStyle->SetAxisColor(" <<GetAxisColor("y") <<", \"y\");"<<std::endl;
2035 out<<pre<<"tmpStyle->SetAxisColor(" <<GetAxisColor("z") <<", \"z\");"<<std::endl;
2036 out<<pre<<"tmpStyle->SetLabelColor(" <<GetLabelColor("x") <<", \"x\");"<<std::endl;
2037 out<<pre<<"tmpStyle->SetLabelColor(" <<GetLabelColor("y") <<", \"y\");"<<std::endl;
2038 out<<pre<<"tmpStyle->SetLabelColor(" <<GetLabelColor("z") <<", \"z\");"<<std::endl;
2039 out<<pre<<"tmpStyle->SetLabelFont(" <<GetLabelFont("x") <<", \"x\");"<<std::endl;
2040 out<<pre<<"tmpStyle->SetLabelFont(" <<GetLabelFont("y") <<", \"y\");"<<std::endl;
2041 out<<pre<<"tmpStyle->SetLabelFont(" <<GetLabelFont("z") <<", \"z\");"<<std::endl;
2042 out<<pre<<"tmpStyle->SetLabelOffset("<<GetLabelOffset("x")<<", \"x\");"<<std::endl;
2043 out<<pre<<"tmpStyle->SetLabelOffset("<<GetLabelOffset("y")<<", \"y\");"<<std::endl;
2044 out<<pre<<"tmpStyle->SetLabelOffset("<<GetLabelOffset("z")<<", \"z\");"<<std::endl;
2045 out<<pre<<"tmpStyle->SetLabelSize(" <<GetLabelSize("x") <<", \"x\");"<<std::endl;
2046 out<<pre<<"tmpStyle->SetLabelSize(" <<GetLabelSize("y") <<", \"y\");"<<std::endl;
2047 out<<pre<<"tmpStyle->SetLabelSize(" <<GetLabelSize("z") <<", \"z\");"<<std::endl;
2048 out<<pre<<"tmpStyle->SetTickLength(" <<GetTickLength("x") <<", \"x\");"<<std::endl;
2049 out<<pre<<"tmpStyle->SetTickLength(" <<GetTickLength("y") <<", \"y\");"<<std::endl;
2050 out<<pre<<"tmpStyle->SetTickLength(" <<GetTickLength("z") <<", \"z\");"<<std::endl;
2051 out<<pre<<"tmpStyle->SetTitleOffset("<<GetTitleOffset("x")<<", \"x\");"<<std::endl;
2052 out<<pre<<"tmpStyle->SetTitleOffset("<<GetTitleOffset("y")<<", \"y\");"<<std::endl;
2053 out<<pre<<"tmpStyle->SetTitleOffset("<<GetTitleOffset("z")<<", \"z\");"<<std::endl;
2054 out<<pre<<"tmpStyle->SetTitleSize(" <<GetTitleSize("x") <<", \"x\");"<<std::endl;
2055 out<<pre<<"tmpStyle->SetTitleSize(" <<GetTitleSize("y") <<", \"y\");"<<std::endl;
2056 out<<pre<<"tmpStyle->SetTitleSize(" <<GetTitleSize("z") <<", \"z\");"<<std::endl;
2057 out<<pre<<"tmpStyle->SetTitleColor(" <<GetTitleColor("x") <<", \"x\");"<<std::endl;
2058 out<<pre<<"tmpStyle->SetTitleColor(" <<GetTitleColor("y") <<", \"y\");"<<std::endl;
2059 out<<pre<<"tmpStyle->SetTitleColor(" <<GetTitleColor("z") <<", \"z\");"<<std::endl;
2060 out<<pre<<"tmpStyle->SetTitleFont(" <<GetTitleFont("x") <<", \"x\");"<<std::endl;
2061 out<<pre<<"tmpStyle->SetTitleFont(" <<GetTitleFont("y") <<", \"y\");"<<std::endl;
2062 out<<pre<<"tmpStyle->SetTitleFont(" <<GetTitleFont("z") <<", \"z\");"<<std::endl;
2063
2064 out<<pre<<"tmpStyle->SetExponentOffset(" <<fXAxisExpXOffset<<", "<<fXAxisExpYOffset<<", \"x\");"<<std::endl;
2065 out<<pre<<"tmpStyle->SetExponentOffset(" <<fYAxisExpXOffset<<", "<<fYAxisExpYOffset<<", \"y\");"<<std::endl;
2066 out<<pre<<"tmpStyle->SetAxisMaxDigits(" << GetAxisMaxDigits() << ");"<<std::endl;
2067
2068 out<<pre<<"tmpStyle->SetBarWidth(" <<GetBarWidth() <<");"<<std::endl;
2069 out<<pre<<"tmpStyle->SetBarOffset(" <<GetBarOffset() <<");"<<std::endl;
2070 out<<pre<<"tmpStyle->SetDrawBorder(" <<GetDrawBorder() <<");"<<std::endl;
2071 out<<pre<<"tmpStyle->SetOptLogx(" <<GetOptLogx() <<");"<<std::endl;
2072 out<<pre<<"tmpStyle->SetOptLogy(" <<GetOptLogy() <<");"<<std::endl;
2073 out<<pre<<"tmpStyle->SetOptLogz(" <<GetOptLogz() <<");"<<std::endl;
2074 out<<pre<<"tmpStyle->SetOptDate(" <<GetOptDate() <<");"<<std::endl;
2075 out<<pre<<"tmpStyle->SetOptStat(" <<GetOptStat() <<");"<<std::endl;
2076 out<<pre<<"tmpStyle->SetOptTitle(" <<GetOptTitle() <<");"<<std::endl;
2077 out<<pre<<"tmpStyle->SetOptFit(" <<GetOptFit() <<");"<<std::endl;
2078 out<<pre<<"tmpStyle->SetNumberContours(" <<GetNumberContours() <<");"<<std::endl;
2079
2080 // fAttDate
2081 out<<pre<<"tmpStyle->GetAttDate()->SetTextFont(" <<GetAttDate()->GetTextFont() <<");"<<std::endl;
2082 out<<pre<<"tmpStyle->GetAttDate()->SetTextSize(" <<GetAttDate()->GetTextSize() <<");"<<std::endl;
2083 out<<pre<<"tmpStyle->GetAttDate()->SetTextAngle("<<GetAttDate()->GetTextAngle()<<");"<<std::endl;
2084 out<<pre<<"tmpStyle->GetAttDate()->SetTextAlign("<<GetAttDate()->GetTextAlign()<<");"<<std::endl;
2085 out<<pre<<"tmpStyle->GetAttDate()->SetTextColor("<<GetAttDate()->GetTextColor()<<");"<<std::endl;
2086
2087 out<<pre<<"tmpStyle->SetDateX(" <<GetDateX() <<");"<<std::endl;
2088 out<<pre<<"tmpStyle->SetDateY(" <<GetDateY() <<");"<<std::endl;
2089 out<<pre<<"tmpStyle->SetEndErrorSize(" <<GetEndErrorSize() <<");"<<std::endl;
2090 out<<pre<<"tmpStyle->SetErrorX(" <<GetErrorX() <<");"<<std::endl;
2091 out<<pre<<"tmpStyle->SetFuncColor(" <<GetFuncColor() <<");"<<std::endl;
2092 out<<pre<<"tmpStyle->SetFuncStyle(" <<GetFuncStyle() <<");"<<std::endl;
2093 out<<pre<<"tmpStyle->SetFuncWidth(" <<GetFuncWidth() <<");"<<std::endl;
2094 out<<pre<<"tmpStyle->SetGridColor(" <<GetGridColor() <<");"<<std::endl;
2095 out<<pre<<"tmpStyle->SetGridStyle(" <<GetGridStyle() <<");"<<std::endl;
2096 out<<pre<<"tmpStyle->SetGridWidth(" <<GetGridWidth() <<");"<<std::endl;
2097 out<<pre<<"tmpStyle->SetLegendBorderSize("<<GetLegendBorderSize()<<");"<<std::endl;
2098 out<<pre<<"tmpStyle->SetLegendFillColor(" <<GetLegendFillColor() <<");"<<std::endl;
2099 out<<pre<<"tmpStyle->SetLegendFont(" <<GetLegendFont() <<");"<<std::endl;
2100 out<<pre<<"tmpStyle->SetLegendTextSize(" <<GetLegendTextSize() <<");"<<std::endl;
2101 out<<pre<<"tmpStyle->SetHatchesLineWidth("<<GetHatchesLineWidth()<<");"<<std::endl;
2102 out<<pre<<"tmpStyle->SetHatchesSpacing(" <<GetHatchesSpacing() <<");"<<std::endl;
2103 out<<pre<<"tmpStyle->SetFrameFillColor(" <<GetFrameFillColor() <<");"<<std::endl;
2104 out<<pre<<"tmpStyle->SetFrameLineColor(" <<GetFrameLineColor() <<");"<<std::endl;
2105 out<<pre<<"tmpStyle->SetFrameFillStyle(" <<GetFrameFillStyle() <<");"<<std::endl;
2106 out<<pre<<"tmpStyle->SetFrameLineStyle(" <<GetFrameLineStyle() <<");"<<std::endl;
2107 out<<pre<<"tmpStyle->SetFrameLineWidth(" <<GetFrameLineWidth() <<");"<<std::endl;
2108 out<<pre<<"tmpStyle->SetFrameBorderSize(" <<GetFrameBorderSize() <<");"<<std::endl;
2109 out<<pre<<"tmpStyle->SetFrameBorderMode(" <<GetFrameBorderMode() <<");"<<std::endl;
2110 out<<pre<<"tmpStyle->SetHistFillColor(" <<GetHistFillColor() <<");"<<std::endl;
2111 out<<pre<<"tmpStyle->SetHistLineColor(" <<GetHistLineColor() <<");"<<std::endl;
2112 out<<pre<<"tmpStyle->SetHistFillStyle(" <<GetHistFillStyle() <<");"<<std::endl;
2113 out<<pre<<"tmpStyle->SetHistLineStyle(" <<GetHistLineStyle() <<");"<<std::endl;
2114 out<<pre<<"tmpStyle->SetHistLineWidth(" <<GetHistLineWidth() <<");"<<std::endl;
2115 out<<pre<<"tmpStyle->SetHistMinimumZero(" <<asBool(GetHistMinimumZero())<<");"<<std::endl;
2116 out<<pre<<"tmpStyle->SetCanvasPreferGL(" <<asBool(GetCanvasPreferGL()) <<");"<<std::endl;
2117 out<<pre<<"tmpStyle->SetCanvasColor(" <<GetCanvasColor() <<");"<<std::endl;
2118 out<<pre<<"tmpStyle->SetCanvasBorderSize("<<GetCanvasBorderSize()<<");"<<std::endl;
2119 out<<pre<<"tmpStyle->SetCanvasBorderMode("<<GetCanvasBorderMode()<<");"<<std::endl;
2120 out<<pre<<"tmpStyle->SetCanvasDefH(" <<GetCanvasDefH() <<");"<<std::endl;
2121 out<<pre<<"tmpStyle->SetCanvasDefW(" <<GetCanvasDefW() <<");"<<std::endl;
2122 out<<pre<<"tmpStyle->SetCanvasDefX(" <<GetCanvasDefX() <<");"<<std::endl;
2123 out<<pre<<"tmpStyle->SetCanvasDefY(" <<GetCanvasDefY() <<");"<<std::endl;
2124 out<<pre<<"tmpStyle->SetPadColor(" <<GetPadColor() <<");"<<std::endl;
2125 out<<pre<<"tmpStyle->SetPadBorderSize(" <<GetPadBorderSize() <<");"<<std::endl;
2126 out<<pre<<"tmpStyle->SetPadBorderMode(" <<GetPadBorderMode() <<");"<<std::endl;
2127 out<<pre<<"tmpStyle->SetPadBottomMargin(" <<GetPadBottomMargin() <<");"<<std::endl;
2128 out<<pre<<"tmpStyle->SetPadTopMargin(" <<GetPadTopMargin() <<");"<<std::endl;
2129 out<<pre<<"tmpStyle->SetPadLeftMargin(" <<GetPadLeftMargin() <<");"<<std::endl;
2130 out<<pre<<"tmpStyle->SetPadRightMargin(" <<GetPadRightMargin() <<");"<<std::endl;
2131 out<<pre<<"tmpStyle->SetPadGridX(" <<asBool(GetPadGridX())<<");" <<std::endl;
2132 out<<pre<<"tmpStyle->SetPadGridY(" <<asBool(GetPadGridY())<<");" <<std::endl;
2133 out<<pre<<"tmpStyle->SetPadTickX(" <<GetPadTickX() <<");"<<std::endl;
2134 out<<pre<<"tmpStyle->SetPadTickY(" <<GetPadTickY() <<");"<<std::endl;
2135
2136 // fPaperSizeX, fPaperSizeY
2137 out<<pre<<"tmpStyle->SetPaperSize(" <<fPaperSizeX<<", "<<fPaperSizeY<<");"<<std::endl;
2138
2139 out<<pre<<"tmpStyle->SetScreenFactor(" <<GetScreenFactor() <<");"<<std::endl;
2140 out<<pre<<"tmpStyle->SetStatColor(" <<GetStatColor() <<");"<<std::endl;
2141 out<<pre<<"tmpStyle->SetStatTextColor(" <<GetStatTextColor() <<");"<<std::endl;
2142 out<<pre<<"tmpStyle->SetStatBorderSize(" <<GetStatBorderSize() <<");"<<std::endl;
2143 out<<pre<<"tmpStyle->SetStatFont(" <<GetStatFont() <<");"<<std::endl;
2144 out<<pre<<"tmpStyle->SetStatFontSize(" <<GetStatFontSize() <<");"<<std::endl;
2145 out<<pre<<"tmpStyle->SetStatStyle(" <<GetStatStyle() <<");"<<std::endl;
2146 out<<pre<<"tmpStyle->SetStatFormat(\"" <<GetStatFormat() <<"\");"<<std::endl;
2147 out<<pre<<"tmpStyle->SetStatX(" <<GetStatX() <<");"<<std::endl;
2148 out<<pre<<"tmpStyle->SetStatY(" <<GetStatY() <<");"<<std::endl;
2149 out<<pre<<"tmpStyle->SetStatW(" <<GetStatW() <<");"<<std::endl;
2150 out<<pre<<"tmpStyle->SetStatH(" <<GetStatH() <<");"<<std::endl;
2151 out<<pre<<"tmpStyle->SetStripDecimals(" <<asBool(GetStripDecimals())<<");"<<std::endl;
2152 out<<pre<<"tmpStyle->SetTitleAlign(" <<GetTitleAlign() <<");"<<std::endl;
2153 out<<pre<<"tmpStyle->SetTitleFillColor(" <<GetTitleFillColor() <<");"<<std::endl;
2154 out<<pre<<"tmpStyle->SetTitleTextColor(" <<GetTitleTextColor() <<");"<<std::endl;
2155 out<<pre<<"tmpStyle->SetTitleBorderSize("<<GetTitleBorderSize()<<");"<<std::endl;
2156 out<<pre<<"tmpStyle->SetTitleFont(" <<GetTitleFont() <<");"<<std::endl;
2157 out<<pre<<"tmpStyle->SetTitleFontSize(" <<GetTitleFontSize() <<");"<<std::endl;
2158 out<<pre<<"tmpStyle->SetTitleStyle(" <<GetTitleStyle() <<");"<<std::endl;
2159 out<<pre<<"tmpStyle->SetTitleX(" <<GetTitleX() <<");"<<std::endl;
2160 out<<pre<<"tmpStyle->SetTitleY(" <<GetTitleY() <<");"<<std::endl;
2161 out<<pre<<"tmpStyle->SetTitleW(" <<GetTitleW() <<");"<<std::endl;
2162 out<<pre<<"tmpStyle->SetTitleH(" <<GetTitleH() <<");"<<std::endl;
2163 out<<pre<<"tmpStyle->SetLegoInnerR(" <<GetLegoInnerR() <<");"<<std::endl;
2164 out<<std::endl;
2165
2166 // fPalette
2167 out<<pre<<"Int_t tmpPaletteColor[" <<GetNumberOfColors() <<"] = {";
2168 for (Int_t ci=0; ci<GetNumberOfColors()-1; ++ci) {
2169 if (ci % 10 == 9)
2170 out<<std::endl<<pre<<" ";
2171 out<<" "<<GetColorPalette(ci)<<",";
2172 }
2173 out<<" "<<GetColorPalette(GetNumberOfColors() - 1) <<" };"<<std::endl;
2174 out<<pre<<"tmpStyle->SetPalette("<<GetNumberOfColors()<< ", tmpPaletteColor);" << std::endl;
2175 out<<std::endl;
2176
2177 // fLineStyle
2178 out<<pre<<"TString tmpLineStyleArray[30] = {";
2179 for (Int_t li=0; li<29; ++li) {
2180 if (li % 5 == 4)
2181 out<<std::endl<<pre<<" ";
2182 out<<" \"" << fLineStyle[li] << "\",";
2183 }
2184 out<<" \""<<fLineStyle[29].Data()<<"\" };"<<std::endl;
2185 out<<pre<<"for (Int_t i=0; i<30; i++)"<<std::endl;
2186 out<<pre<<" tmpStyle->SetLineStyleString(i, tmpLineStyleArray[i]);"<<std::endl;
2187 out<<std::endl;
2188
2189 out<<pre<<"tmpStyle->SetHeaderPS(\"" <<GetHeaderPS() <<"\");"<<std::endl;
2190 out<<pre<<"tmpStyle->SetTitlePS(\"" <<GetTitlePS() <<"\");"<<std::endl;
2191 out<<pre<<"tmpStyle->SetFitFormat(\"" <<GetFitFormat() <<"\");"<<std::endl;
2192 out<<pre<<"tmpStyle->SetPaintTextFormat(\""<<GetPaintTextFormat() <<"\");"<<std::endl;
2193 out<<pre<<"tmpStyle->SetLineScalePS(" <<GetLineScalePS() <<");"<<std::endl;
2194 out<<pre<<"tmpStyle->SetJoinLinePS(" <<GetJoinLinePS() <<");"<<std::endl;
2195 out<<pre<<"tmpStyle->SetCapLinePS(" <<GetCapLinePS() <<");"<<std::endl;
2196 out<<pre<<"tmpStyle->SetColorModelPS(" <<GetColorModelPS() <<");"<<std::endl;
2197 out<<pre<<"tmpStyle->SetTimeOffset(" <<TString::Format("%9.0f", GetTimeOffset())<<");"<<std::endl;
2198 out<<std::endl;
2199
2200 // Inheritance :
2201 // TAttLine :
2202 out<<pre<<"tmpStyle->SetLineColor(" <<GetLineColor() <<");" <<std::endl;
2203 out<<pre<<"tmpStyle->SetLineStyle(" <<GetLineStyle() <<");" <<std::endl;
2204 out<<pre<<"tmpStyle->SetLineWidth(" <<GetLineWidth() <<");" <<std::endl;
2205
2206 // TAttFill
2207 out<<pre<<"tmpStyle->SetFillColor(" <<GetFillColor() <<");" <<std::endl;
2208 out<<pre<<"tmpStyle->SetFillStyle(" <<GetFillStyle() <<");" <<std::endl;
2209
2210 // TAttMarker
2211 out<<pre<<"tmpStyle->SetMarkerColor(" <<GetMarkerColor() <<");" <<std::endl;
2212 out<<pre<<"tmpStyle->SetMarkerSize(" <<GetMarkerSize() <<");" <<std::endl;
2213 out<<pre<<"tmpStyle->SetMarkerStyle(" <<GetMarkerStyle() <<");" <<std::endl;
2214
2215 // TAttText
2216 out<<pre<<"tmpStyle->SetTextAlign(" <<GetTextAlign() <<");" <<std::endl;
2217 out<<pre<<"tmpStyle->SetTextAngle(" <<GetTextAngle() <<");" <<std::endl;
2218 out<<pre<<"tmpStyle->SetTextColor(" <<GetTextColor() <<");" <<std::endl;
2219 out<<pre<<"tmpStyle->SetTextFont(" <<GetTextFont() <<");" <<std::endl;
2220 out<<pre<<"tmpStyle->SetTextSize(" <<GetTextSize() <<");" <<std::endl;
2221}
#define c(i)
Definition: RSha256.hxx:101
size_t size(const MatrixT &matrix)
retrieve the size of a square matrix
short Style_t
Definition: RtypesCore.h:89
int Int_t
Definition: RtypesCore.h:45
short Color_t
Definition: RtypesCore.h:92
unsigned char UChar_t
Definition: RtypesCore.h:38
const Bool_t kFALSE
Definition: RtypesCore.h:101
unsigned int UInt_t
Definition: RtypesCore.h:46
float Float_t
Definition: RtypesCore.h:57
const Bool_t kTRUE
Definition: RtypesCore.h:100
const char Option_t
Definition: RtypesCore.h:66
#define BIT(n)
Definition: Rtypes.h:85
#define ClassImp(name)
Definition: Rtypes.h:375
@ kRed
Definition: Rtypes.h:66
@ kBlack
Definition: Rtypes.h:65
@ kGreen
Definition: Rtypes.h:66
@ kBlue
Definition: Rtypes.h:66
R__EXTERN TApplication * gApplication
Definition: TApplication.h:165
R__EXTERN TEnv * gEnv
Definition: TEnv.h:170
Option_t Option_t option
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char filename
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h offset
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t np
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h length
Option_t Option_t TPoint TPoint const char mode
Option_t Option_t style
Option_t Option_t TPoint TPoint const char text
char name[80]
Definition: TGX11.cxx:110
R__EXTERN TVirtualMutex * gROOTMutex
Definition: TROOT.h:63
#define gROOT
Definition: TROOT.h:406
TStyle * gStyle
Definition: TStyle.cxx:30
const UInt_t kTakeStyle
Definition: TStyle.cxx:31
R__EXTERN TSystem * gSystem
Definition: TSystem.h:560
#define R__LOCKGUARD(mutex)
#define gPad
Definition: TVirtualPad.h:302
Color * colors
Definition: X3DBuffer.c:21
#define snprintf
Definition: civetweb.c:1540
char ** Argv() const
Definition: TApplication.h:136
virtual Color_t GetTitleColor() const
Definition: TAttAxis.h:46
virtual Color_t GetLabelColor() const
Definition: TAttAxis.h:38
virtual Int_t GetNdivisions() const
Definition: TAttAxis.h:36
virtual Color_t GetAxisColor() const
Definition: TAttAxis.h:37
virtual void SetTitleOffset(Float_t offset=1)
Set distance between the axis and the axis title.
Definition: TAttAxis.cxx:298
virtual Style_t GetTitleFont() const
Definition: TAttAxis.h:47
virtual Float_t GetLabelOffset() const
Definition: TAttAxis.h:40
virtual void SetAxisColor(Color_t color=1, Float_t alpha=1.)
Set color of the line axis and tick marks.
Definition: TAttAxis.cxx:160
virtual void SetLabelSize(Float_t size=0.04)
Set size of axis labels.
Definition: TAttAxis.cxx:203
virtual Style_t GetLabelFont() const
Definition: TAttAxis.h:39
virtual void SetTitleFont(Style_t font=62)
Set the title font.
Definition: TAttAxis.cxx:327
virtual void SetLabelOffset(Float_t offset=0.005)
Set distance between the axis and the labels.
Definition: TAttAxis.cxx:191
virtual void SetLabelFont(Style_t font=62)
Set labels' font.
Definition: TAttAxis.cxx:180
virtual void SetTitleSize(Float_t size=0.04)
Set size of axis title.
Definition: TAttAxis.cxx:309
virtual void SetTitleColor(Color_t color=1)
Set color of axis title.
Definition: TAttAxis.cxx:318
virtual Float_t GetTitleSize() const
Definition: TAttAxis.h:44
virtual Float_t GetLabelSize() const
Definition: TAttAxis.h:41
virtual Float_t GetTickLength() const
Definition: TAttAxis.h:45
virtual void ResetAttAxis(Option_t *option="")
Reset axis attributes.
Definition: TAttAxis.cxx:79
virtual Float_t GetTitleOffset() const
Definition: TAttAxis.h:43
virtual void SetTickLength(Float_t length=0.03)
Set tick mark length.
Definition: TAttAxis.cxx:284
virtual void SetNdivisions(Int_t n=510, Bool_t optim=kTRUE)
Set the number of divisions for this axis.
Definition: TAttAxis.cxx:233
void Copy(TAttAxis &attaxis) const
Copy of the object.
Definition: TAttAxis.cxx:61
virtual void SetLabelColor(Color_t color=1, Float_t alpha=1.)
Set color of labels.
Definition: TAttAxis.cxx:170
Fill Area Attributes class.
Definition: TAttFill.h:19
virtual Color_t GetFillColor() const
Return the fill area color.
Definition: TAttFill.h:30
void Copy(TAttFill &attfill) const
Copy this fill attributes to a new TAttFill.
Definition: TAttFill.cxx:204
virtual Style_t GetFillStyle() const
Return the fill area style.
Definition: TAttFill.h:31
virtual void SetFillColor(Color_t fcolor)
Set the fill area color.
Definition: TAttFill.h:37
virtual void ResetAttFill(Option_t *option="")
Reset this fill attributes to default values.
Definition: TAttFill.cxx:227
virtual void SetFillStyle(Style_t fstyle)
Set the fill area style.
Definition: TAttFill.h:39
Line Attributes class.
Definition: TAttLine.h:18
virtual Color_t GetLineColor() const
Return the line color.
Definition: TAttLine.h:33
virtual Width_t GetLineWidth() const
Return the line width.
Definition: TAttLine.h:35
virtual void SetLineWidth(Width_t lwidth)
Set the line width.
Definition: TAttLine.h:43
virtual void ResetAttLine(Option_t *option="")
Reset this line attributes to default values.
Definition: TAttLine.cxx:263
virtual Style_t GetLineStyle() const
Return the line style.
Definition: TAttLine.h:34
void Copy(TAttLine &attline) const
Copy this line attributes to a new TAttLine.
Definition: TAttLine.cxx:175
Marker Attributes class.
Definition: TAttMarker.h:19
virtual Style_t GetMarkerStyle() const
Return the marker style.
Definition: TAttMarker.h:32
virtual Color_t GetMarkerColor() const
Return the marker color.
Definition: TAttMarker.h:31
virtual Size_t GetMarkerSize() const
Return the marker size.
Definition: TAttMarker.h:33
virtual void SetMarkerStyle(Style_t mstyle=1)
Set the marker style.
Definition: TAttMarker.h:40
virtual void ResetAttMarker(Option_t *toption="")
Reset this marker attributes to the default values.
Definition: TAttMarker.cxx:335
void Copy(TAttMarker &attmarker) const
Copy this marker attributes to a new TAttMarker.
Definition: TAttMarker.cxx:241
virtual void SetMarkerSize(Size_t msize=1)
Set the marker size.
Definition: TAttMarker.h:45
Text Attributes class.
Definition: TAttText.h:18
virtual Float_t GetTextSize() const
Return the text size.
Definition: TAttText.h:36
virtual void SetTextAlign(Short_t align=11)
Set the text alignment.
Definition: TAttText.h:42
virtual Short_t GetTextAlign() const
Return the text alignment.
Definition: TAttText.h:32
virtual Font_t GetTextFont() const
Return the text font.
Definition: TAttText.h:35
virtual Color_t GetTextColor() const
Return the text color.
Definition: TAttText.h:34
virtual Float_t GetTextAngle() const
Return the text angle.
Definition: TAttText.h:33
virtual void SetTextFont(Font_t tfont=62)
Set the text font.
Definition: TAttText.h:46
virtual void SetTextSize(Float_t tsize=1)
Set the text size.
Definition: TAttText.h:47
void Copy(TAttText &atttext) const
Copy this text attributes to a new TAttText.
Definition: TAttText.cxx:299
virtual void ResetAttText(Option_t *toption="")
Reset this text attributes to default values.
Definition: TAttText.cxx:366
Using a TBrowser one can browse all ROOT objects.
Definition: TBrowser.h:37
The color creation and management class.
Definition: TColor.h:19
static void SetPalette(Int_t ncolors, Int_t *colors, Float_t alpha=1.)
Static function.
Definition: TColor.cxx:2566
static Int_t GetColorPalette(Int_t i)
Static function returning the color number i in current palette.
Definition: TColor.cxx:1450
static Int_t CreateColorTableFromFile(TString fileName, Float_t alpha=1.)
Static function creating a color palette based on an input text file.
Definition: TColor.cxx:2269
static Int_t GetNumberOfColors()
Static function returning number of colors in the color palette.
Definition: TColor.cxx:1470
This class stores the date and time with a precision of one second in an unsigned 32 bit word (950130...
Definition: TDatime.h:37
const char * AsSQLString() const
Return the date & time in SQL compatible string format, like: 1997-01-15 20:16:28.
Definition: TDatime.cxx:152
virtual Int_t GetValue(const char *name, Int_t dflt) const
Returns the integer value for a resource.
Definition: TEnv.cxx:491
The TNamed class is the base class for all named ROOT classes.
Definition: TNamed.h:29
const char * GetName() const override
Returns name of object.
Definition: TNamed.h:47
const char * GetTitle() const override
Returns title of object.
Definition: TNamed.h:48
virtual void SetNameTitle(const char *name, const char *title)
Set all the TNamed parameters (name and title).
Definition: TNamed.cxx:154
Mother of all ROOT objects.
Definition: TObject.h:41
virtual TObject * FindObject(const char *name) const
Must be redefined in derived classes.
Definition: TObject.cxx:403
void SetBit(UInt_t f, Bool_t set)
Set or unset the user status bits as specified in f.
Definition: TObject.cxx:774
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
Definition: TObject.cxx:970
Basic string class.
Definition: TString.h:136
void ToLower()
Change string to lower-case.
Definition: TString.cxx:1171
const char * Data() const
Definition: TString.h:369
static TString Format(const char *fmt,...)
Static method which formats a string using a printf style format descriptor and return a TString.
Definition: TString.cxx:2357
Bool_t Contains(const char *pat, ECaseCompare cmp=kExact) const
Definition: TString.h:625
TStyle objects may be created to define special styles.
Definition: TStyle.h:29
Double_t GetTimeOffset() const
Definition: TStyle.h:266
Int_t GetAxisMaxDigits() const
Method returns maximum number of digits permitted for the axis labels above which the notation with 1...
Definition: TStyle.cxx:1147
Int_t GetOptLogy() const
Definition: TStyle.h:245
Color_t GetGridColor() const
Definition: TStyle.h:219
Int_t fOptFile
True if option File is selected.
Definition: TStyle.h:45
Int_t GetOptStat() const
Definition: TStyle.h:242
Color_t GetLabelColor(Option_t *axis="X") const
Return the label color number in the axis.
Definition: TStyle.cxx:1099
void SetAxisColor(Color_t color=1, Option_t *axis="X")
Set color to draw the axis line and tick marks.
Definition: TStyle.cxx:1313
void SetPadBorderMode(Int_t mode=1)
Definition: TStyle.h:352
void SetOptTitle(Int_t tit=1)
Definition: TStyle.h:330
Color_t fGridColor
Grid line color (if 0 use axis line color)
Definition: TStyle.h:60
void SetPadTopMargin(Float_t margin=0.1)
Definition: TStyle.h:354
Color_t GetStatTextColor() const
Definition: TStyle.h:255
void SetLegendFont(Style_t font=62)
Definition: TStyle.h:348
void SetTitleX(Float_t x=0)
Definition: TStyle.h:408
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:1630
Int_t fCanvasDefW
Default canvas width.
Definition: TStyle.h:88
Int_t fHatchesLineWidth
Hatches line width for hatch styles > 3100.
Definition: TStyle.h:67
Float_t fScreenFactor
Multiplication factor for canvas size and position.
Definition: TStyle.h:104
Float_t fYAxisExpXOffset
Y axis exponent label X offset.
Definition: TStyle.h:146
Float_t fTitleFontSize
Font size in pixels for fonts with precision type 3.
Definition: TStyle.h:122
void SetDateX(Float_t x=0.01)
Definition: TStyle.h:333
Int_t fCanvasDefX
Default canvas top X position.
Definition: TStyle.h:89
void SetStatFormat(const char *format="6.4g")
Definition: TStyle.h:391
void SetPadBottomMargin(Float_t margin=0.1)
Definition: TStyle.h:353
Float_t GetTitleX() const
Definition: TStyle.h:277
Bool_t fViolinScaled
Violin plot, shall the violin or histos be scaled to each other by the maximum height?
Definition: TStyle.h:143
void SetLegendFillColor(Color_t color=0)
Definition: TStyle.h:347
Float_t fPadRightMargin
Pad right margin.
Definition: TStyle.h:97
Float_t fPaperSizeX
PostScript paper size along X.
Definition: TStyle.h:102
void SetPaintTextFormat(const char *format="g")
Definition: TStyle.h:381
Int_t GetOptTitle() const
Definition: TStyle.h:243
Float_t GetScreenFactor() const
Definition: TStyle.h:253
TString fPaintTextFormat
Printing format for TH2::PaintText.
Definition: TStyle.h:133
Color_t GetHistLineColor() const
Definition: TStyle.h:230
Color_t fStatColor
Stat fill area color.
Definition: TStyle.h:105
Int_t GetNdivisions(Option_t *axis="X") const
Return number of divisions.
Definition: TStyle.cxx:1067
void SetFrameFillColor(Color_t color=1)
Definition: TStyle.h:367
Int_t fFrameBorderMode
Pad frame border mode.
Definition: TStyle.h:75
Int_t GetPadTickX() const
Definition: TStyle.h:214
Color_t GetTitleColor(Option_t *axis="X") const
Return title color.
Definition: TStyle.cxx:1194
Style_t fHistLineStyle
Histogram line style.
Definition: TStyle.h:79
Color_t GetFrameLineColor() const
Definition: TStyle.h:223
Style_t GetGridStyle() const
Definition: TStyle.h:220
Int_t GetJoinLinePS() const
Returns the line join method used for PostScript, PDF and SVG output. See TPostScript::SetLineJoin fo...
Definition: TStyle.h:284
void SetStatFont(Style_t font=62)
Definition: TStyle.h:389
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:1330
Float_t GetStatFontSize() const
Definition: TStyle.h:258
Float_t GetBarOffset() const
Definition: TStyle.h:180
Float_t GetStatX() const
Definition: TStyle.h:261
Float_t GetLabelSize(Option_t *axis="X") const
Return label size.
Definition: TStyle.cxx:1135
void SetCapLinePS(Int_t capline=0)
Set the line cap method used for PostScript, PDF and SVG output. See TPostScript::SetLineCap for deta...
Definition: TStyle.h:303
Color_t GetPadColor() const
Definition: TStyle.h:205
Float_t fBarOffset
Offset of bar for graphs.
Definition: TStyle.h:36
void SetPadRightMargin(Float_t margin=0.1)
Definition: TStyle.h:356
Style_t GetHistFillStyle() const
Definition: TStyle.h:231
void SetCanvasColor(Color_t color=19)
Definition: TStyle.h:339
TAttAxis fZaxis
Z axis attributes.
Definition: TStyle.h:34
void SetTitleFont(Style_t font=62, Option_t *axis="X")
Definition: TStyle.cxx:1765
Float_t GetPadRightMargin() const
Definition: TStyle.h:211
Float_t GetTickLength(Option_t *axis="X") const
Return tick length.
Definition: TStyle.cxx:1182
void SetExponentOffset(Float_t xoff=0., Float_t yoff=0., Option_t *axis="XY")
Method set X and Y offset of the axis 10^n notation.
Definition: TStyle.cxx:1826
Int_t fDrawBorder
Flag to draw border(=1) or not (0)
Definition: TStyle.h:38
void SetTitleBorderSize(Width_t size=2)
Definition: TStyle.h:403
void SaveSource(const char *filename, Option_t *option=nullptr)
Save the current style in a C++ macro file.
Definition: TStyle.cxx:1959
Style_t GetFrameFillStyle() const
Definition: TStyle.h:224
Float_t GetTitleSize(Option_t *axis="X") const
Return title size.
Definition: TStyle.cxx:1230
Float_t GetLegoInnerR() const
Definition: TStyle.h:237
Int_t AxisChoice(Option_t *axis) const
Definition: TStyle.cxx:506
TString fTitlePS
User defined Postscript file title.
Definition: TStyle.h:131
Style_t GetLabelFont(Option_t *axis="X") const
Return label font.
Definition: TStyle.cxx:1111
virtual ~TStyle()
Destructor.
Definition: TStyle.cxx:478
void SetCanvasBorderMode(Int_t mode=1)
Definition: TStyle.h:341
Float_t GetTitleY() const
Definition: TStyle.h:278
Style_t fFuncStyle
Function style.
Definition: TStyle.h:58
void SetOptDate(Int_t datefl=1)
If optdate is non null, the current date/time will be printed in the canvas.
Definition: TStyle.cxx:1536
Int_t fPadTickX
True to set special pad ticks along X.
Definition: TStyle.h:100
Float_t GetDateX() const
Definition: TStyle.h:195
Style_t fStatFont
Font style of Stats PaveLabel.
Definition: TStyle.h:108
TString fLineStyle[30]
String describing line style i (for postScript)
Definition: TStyle.h:129
void SetDateY(Float_t y=0.01)
Definition: TStyle.h:334
Width_t fGridWidth
Grid line width.
Definition: TStyle.h:62
Double_t fCandleBoxRange
Candle plot, The fraction which is covered by the box (0 < x < 1), default 0.5.
Definition: TStyle.h:141
Float_t GetTitleOffset(Option_t *axis="X") const
Return title offset.
Definition: TStyle.cxx:1218
Color_t GetHistFillColor() const
Definition: TStyle.h:229
void SetFrameBorderMode(Int_t mode=1)
Definition: TStyle.h:373
Style_t GetTitleFont(Option_t *axis="X") const
Return title font.
Definition: TStyle.cxx:1206
Int_t fOptLogx
True if log scale in X.
Definition: TStyle.h:39
Bool_t fStripDecimals
Strip decimals in axis labels.
Definition: TStyle.h:116
Bool_t fHistMinimumZero
True if default minimum is 0, false if minimum is automatic.
Definition: TStyle.h:81
Style_t fLegendFont
Legend font style.
Definition: TStyle.h:65
void SetFuncColor(Color_t color=1)
Definition: TStyle.h:362
Bool_t GetHistMinimumZero() const
Definition: TStyle.h:234
TAttAxis fXaxis
X axis attributes.
Definition: TStyle.h:32
void SetHeaderPS(const char *header)
Define a string to be inserted in the Postscript header.
Definition: TStyle.cxx:1352
Float_t GetStatY() const
Definition: TStyle.h:262
Color_t fTitleColor
Title fill area color.
Definition: TStyle.h:118
Int_t fJoinLinePS
Determines the appearance of joining lines on PostScript, PDF and SVG.
Definition: TStyle.h:135
void SetPadTickY(Int_t ticky)
Definition: TStyle.h:360
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:1788
Width_t fFrameLineWidth
Pad frame line width.
Definition: TStyle.h:73
Color_t GetTitleFillColor() const
Definition: TStyle.h:268
Int_t GetCanvasDefH() const
Definition: TStyle.h:189
void SetColorModelPS(Int_t c=0)
Define the color model used by TPostScript and TPDF (RGB or CMYK).
Definition: TStyle.cxx:1265
Style_t GetTitleStyle() const
Definition: TStyle.h:270
void SetPadTickX(Int_t tickx)
Definition: TStyle.h:359
Float_t GetLabelOffset(Option_t *axis="X") const
Return label offset.
Definition: TStyle.cxx:1123
Int_t GetCanvasDefX() const
Definition: TStyle.h:191
Int_t fOptTitle
True if option Title is selected.
Definition: TStyle.h:44
Style_t fTitleFont
Font style of Title PaveLabel.
Definition: TStyle.h:121
Int_t GetOptDate() const
Definition: TStyle.h:239
Bool_t GetPadGridY() const
Definition: TStyle.h:213
Int_t fOptDate
True if date option is selected.
Definition: TStyle.h:42
Float_t fPadTopMargin
Pad top margin.
Definition: TStyle.h:95
Color_t GetStatColor() const
Definition: TStyle.h:254
Width_t fCanvasBorderSize
Canvas border size.
Definition: TStyle.h:85
void SetTitleTextColor(Color_t color=1)
Definition: TStyle.h:400
void SetAxisMaxDigits(Int_t maxd=5)
Method set maximum number of digits permitted for the axis labels above which the notation with 10^N ...
Definition: TStyle.cxx:1870
Color_t fCanvasColor
Canvas color.
Definition: TStyle.h:84
Float_t GetPadLeftMargin() const
Definition: TStyle.h:210
Double_t GetHatchesSpacing() const
Definition: TStyle.h:199
void SetPalette(Int_t ncolors=kBird, Int_t *colors=nullptr, Float_t alpha=1.)
See TColor::SetPalette.
Definition: TStyle.cxx:1878
Float_t fStatY
Y position of top right corner of stat box.
Definition: TStyle.h:113
void Copy(TObject &style) const override
Copy this style.
Definition: TStyle.cxx:550
Width_t GetLegendBorderSize() const
Definition: TStyle.h:200
Style_t fFrameLineStyle
Pad frame line style.
Definition: TStyle.h:72
void SetStatBorderSize(Width_t size=2)
Definition: TStyle.h:388
Float_t GetBarWidth() const
Definition: TStyle.h:181
Int_t fCanvasBorderMode
Canvas border mode.
Definition: TStyle.h:86
Bool_t GetCanvasPreferGL() const
Definition: TStyle.h:185
Int_t GetColorModelPS() const
Definition: TStyle.h:194
void SetErrorX(Float_t errorx=0.5)
Definition: TStyle.h:336
Int_t GetCanvasDefY() const
Definition: TStyle.h:192
void SetTitleColor(Color_t color=1, Option_t *axis="X")
Definition: TStyle.cxx:1744
void SetNumberContours(Int_t number=20)
Set the default number of contour levels when drawing 2-d plots.
Definition: TStyle.cxx:1490
void Paint(Option_t *option="") override
Copy this style to gStyle.
Definition: TStyle.cxx:1242
Float_t fTitleX
X position of top left corner of title box.
Definition: TStyle.h:124
Int_t fShowToolBar
Show toolbar.
Definition: TStyle.h:49
void SetLabelFont(Style_t font=62, Option_t *axis="X")
Set font number used to draw axis labels.
Definition: TStyle.cxx:1403
Int_t fCapLinePS
Determines the appearance of line caps on PostScript, PDF and SVG.
Definition: TStyle.h:136
Width_t fFuncWidth
Function line width.
Definition: TStyle.h:59
Int_t fPadTickY
True to set special pad ticks along Y.
Definition: TStyle.h:101
TAttAxis fYaxis
Y axis attributes.
Definition: TStyle.h:33
Float_t fImageScaling
Image scaling to produce high definition bitmap images.
Definition: TStyle.h:139
Double_t fCandleWhiskerRange
Candle plot, the fraction which is covered by the whiskers (0 < x < 1), default 1.
Definition: TStyle.h:140
Width_t GetFrameBorderSize() const
Definition: TStyle.h:227
Width_t fHistLineWidth
Histogram line width.
Definition: TStyle.h:80
void SetTimeOffset(Double_t toffset)
Change the time offset for time plotting.
Definition: TStyle.cxx:1903
Bool_t fPadGridY
True to get the grid along Y.
Definition: TStyle.h:99
void SetTitlePS(const char *pstitle)
Define a string to be used in the %Title of the Postscript files.
Definition: TStyle.cxx:1373
Style_t fHistFillStyle
Histogram fill style.
Definition: TStyle.h:78
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:1278
Bool_t GetPadGridX() const
Definition: TStyle.h:212
Float_t GetStatH() const
Definition: TStyle.h:264
void SetPadLeftMargin(Float_t margin=0.1)
Definition: TStyle.h:355
Float_t fEndErrorSize
Size of lines at the end of error bars.
Definition: TStyle.h:55
void SetJoinLinePS(Int_t joinline=0)
Set the line join method used for PostScript, PDF and SVG output. See TPostScript::SetLineJoin for de...
Definition: TStyle.h:302
Bool_t fIsReading
! Set to FALSE when userclass::UseCurrentStyle is called by the style manager
Definition: TStyle.h:138
Width_t GetGridWidth() const
Definition: TStyle.h:221
Width_t fFrameBorderSize
Pad frame border size.
Definition: TStyle.h:74
Color_t GetFuncColor() const
Definition: TStyle.h:216
void SetTitleXOffset(Float_t offset=1)
Definition: TStyle.h:404
void SetLegendBorderSize(Width_t size=4)
Definition: TStyle.h:346
TAttText * GetAttDate()
Definition: TStyle.h:166
Color_t fTitleTextColor
Title text color.
Definition: TStyle.h:119
Int_t GetPadTickY() const
Definition: TStyle.h:215
Width_t GetPadBorderSize() const
Definition: TStyle.h:206
void SetStripDecimals(Bool_t strip=kTRUE)
Set option to strip decimals when drawing axis labels.
Definition: TStyle.cxx:1916
Width_t GetTitleBorderSize() const
Definition: TStyle.h:272
void SetHistLineColor(Color_t color=1)
Definition: TStyle.h:375
TString fHeaderPS
User defined additional Postscript header.
Definition: TStyle.h:130
Int_t GetColorPalette(Int_t i) const
Return color number i in current palette.
Definition: TStyle.cxx:1091
virtual void cd()
Change current style.
Definition: TStyle.cxx:542
const char * GetLineStyleString(Int_t i=1) const
Return line style string (used by PostScript).
Definition: TStyle.cxx:1156
void SetLabelOffset(Float_t offset=0.005, Option_t *axis="X")
Set offset between axis and axis labels.
Definition: TStyle.cxx:1419
Color_t fPadColor
Pad color.
Definition: TStyle.h:91
void SetFitFormat(const char *format="5.4g")
Definition: TStyle.h:297
Float_t GetErrorX() const
Definition: TStyle.h:184
Float_t fDateX
X position of the date in the canvas (in NDC)
Definition: TStyle.h:53
Int_t fOptLogz
True if log scale in z.
Definition: TStyle.h:41
void SetTitleSize(Float_t size=0.02, Option_t *axis="X")
Definition: TStyle.cxx:1807
void SetTitleFillColor(Color_t color=1)
Definition: TStyle.h:399
TString fFitFormat
Printing format for fit parameters.
Definition: TStyle.h:132
Int_t fPadBorderMode
Pad border mode.
Definition: TStyle.h:93
Double_t GetLegendTextSize() const
Definition: TStyle.h:203
Int_t fNumberContours
Default number of contours for 2-d plots.
Definition: TStyle.h:51
void SetLineStyleString(Int_t i, const char *text)
Set line style string using the PostScript convention.
Definition: TStyle.cxx:1473
Float_t fPadLeftMargin
Pad left margin.
Definition: TStyle.h:96
Float_t fTitleY
Y position of top left corner of title box.
Definition: TStyle.h:125
Double_t fTimeOffset
Time offset to the beginning of an axis.
Definition: TStyle.h:137
Color_t GetCanvasColor() const
Definition: TStyle.h:186
Color_t fFrameLineColor
Pad frame line color.
Definition: TStyle.h:70
Double_t fLegendTextSize
Legend text size. If 0 the size is computed automatically.
Definition: TStyle.h:66
Int_t fShowEditor
Show pad editor.
Definition: TStyle.h:48
Color_t fLegendFillColor
Legend fill color.
Definition: TStyle.h:64
void SetTitleAlign(Int_t a=13)
Definition: TStyle.h:398
Float_t fLineScalePS
Line scale factor when drawing lines on Postscript.
Definition: TStyle.h:134
void SetPaperSize(EPaperSize size)
Set paper size for PostScript output.
Definition: TStyle.cxx:1694
Float_t GetEndErrorSize() const
Definition: TStyle.h:183
Float_t GetPadBottomMargin() const
Definition: TStyle.h:208
void SetFrameLineWidth(Width_t width=1)
Definition: TStyle.h:371
void SetTickLength(Float_t length=0.03, Option_t *axis="X")
Set the tick marks length for an axis.
Definition: TStyle.cxx:1725
Double_t fHistTopMargin
Margin between histogram's top and pad's top.
Definition: TStyle.h:82
void SetNdivisions(Int_t n=510, Option_t *axis="X")
Set the number of divisions to draw an axis.
Definition: TStyle.cxx:1299
Int_t fOptStat
True if option Stat is selected.
Definition: TStyle.h:43
Double_t fHatchesSpacing
Hatches spacing for hatch styles > 3100.
Definition: TStyle.h:68
Color_t fStatTextColor
Stat text color.
Definition: TStyle.h:106
Width_t GetFuncWidth() const
Definition: TStyle.h:218
TAttText fAttDate
Canvas date attribute.
Definition: TStyle.h:52
Width_t fStatBorderSize
Border size of Stats PaveLabel.
Definition: TStyle.h:107
void Browse(TBrowser *b) override
Browse the style object.
Definition: TStyle.cxx:516
Float_t fTitleW
Width of title box.
Definition: TStyle.h:126
Width_t fPadBorderSize
Pad border size.
Definition: TStyle.h:92
void SetFuncWidth(Width_t width=4)
Definition: TStyle.h:363
Int_t GetDrawBorder() const
Definition: TStyle.h:182
const char * GetTitlePS() const
Definition: TStyle.h:282
Color_t fHistLineColor
Histogram line color.
Definition: TStyle.h:77
Int_t fOptFit
True if option Fit is selected.
Definition: TStyle.h:46
Int_t GetCanvasDefW() const
Definition: TStyle.h:190
Int_t GetCapLinePS() const
Returns the line cap method used for PostScript, PDF and SVG output. See TPostScript::SetLineCap for ...
Definition: TStyle.h:285
Int_t DistancetoPrimitive(Int_t px, Int_t py) override
Function used by the TStyle manager when drawing a canvas showing the current style.
Definition: TStyle.cxx:682
Width_t GetStatBorderSize() const
Definition: TStyle.h:256
void GetPaperSize(Float_t &xsize, Float_t &ysize) const
Set paper size for PostScript output.
Definition: TStyle.cxx:1173
Int_t GetStripDecimals() const
Definition: TStyle.h:265
Float_t fXAxisExpYOffset
X axis exponent label Y offset.
Definition: TStyle.h:145
Color_t fFrameFillColor
Pad frame fill color.
Definition: TStyle.h:69
Style_t GetHistLineStyle() const
Definition: TStyle.h:232
TStyle()
Default constructor.
Definition: TStyle.cxx:145
Float_t fTitleH
Height of title box.
Definition: TStyle.h:127
void SetTitleStyle(Style_t style=1001)
Definition: TStyle.h:401
void SetStatColor(Color_t color=19)
Definition: TStyle.h:385
Style_t fFrameFillStyle
Pad frame fill style.
Definition: TStyle.h:71
void SetPadColor(Color_t color=19)
Definition: TStyle.h:350
virtual void Reset(Option_t *option="")
Reset.
Definition: TStyle.cxx:691
Int_t fShowEventStatus
Show event status panel.
Definition: TStyle.h:47
Color_t GetTitleTextColor() const
Definition: TStyle.h:269
Bool_t fPadGridX
True to get the grid along X.
Definition: TStyle.h:98
void SetStatY(Float_t y=0)
Definition: TStyle.h:393
void SetCandleWhiskerRange(Double_t wRange=1.0)
By setting whisker-range for candle plot, one can force the whiskers to cover the fraction of the dis...
Definition: TStyle.cxx:1929
Style_t fTitleStyle
Fill area style of title PaveLabel.
Definition: TStyle.h:123
Style_t GetLegendFont() const
Definition: TStyle.h:202
Int_t GetOptLogx() const
Definition: TStyle.h:244
void SetLegendTextSize(Double_t size=0.)
Definition: TStyle.h:349
TStyle & operator=(const TStyle &style)
Assignment operator.
Definition: TStyle.cxx:496
void SavePrimitive(std::ostream &out, Option_t *="") override
Save a main frame widget as a C++ statement(s) on output stream out.
Definition: TStyle.cxx:2017
Bool_t fCandleScaled
Candle plot, shall the box-width be scaled to each other by the integral of a box?
Definition: TStyle.h:142
Float_t GetTitleH() const
Definition: TStyle.h:280
Style_t GetStatStyle() const
Definition: TStyle.h:259
Float_t fStatFontSize
Font size in pixels for fonts with precision type 3.
Definition: TStyle.h:109
Bool_t fCanvasPreferGL
If true, rendering in canvas is with GL.
Definition: TStyle.h:83
Float_t fLegoInnerR
Inner radius for cylindrical legos.
Definition: TStyle.h:128
Width_t GetHistLineWidth() const
Definition: TStyle.h:233
EPaperSize
Definition: TStyle.h:151
@ kA4
Definition: TStyle.h:151
@ kUSLetter
Definition: TStyle.h:151
Int_t fOptLogy
True if log scale in y.
Definition: TStyle.h:40
Int_t fAxisMaxDigits
Number of digits above which the 10^N notation is used for axis.
Definition: TStyle.h:148
Style_t GetFrameLineStyle() const
Definition: TStyle.h:225
void SetIsReading(Bool_t reading=kTRUE)
Sets the fIsReading member to reading (default=kTRUE).
Definition: TStyle.cxx:1364
Float_t GetStatW() const
Definition: TStyle.h:263
Style_t fGridStyle
Grid line style.
Definition: TStyle.h:61
Color_t fHistFillColor
Histogram fill color.
Definition: TStyle.h:76
Float_t GetDateY() const
Definition: TStyle.h:196
const char * GetFitFormat() const
Definition: TStyle.h:197
Int_t fCanvasDefH
Default canvas height.
Definition: TStyle.h:87
Int_t GetCanvasBorderMode() const
Definition: TStyle.h:188
Int_t GetPadBorderMode() const
Definition: TStyle.h:207
Float_t fXAxisExpXOffset
X axis exponent label X offset.
Definition: TStyle.h:144
Color_t fFuncColor
Function color.
Definition: TStyle.h:57
const char * GetHeaderPS() const
Definition: TStyle.h:281
void SetTitleYOffset(Float_t offset=1)
Definition: TStyle.h:406
const char * GetStatFormat() const
Definition: TStyle.h:260
Width_t GetCanvasBorderSize() const
Definition: TStyle.h:187
Int_t GetNumberOfColors() const
Return number of colors in the color palette.
Definition: TStyle.cxx:1165
Float_t fStatH
Height of stat box.
Definition: TStyle.h:115
Int_t GetOptFit() const
Definition: TStyle.h:241
Float_t fStatX
X position of top right corner of stat box.
Definition: TStyle.h:112
Int_t fCanvasDefY
Default canvas top Y position.
Definition: TStyle.h:90
Int_t GetNumberContours() const
Definition: TStyle.h:238
void SetHistLineWidth(Width_t width=1)
Definition: TStyle.h:378
Float_t fPadBottomMargin
Pad bottom margin.
Definition: TStyle.h:94
const char * GetPaintTextFormat() const
Definition: TStyle.h:247
Float_t GetLineScalePS() const
Definition: TStyle.h:286
Float_t fErrorX
Per cent of bin width for errors along X.
Definition: TStyle.h:56
void SetLabelColor(Color_t color=1, Option_t *axis="X")
Set axis labels color.
Definition: TStyle.cxx:1383
void SetCandleBoxRange(Double_t bRange=0.5)
By setting box-range for candle plot, one can force the box of the candle-chart to cover that given f...
Definition: TStyle.cxx:1946
Style_t GetStatFont() const
Definition: TStyle.h:257
void SetLabelSize(Float_t size=0.04, Option_t *axis="X")
Set size of axis labels.
Definition: TStyle.cxx:1434
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:1583
Width_t fLegendBorderSize
Legend box border size.
Definition: TStyle.h:63
Float_t fStatW
Width of stat box.
Definition: TStyle.h:114
Float_t fYAxisExpYOffset
Y axis exponent label Y offset.
Definition: TStyle.h:147
Float_t fBarWidth
Width of bar for graphs.
Definition: TStyle.h:35
Width_t fTitleBorderSize
Border size of Title PavelLabel.
Definition: TStyle.h:120
Int_t GetOptLogz() const
Definition: TStyle.h:246
Float_t fPaperSizeY
PostScript paper size along Y.
Definition: TStyle.h:103
static void BuildStyles()
Create some standard styles.
Definition: TStyle.cxx:524
Int_t fTitleAlign
Title box alignment.
Definition: TStyle.h:117
Style_t GetFuncStyle() const
Definition: TStyle.h:217
Color_t GetLegendFillColor() const
Definition: TStyle.h:201
Float_t GetTitleFontSize() const
Definition: TStyle.h:271
Int_t GetHatchesLineWidth() const
Definition: TStyle.h:198
Float_t fDateY
Y position of the date in the canvas (in NDC)
Definition: TStyle.h:54
void GetExponentOffset(Float_t &xoff, Float_t &yoff, Option_t *axis="X") const
Method returns X and Y offset of the axis 10^n notation.
Definition: TStyle.cxx:1845
Int_t GetTitleAlign() const
Definition: TStyle.h:267
Color_t GetAxisColor(Option_t *axis="X") const
Return the axis color number in the axis.
Definition: TStyle.cxx:1079
Int_t GetFrameBorderMode() const
Definition: TStyle.h:228
TString fStatFormat
Printing format for stats.
Definition: TStyle.h:111
Float_t GetPadTopMargin() const
Definition: TStyle.h:209
Int_t fColorModelPS
PostScript color model: 0 = RGB, 1 = CMYK.
Definition: TStyle.h:37
void SetLineScalePS(Float_t scale=3)
Definition: TStyle.h:304
Width_t GetFrameLineWidth() const
Definition: TStyle.h:226
Color_t GetFrameFillColor() const
Definition: TStyle.h:222
Style_t fStatStyle
Fill area style of Stats PaveLabel.
Definition: TStyle.h:110
Float_t GetTitleW() const
Definition: TStyle.h:279
virtual const char * BaseName(const char *pathname)
Base name of a file name. Base name of /user/root is root.
Definition: TSystem.cxx:937
const Int_t n
Definition: legend1.C:16
TLine l
Definition: textangle.C:4
TArc a
Definition: textangle.C:12