Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
TPaveStats.cxx
Go to the documentation of this file.
1// @(#)root/graf:$Id$
2// Author: Rene Brun 15/03/99
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 <cstdlib>
14#include <cstdio>
15#include <iostream>
16
17#include "TROOT.h"
18#include "TBuffer.h"
19#include "TPaveStats.h"
20#include "TPaveLabel.h"
21#include "TVirtualPad.h"
22#include "TStyle.h"
23#include "TLatex.h"
24#include "strlcpy.h"
25
26
27/** \class TPaveStats
28\ingroup BasicGraphics
29
30The histogram statistics painter class.
31
32To draw histogram statistics and fit parameters.
33
34- [Statistics Display](\ref PS01)
35- [Fit Statistics](\ref PS02)
36- [Statistics box editing](\ref PS03)
37
38\anchor PS01
39## Statistics Display
40
41The type of information shown in the histogram statistics box can be selected
42with:
43~~~ {.cpp}
44 gStyle->SetOptStat(mode);
45~~~
46
47The "`mode`" has up to nine digits that can be set to on (1 or 2), off (0).
48~~~ {.cpp}
49 mode = ksiourmen (default = 000001111)
50 k = 1; kurtosis printed
51 k = 2; kurtosis and kurtosis error printed
52 s = 1; skewness printed
53 s = 2; skewness and skewness error printed
54 i = 1; integral of bins printed
55 o = 1; number of overflows printed
56 u = 1; number of underflows printed
57 r = 1; rms printed
58 r = 2; rms and rms error printed
59 m = 1; mean value printed
60 m = 2; mean and mean error values printed
61 e = 1; number of entries printed
62 n = 1; name of histogram is printed
63~~~
64
65For example:
66~~~ {.cpp}
67 gStyle->SetOptStat(11);
68~~~
69displays only the name of histogram and the number of entries, whereas:
70~~~ {.cpp}
71 gStyle->SetOptStat(1101);
72~~~
73displays the name of histogram, mean value and RMS.
74
75<b>WARNING 1:</b> never do:
76~~~ {.cpp}
77 gStyle->SetOptStat(0001111);
78~~~
79but instead do:
80~~~ {.cpp}
81 gStyle->SetOptStat(1111);
82~~~
83because `0001111` will be taken as an octal number!
84
85<b>WARNING 2:</b> for backward compatibility with older versions
86~~~ {.cpp}
87 gStyle->SetOptStat(1);
88~~~
89is taken as:
90~~~ {.cpp}
91 gStyle->SetOptStat(1111)
92~~~
93To print only the name of the histogram do:
94~~~ {.cpp}
95 gStyle->SetOptStat(1000000001);
96~~~
97
98<b>NOTE</b> that in case of 2D histograms, when selecting only underflow
99(10000) or overflow (100000), the statistics box will show all combinations
100of underflow/overflows and not just one single number.
101
102The parameter mode can be any combination of the letters `kKsSiourRmMen`
103~~~ {.cpp}
104 k : kurtosis printed
105 K : kurtosis and kurtosis error printed
106 s : skewness printed
107 S : skewness and skewness error printed
108 i : integral of bins printed
109 o : number of overflows printed
110 u : number of underflows printed
111 r : rms printed
112 R : rms and rms error printed
113 m : mean value printed
114 M : mean value mean error values printed
115 e : number of entries printed
116 n : name of histogram is printed
117~~~
118
119For example, to print only name of histogram and number of entries do:
120~~~ {.cpp}
121 gStyle->SetOptStat("ne");
122~~~
123
124To print only the name of the histogram do:
125~~~ {.cpp}
126 gStyle->SetOptStat("n");
127~~~
128
129The default value is:
130~~~ {.cpp}
131 gStyle->SetOptStat("nemr");
132~~~
133
134When a histogram is painted, a `TPaveStats` object is created and added
135to the list of functions of the histogram. If a `TPaveStats` object
136already exists in the histogram list of functions, the existing object is just
137updated with the current histogram parameters.
138
139Once a histogram is painted, the statistics box can be accessed using
140`h->FindObject("stats")`. In the command line it is enough to do:
141~~~ {.cpp}
142 Root > h->Draw()
143 Root > TPaveStats *st = (TPaveStats*)h->FindObject("stats")
144~~~
145
146because after `h->Draw()` the histogram is automatically painted. But
147in a script file the painting should be forced using `gPad->Update()`
148in order to make sure the statistics box is created:
149~~~ {.cpp}
150 h->Draw();
151 gPad->Update();
152 TPaveStats *st = (TPaveStats*)h->FindObject("stats");
153~~~
154
155Without `gPad->Update()` the line `h->FindObject("stats")`
156returns a null pointer.
157
158When a histogram is drawn with the option "`SAME`", the statistics box
159is not drawn. To force the statistics box drawing with the option
160"`SAME`", the option "`SAMES`" must be used.
161If the new statistics box hides the previous statistics box, one can change
162its position with these lines ("`h`" being the pointer to the histogram):
163~~~ {.cpp}
164 Root > TPaveStats *st = (TPaveStats*)h->FindObject("stats")
165 Root > st->SetX1NDC(newx1); //new x start position
166 Root > st->SetX2NDC(newx2); //new x end position
167~~~
168
169To remove the border or shadow of the TPaveStats, use the function TPave::SetBorderSize
170
171To change the type of information for an histogram with an existing
172`TPaveStats` one should do:
173~~~ {.cpp}
174 st->SetOptStat(mode);
175~~~
176Where "`mode`" has the same meaning than when calling
177`gStyle->SetOptStat(mode)` (see above).
178
179One can delete the statistics box for a histogram `TH1* h` with:
180~~~ {.cpp}
181 h->SetStats(0)
182~~~
183
184and activate it again with:
185~~~ {.cpp}
186 h->SetStats(1).
187~~~
188
189\anchor PS02
190## Fit Statistics
191
192The type of information about fit parameters printed in the histogram statistics
193box can be selected via the parameter mode. The parameter mode can be
194`= pcev` (default `= 0111`)
195~~~ {.cpp}
196 p = 1; print Probability
197 c = 1; print Chisquare/Number of degrees of freedom
198 e = 1; print errors (if e=1, v must be 1)
199 v = 1; print name/values of parameters
200~~~
201Example:
202~~~ {.cpp}
203 gStyle->SetOptFit(1011);
204~~~
205print fit probability, parameter names/values and errors.
206
207 1. When `"v" = 1` is specified, only the non-fixed parameters are
208 shown.
209 2. When `"v" = 2` all parameters are shown.
210
211Note: `gStyle->SetOptFit(1)` means "default value", so it is equivalent
212to `gStyle->SetOptFit(111)`
213
214\anchor PS03
215## Statistics box editing
216
217The following example show how to remove and add a line in a statistics box.
218
219Begin_Macro(source)
220../../../tutorials/hist/hist036_TH2_labels.C
221End_Macro
222*/
223
224const UInt_t kTakeStyle = BIT(17); //see TStyle::SetOptFit/Stat
225
226////////////////////////////////////////////////////////////////////////////////
227/// TPaveStats default constructor.
228
230{
231 fParent = nullptr;
234}
235
236////////////////////////////////////////////////////////////////////////////////
237/// TPaveStats normal constructor.
238
248
249////////////////////////////////////////////////////////////////////////////////
250/// TPaveStats default destructor.
251
256
257////////////////////////////////////////////////////////////////////////////////
258/// Return the fit option.
259
261{
262 if (TestBit(kTakeStyle)) return gStyle->GetOptFit();
263 return fOptFit;
264}
265
266////////////////////////////////////////////////////////////////////////////////
267/// Return the stat option.
268
270{
271 if (TestBit(kTakeStyle)) return gStyle->GetOptStat();
272 return fOptStat;
273}
274
275////////////////////////////////////////////////////////////////////////////////
276/// Save This TPaveStats options in current style.
277
285
286////////////////////////////////////////////////////////////////////////////////
287/// Change (i.e. set) the format for printing fit parameters in statistics box.
288
290{
292}
293
294////////////////////////////////////////////////////////////////////////////////
295/// Set the fit option.
296
298{
299 fOptFit = fit;
301}
302
303////////////////////////////////////////////////////////////////////////////////
304/// Set the stat option.
305
307{
308 fOptStat = stat;
310}
311
312////////////////////////////////////////////////////////////////////////////////
313/// Change (i.e. set) the format for printing statistics.
314
316{
318}
319
320////////////////////////////////////////////////////////////////////////////////
321/// Change drawing option for stats box
322/// While stats should not appear in pad list of primitives,
323/// this is the only way to modify drawing option.
324/// SetDrawOption will not have effect
325/// Redefined here to add **MENU** qualifier to show it in context menu
326
331
332////////////////////////////////////////////////////////////////////////////////
333/// Invalid method to change drawing option for stats box
334/// While stats box should never appear in pad list of primitives, this method cannot work
335/// Please use SetOption() method instead
336/// Redefined here to remove **MENU** qualifier and exclude it from context menu
337
342
343////////////////////////////////////////////////////////////////////////////////
344/// Paint the pave stat.
345
347{
350
351 if (!fLines) return;
353 Double_t y2ref = std::max(fY1,fY2);
354 Double_t x1ref = std::min(fX1,fX2);
355 Double_t x2ref = std::max(fX1,fX2);
356 Double_t dx = std::abs(fX2 - fX1);
357 Double_t dy = std::abs(fY2 - fY1);
360 Int_t nlines = GetSize();
361 if (nlines == 0) nlines = 5;
363
364 // Evaluate text size as a function of the number of lines
365 Double_t y1 = gPad->GetY1();
366 Double_t y2 = gPad->GetY2();
367 Float_t margin = fMargin*dx;
370 TIter next(fLines);
372 Double_t w, wtok[2];
373 char *st, *sl = nullptr;
374 if (textsize == 0) {
375 textsize = 0.92*yspace/(y2 - y1);
377 wtok[0] = wtok[1] = 0;
378 while (auto line = (TObject*) next()) {
379 if (line->IsA() == TLatex::Class()) {
380 TLatex *latex = (TLatex*)line;
381 Int_t nchs = strlen(latex->GetTitle());
382 sl = new char[nchs+1];
383 strlcpy(sl, latex->GetTitle(),nchs+1);
384 if (strpbrk(sl, "=") && print_name == 0) {
385 st = strtok(sl, "=");
386 Int_t itok = 0;
387 while (st && (itok < 2)) {
388 TLatex latex_tok(0., 0., st);
389 Style_t tfont = latex->GetTextFont();
390 if (tfont == 0) tfont = GetTextFont();
391 latex_tok.SetTextFont(tfont);
392 latex_tok.SetTextSize(textsize);
393 w = latex_tok.GetXsize();
394 if (w > wtok[itok]) wtok[itok] = w;
395 st = strtok(nullptr, "=");
396 ++itok;
397 }
398 } else if (strpbrk(sl, "|")) {
399 } else {
400 print_name = 0;
401 Style_t tfont = latex->GetTextFont();
402 if (tfont == 0) latex->SetTextFont(GetTextFont());
403 latex->SetTextSize(titlesize);
404 titlelength = latex->GetXsize()+2.*margin;
405 if (titlelength > 0.98*dx) titlesize *= 0.98*dx/titlelength;
406 latex->SetTextFont(tfont);
407 }
408 delete [] sl; sl = nullptr;
409 }
410 }
411 longest = wtok[0]+wtok[1]+2.*margin;
412 if (longest > 0.98*dx) textsize *= 0.98*dx/longest;
414 } else {
416 }
417 Double_t ytext = y2ref + 0.5*yspace;
418 Double_t xtext = 0;
419 print_name = fOptStat%10;
420
421 // Iterate over all lines
422 // Copy pavetext attributes to line attributes if line attributes not set
423 next.Reset();
424 while (auto line = (TObject*) next()) {
425 if (line->IsA() == TLatex::Class()) {
426 TLatex *latex = (TLatex*)line;
427 ytext -= yspace;
428 Double_t xl = latex->GetX();
429 Double_t yl = latex->GetY();
430 Short_t talign = latex->GetTextAlign();
431 Color_t tcolor = latex->GetTextColor();
432 Style_t tfont = latex->GetTextFont();
433 Size_t tsize = latex->GetTextSize();
434 if (tcolor == 0) latex->SetTextColor(GetTextColor());
435 if (tfont == 0) latex->SetTextFont(GetTextFont());
436 if (tsize == 0) latex->SetTextSize(GetTextSize());
437
438 Int_t nchs = strlen(latex->GetTitle());
439 sl = new char[nchs+1];
440 strlcpy(sl, latex->GetTitle(), nchs+1);
441 // Draw all the histogram stats except the 2D under/overflow
442 if (strpbrk(sl, "=") && print_name == 0) {
443 st = strtok(sl, "=");
444 Int_t halign = 12;
445 while ( st ) {
446 typolabel = st;
447 latex->SetTextAlign(halign);
448 if (halign == 12) xtext = x1ref + margin;
449 if (halign == 32) {
450 xtext = x2ref - margin;
451 typolabel = typolabel.Strip();
452 typolabel.ReplaceAll("-","#minus");
453 }
454 latex->PaintLatex(xtext,ytext,latex->GetTextAngle(),
455 latex->GetTextSize(),
456 typolabel.Data());
457 st = strtok(nullptr, "=");
458 halign = 32;
459 }
460 // Draw the 2D under/overflow
461 } else if (strpbrk(sl, "|")) {
465 Double_t xline2 = 2*dx/3+x1ref;
466 gPad->PaintLine(x1ref,yline1,x2ref,yline1);
467 gPad->PaintLine(xline1,yline1,xline1,yline2);
468 gPad->PaintLine(xline2,yline1,xline2,yline2);
469 st = strtok(sl, "|");
470 Int_t theIndex = 0;
471 while ( st ) {
472 latex->SetTextAlign(22);
473 if (theIndex == 0) xtext = 0.5*(x1ref+xline1);
474 if (theIndex == 1) xtext = 0.5*(x1ref+x2ref);
475 if (theIndex == 2) xtext = 0.5*(xline2+x2ref);
476 typolabel = st;
477 typolabel.ReplaceAll("-", "#minus");
478 latex->PaintLatex(xtext,ytext,latex->GetTextAngle(),
479 latex->GetTextSize(),
480 typolabel.Data());
481 theIndex++;
482 st = strtok(nullptr, "|");
483 }
484 // Draw the histogram identifier
485 } else {
486 print_name = 0;
487 latex->SetTextAlign(22);
488 xtext = 0.5*(x1ref+x2ref);
489 latex->PaintLatex(xtext,ytext,latex->GetTextAngle(),
490 titlesize,
491 sl);
493 gPad->PaintLine(x1ref,y2ref-yspace,x2ref,y2ref-yspace);
494 }
495 delete [] sl;
496
497 latex->SetTextAlign(talign);
498 latex->SetTextColor(tcolor);
499 latex->SetTextFont(tfont);
500 latex->SetTextSize(tsize);
501 latex->SetX(xl); //paintlatex modifies fX and fY
502 latex->SetY(yl);
503 }
504 }
506
507 // if a label create & paint a pavetext title
508 if (fLabel.Length() > 0) {
509 Double_t x1,x2;
510 dy = gPad->GetY2() - gPad->GetY1();
511 x1 = x1ref + 0.25*dx;
512 x2 = x2ref - 0.25*dx;
513 y1 = y2ref - 0.02*dy;
514 y2 = y2ref + 0.02*dy;
516 title.SetFillColor(GetFillColor());
517 title.SetTextColor(GetTextColor());
518 title.SetTextFont(GetTextFont());
519 title.Paint();
520 }
521}
522
523////////////////////////////////////////////////////////////////////////////////
524/// Save primitive as a C++ statement(s) on output stream out.
525
527{
528 SavePrimitiveConstructor(out, Class(), "ptstats", GetSavePaveArgs());
529
530 if (strcmp(GetName(), "TPave"))
531 out << " ptstats->SetName(\"" << GetName() << "\");\n";
532 if (fBorderSize != 4)
533 out << " ptstats->SetBorderSize(" << fBorderSize << ");\n";
534
535 SaveFillAttributes(out, "ptstats", 19, 1001);
536 SaveLineAttributes(out, "ptstats", 1, 1, 1);
537 SaveTextAttributes(out, "ptstats", 22, 0, 1, 62, 0);
538 SaveLines(out, "ptstats", kTRUE);
539 out << " ptstats->SetOptStat(" << GetOptStat() << ");\n";
540 out << " ptstats->SetOptFit(" << GetOptFit() << ");\n";
541
542 SavePrimitiveDraw(out, "ptstats", option);
543}
544
545////////////////////////////////////////////////////////////////////////////////
546/// Stream an object of class TPaveStats.
547
549{
550 if (R__b.IsReading()) {
552 Version_t R__v = R__b.ReadVersion(&R__s, &R__c);
553 if (R__v > 2) {
554 R__b.ReadClassBuffer(TPaveStats::Class(), this, R__v, R__s, R__c);
555 return;
556 }
557 //====process old versions before automatic schema evolution
559 R__b >> fOptFit;
560 R__b >> fOptStat;
561 if (R__v > 1 || R__b.GetVersionOwner() == 22304) {
564 } else {
565 SetFitFormat();
567 }
568 R__b.CheckByteCount(R__s, R__c, TPaveStats::IsA());
569 //====end of old versions
570
571 } else {
572 R__b.WriteClassBuffer(TPaveStats::Class(),this);
573 }
574}
575
576////////////////////////////////////////////////////////////////////////////////
577/// Replace current attributes by current style.
578
short Style_t
Style number (short)
Definition RtypesCore.h:96
short Color_t
Color number (short)
Definition RtypesCore.h:99
float Size_t
Attribute size (float)
Definition RtypesCore.h:103
short Version_t
Class version identifier (short)
Definition RtypesCore.h:79
unsigned int UInt_t
Unsigned integer 4 bytes (unsigned int)
Definition RtypesCore.h:60
float Float_t
Float 4 bytes (float)
Definition RtypesCore.h:71
short Short_t
Signed Short integer 2 bytes (short)
Definition RtypesCore.h:53
double Double_t
Double 8 bytes.
Definition RtypesCore.h:73
constexpr Bool_t kTRUE
Definition RtypesCore.h:107
const char Option_t
Option string (const char)
Definition RtypesCore.h:80
#define BIT(n)
Definition Rtypes.h:91
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
Option_t Option_t option
Option_t Option_t SetFillStyle
Option_t Option_t SetTextSize
Option_t Option_t TPoint TPoint const char x2
Option_t Option_t TPoint TPoint const char x1
Option_t Option_t SetTextFont
Option_t Option_t textsize
Option_t Option_t TPoint TPoint const char y2
Option_t Option_t SetFillColor
Option_t Option_t TPoint TPoint const char y1
const UInt_t kTakeStyle
const UInt_t kTakeStyle
Definition TStyle.cxx:31
R__EXTERN TStyle * gStyle
Definition TStyle.h:442
#define gPad
virtual Color_t GetFillColor() const
Return the fill area color.
Definition TAttFill.h:31
virtual Style_t GetFillStyle() const
Return the fill area style.
Definition TAttFill.h:32
virtual void SetFillColor(Color_t fcolor)
Set the fill area color.
Definition TAttFill.h:38
virtual void SaveFillAttributes(std::ostream &out, const char *name, Int_t coldef=1, Int_t stydef=1001)
Save fill attributes as C++ statement(s) on output stream out.
Definition TAttFill.cxx:238
virtual void Modify()
Change current line attributes if necessary.
Definition TAttLine.cxx:246
virtual void SaveLineAttributes(std::ostream &out, const char *name, Int_t coldef=1, Int_t stydef=1, Int_t widdef=1)
Save line attributes as C++ statement(s) on output stream out.
Definition TAttLine.cxx:274
virtual Float_t GetTextSize() const
Return the text size.
Definition TAttText.h:38
virtual Font_t GetTextFont() const
Return the text font.
Definition TAttText.h:37
virtual Color_t GetTextColor() const
Return the text color.
Definition TAttText.h:36
virtual void SetTextColor(Color_t tcolor=1)
Set the text color.
Definition TAttText.h:46
virtual void SetTextFont(Font_t tfont=62)
Set the text font.
Definition TAttText.h:48
virtual void SaveTextAttributes(std::ostream &out, const char *name, Int_t alidef=12, Float_t angdef=0, Int_t coldef=1, Int_t fondef=61, Float_t sizdef=1)
Save text attributes as C++ statement(s) on output stream out.
Definition TAttText.cxx:372
Double_t fX1
X of 1st point.
Definition TBox.h:28
Double_t fY2
Y of 2nd point.
Definition TBox.h:31
Double_t fX2
X of 2nd point.
Definition TBox.h:30
Double_t fY1
Y of 1st point.
Definition TBox.h:29
Buffer base class used for serializing objects.
Definition TBuffer.h:43
void Reset()
To draw Mathematical Formula.
Definition TLatex.h:18
static TClass * Class()
TClass * IsA() const override
Definition TLine.h:81
Mother of all ROOT objects.
Definition TObject.h:41
R__ALWAYS_INLINE Bool_t TestBit(UInt_t f) const
Definition TObject.h:202
virtual void RecursiveRemove(TObject *obj)
Recursively remove this object from a list.
Definition TObject.cxx:678
virtual Option_t * GetDrawOption() const
Get option used by the graphics system to draw this object.
Definition TObject.cxx:441
virtual void SetDrawOption(Option_t *option="")
Set drawing option for object.
Definition TObject.cxx:848
static void SavePrimitiveDraw(std::ostream &out, const char *variable_name, Option_t *option=nullptr)
Save invocation of primitive Draw() method Skipped if option contains "nodraw" string.
Definition TObject.cxx:822
static void SavePrimitiveConstructor(std::ostream &out, TClass *cl, const char *variable_name, const char *constructor_agrs="", Bool_t empty_line=kTRUE)
Save object constructor in the output stream "out".
Definition TObject.cxx:771
void ResetBit(UInt_t f)
Definition TObject.h:201
@ kInvalidObject
if object ctor succeeded but object should not be used
Definition TObject.h:78
A Pave (see TPave) with a text centered in the Pave.
Definition TPaveLabel.h:20
void Paint(Option_t *option="") override
Paint this pavelabel with its current attributes.
TPaveStats()
TPaveStats default constructor.
Int_t GetOptStat() const
Return the stat option.
void SavePrimitive(std::ostream &out, Option_t *option="") override
Save primitive as a C++ statement(s) on output stream out.
void UseCurrentStyle() override
Replace current attributes by current style.
virtual void SetStatFormat(const char *format="6.4g")
Change (i.e. set) the format for printing statistics.
void SetOptStat(Int_t stat=1)
Set the stat option.
Int_t fOptStat
option Stat
Definition TPaveStats.h:22
Int_t fOptFit
option Fit
Definition TPaveStats.h:21
TString fFitFormat
Printing format for fit parameters.
Definition TPaveStats.h:23
void SetDrawOption(Option_t *option="") override
Invalid method to change drawing option for stats box While stats box should never appear in pad list...
virtual const char * GetFitFormat() const
Definition TPaveStats.h:35
~TPaveStats() override
TPaveStats default destructor.
virtual void SetFitFormat(const char *format="5.4g")
Change (i.e. set) the format for printing fit parameters in statistics box.
TClass * IsA() const override
Definition TPaveStats.h:56
TObject * fParent
owner of this TPaveStats
Definition TPaveStats.h:25
Int_t GetOptFit() const
Return the fit option.
virtual void SaveStyle()
Save This TPaveStats options in current style.
void SetOptFit(Int_t fit=1)
Set the fit option.
virtual const char * GetStatFormat() const
Definition TPaveStats.h:36
void Paint(Option_t *option="") override
Paint the pave stat.
void SetOption(Option_t *option="br") override
Change drawing option for stats box While stats should not appear in pad list of primitives,...
TString fStatFormat
Printing format for stats.
Definition TPaveStats.h:24
static TClass * Class()
void Streamer(TBuffer &) override
Stream an object of class TPaveStats.
A Pave (see TPave) with text, lines or/and boxes inside.
Definition TPaveText.h:21
virtual void SaveLines(std::ostream &out, const char *name, Bool_t)
Save lines of this pavetext as C++ statements on output stream out.
virtual Int_t GetSize() const
return number of text lines (ignoring TLine, etc)
void Streamer(TBuffer &) override
Stream an object of class TPaveText.
TList * fLines
List of labels.
Definition TPaveText.h:27
TString fLabel
Label written at the top of the pavetext.
Definition TPaveText.h:24
Float_t fMargin
Text margin.
Definition TPaveText.h:26
virtual void SetY1NDC(Double_t y1)
Definition TPave.h:86
Double_t GetY2NDC() const
Definition TPave.h:64
Int_t GetBorderSize() const
Definition TPave.h:56
virtual void ConvertNDCtoPad()
Convert pave coordinates from NDC to Pad coordinates.
Definition TPave.cxx:138
const char * GetName() const override
Returns name of object.
Definition TPave.h:58
Double_t GetX2NDC() const
Definition TPave.h:62
TString GetSavePaveArgs(const char *extra_arg=nullptr, Bool_t save_option=kTRUE)
Returns arguments which should be used when saving primitive constructor Check if coordinates are ini...
Definition TPave.cxx:617
Int_t fBorderSize
window box bordersize in pixels
Definition TPave.h:26
virtual void SetOption(Option_t *option="br")
Definition TPave.h:82
Double_t GetY1NDC() const
Definition TPave.h:63
virtual void SetBorderSize(Int_t bordersize=4)
Sets the border size of the TPave box and shadow.
Definition TPave.h:79
virtual void SetY2NDC(Double_t y2)
Definition TPave.h:87
Double_t GetX1NDC() const
Definition TPave.h:61
virtual void PaintPave(Double_t x1, Double_t y1, Double_t x2, Double_t y2, Int_t bordersize=4, Option_t *option="br")
Draw this pave with new coordinates.
Definition TPave.cxx:314
virtual void SetX1NDC(Double_t x1)
Definition TPave.h:84
virtual void SetX2NDC(Double_t x2)
Definition TPave.h:85
Basic string class.
Definition TString.h:138
Ssiz_t Length() const
Definition TString.h:425
const char * Data() const
Definition TString.h:384
virtual void Streamer(TBuffer &)
Stream a string object.
Definition TString.cxx:1418
Int_t GetOptStat() const
Definition TStyle.h:247
Color_t GetStatTextColor() const
Definition TStyle.h:260
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:1641
void SetStatFormat(const char *format="6.4g")
Definition TStyle.h:400
Bool_t IsReading() const
Definition TStyle.h:300
Float_t GetStatFontSize() const
Definition TStyle.h:263
Float_t GetStatX() const
Definition TStyle.h:266
void SetStatStyle(Style_t style=1001)
Definition TStyle.h:396
void SetStatTextColor(Color_t color=1)
Definition TStyle.h:395
void SetStatX(Float_t x=0)
Definition TStyle.h:401
Float_t GetStatY() const
Definition TStyle.h:267
Color_t GetStatColor() const
Definition TStyle.h:259
void SetStatBorderSize(Width_t size=2)
Definition TStyle.h:397
Float_t GetStatH() const
Definition TStyle.h:269
void SetStatH(Float_t h=0.1)
Definition TStyle.h:404
void SetFitFormat(const char *format="5.4g")
Definition TStyle.h:305
Width_t GetStatBorderSize() const
Definition TStyle.h:261
void SetStatFontSize(Float_t size=0)
Definition TStyle.h:399
void SetStatColor(Color_t color=19)
Definition TStyle.h:394
void SetStatW(Float_t w=0.19)
Definition TStyle.h:403
void SetStatY(Float_t y=0)
Definition TStyle.h:402
Style_t GetStatStyle() const
Definition TStyle.h:264
Float_t GetStatW() const
Definition TStyle.h:268
const char * GetFitFormat() const
Definition TStyle.h:201
const char * GetStatFormat() const
Definition TStyle.h:265
Int_t GetOptFit() const
Definition TStyle.h:246
Style_t GetStatFont() const
Definition TStyle.h:262
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:1594
TLine * line