693 if (
gPad->GetLogx()) {
701 if (!opt &&
gPad->GetLogy()) {
783 else distance =
f->DistancetoPrimitive(px,py);
785 gPad->SetSelected(
f);
801 Error(
"DrawPanel",
"need to draw graph first");
806 gROOT->ProcessLine(
TString::Format(
"((TCanvas*)0x%zx)->Selected((TVirtualPad*)0x%zx,(TObject*)0x%zx,1)",
832 static Int_t px1,px2,py1,py2;
835 static std::vector<Int_t>
x,
y;
842 if (!
gPad->IsEditable())
return;
853 px1 =
gPad->XtoAbsPixel(
gPad->GetX1());
854 py1 =
gPad->YtoAbsPixel(
gPad->GetY1());
855 px2 =
gPad->XtoAbsPixel(
gPad->GetX2());
856 py2 =
gPad->YtoAbsPixel(
gPad->GetY2());
860 if (!
x.empty() || !
y.empty())
break;
993 dxr =
dx/(1 -
gPad->GetLeftMargin() -
gPad->GetRightMargin());
994 dyr =
dy/(1 -
gPad->GetBottomMargin() -
gPad->GetTopMargin());
1024 if (
theGraph->InheritsFrom(
"TCutG")) {
1044 if (
gROOT->IsEscaped()) {
1058 dxr =
dx/(1 -
gPad->GetLeftMargin() -
gPad->GetRightMargin());
1059 dyr =
dy/(1 -
gPad->GetBottomMargin() -
gPad->GetTopMargin());
1079 if (
theGraph->InheritsFrom(
"TCutG")) {
1125 if (
theGraph->IsHighlight())
return;
1183 if (
gPad->GetLogx()) {
1187 if (
gPad->GetLogy()) {
1287 if (
theGraph->InheritsFrom(
"TGraphPolar"))
1303 Error(
"PaintGraph",
"illegal number of points (%d)",
npoints);
1374 if (
theGraph->GetMinimum() != -1111)
1376 if (
theGraph->GetMaximum() != -1111)
1422 if (
gPad->GetLogy()) {
1469 for (i=1;i<=
nloop;i++) {
1519 for (i=1;i<=
nloop;i++) {
1544 for (i=1;i<=
nloop;i++) {
1607 if (
gPad->GetFrameFillColor()==1) {
1635 xlow =
x[i-1] -
dbar;
1643 else ylow =
gPad->GetUymin();
1659 ylow =
y[i-1] -
dbar;
1715 const char *
where =
"PaintGrapHist";
1771 nbins = last - first + 1;
1800 if (
gPad->GetGridx()) {
1804 if (
gPad->GetLogx()) {
1831 if (
gPad->GetGridy()) {
1835 if (
gPad->GetLogy()) {
1891 for (
j=first;
j<=last;
j++) {
1900 if (
j != last)
Error(
where,
"X must be in increasing order");
1901 else Error(
where,
"X must have N+1 values with option N");
1934 for (
j=first;
j<=last;
j++) {
1941 if (
j != last)
Error(
where,
"Y must be in increasing order");
1942 else Error(
where,
"Y must have N+1 values with option N");
1977 for (i=first; i<=last;i++) {
1982 xi1 =
x[i]; xi =
x[i-1];
1984 if (i != last)
Error(
where,
"X must be in increasing order");
1985 else Error(
where,
"X must have N+1 values with option N");
2044 for (i=first; i<=last;i++) {
2051 if (i != last)
Error(
where,
"Y must be in increasing order");
2052 else Error(
where,
"Y must have N+1 values with option N");
2083 for (i=first; i<=last;i++) {
2088 xi1 =
x[i]; xi =
x[i-1];
2090 if (i != last)
Error(
where,
"X must be in increasing order");
2091 else Error(
where,
"X must have N+1 values with option N");
2127 for (i=first; i<=last;i++) {
2134 if (i != last)
Error(
where,
"Y must be in increasing order");
2135 else Error(
where,
"Y must have N+1 values with option N");
2177 for (i=first; i<=last;i++) {
2182 xi1 =
x[i]; xi =
x[i-1];
2184 if (i != last)
Error(
where,
"X must be in increasing order");
2185 else Error(
where,
"X must have N+1 values with option N");
2230 for (i=first; i<=last;i++) {
2237 if (i != last)
Error(
where,
"Y must be in increasing order");
2238 else Error(
where,
"Y must have N+1 values with option N");
2277 offset = delta*baroffset;
dbar = delta*barwidth;
2281 dbar = (
x[1]-
x[0])*barwidth;
2284 dbar = (
y[1]-
y[0])*barwidth;
2294 else ylow =
gPad->GetUymin();
2296 for (i=first; i<=last;i++) {
2310 xi1 =
x[i]; xi =
x[i-1];
2312 Error(
where,
"X must be in increasing order");
2316 dbar = (
x[i+1]-
x[i])*barwidth;
2326 else xlow =
gPad->GetUxmin();
2327 for (i=first; i<=last;i++) {
2337 ylow = ylow + delta;
2343 Error(
where,
"Y must be in increasing order");
2347 dbar = (
y[i+1]-
y[i])*barwidth;
2366 for (i=first; i<=last;i++) {
2368 else xm =
x[i-1] + 0.5*(
x[i]-
x[i-1]);
2395 for (i=first; i<=last;i++) {
2397 else ym =
y[i-1] + 0.5*(
y[i]-
y[i-1]);
2447 static Float_t cxx[30] = {1.0,1.0,0.5,0.5,1.0,1.0,0.5,0.6,1.0,0.5,0.5,1.0,0.5,0.6,1.0,1.0,1.0,1.0,1.0,1.0,0.0,0.0,1.0,1.0,1.0,1.0,0.5,0.5,0.5,1.0};
2448 static Float_t cyy[30] = {1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,0.5,0.5,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,0.0,0.0,1.0,1.0,1.0,1.0,0.5,0.5,0.5,1.0};
2497 Error(
"PaintGraphAsymmErrors",
"too many points, out of memory");
2541 Double_t x,
y,
exl,
exh,
eyl,
eyh,
xl1,
xl2,
xr1,
xr2, yup,
yup1,
yup2, ylow,
ylow1,
ylow2;
2553 if (
x >
gPad->GetUxmax())
x =
gPad->GetUxmax();
2555 if (
y >
gPad->GetUymax())
y =
gPad->GetUymax();
2558 if (
x >
gPad->GetUxmax())
continue;
2560 if (
y >
gPad->GetUymax())
continue;
2639 if (
exl != 0. ||
exh != 0.) {
2672 if (
eyl != 0. ||
eyh != 0.) {
2721 gPad->SetLogx(logx);
2722 gPad->SetLogy(logy);
2747 std::vector<TString> options(
NYErrors + 1);
2763 options[filled] =
tsOpt.Copy();
2770 std::vector<Double_t>
xline;
2777 static Float_t cxx[30] = {1.0,1.0,0.5,0.5,1.0,1.0,0.5,0.6,1.0,0.5,0.5,1.0,0.5,0.6,1.0,1.0,1.0,1.0,1.0,1.0,0.0,0.0,1.0,1.0,1.0,1.0,0.5,0.5,0.5,1.0};
2778 static Float_t cyy[30] = {1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,0.5,0.5,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,0.0,0.0,1.0,1.0,1.0,1.0,0.5,0.5,0.5,1.0};
2797 std::vector<Bool_t> DrawErrors(
NYErrors);
2813 std::vector<Double_t> Scale(
NYErrors);
2818 if (options[
j + 1].Contains(
"s=")) {
2824 DrawErrors[
j] = !options[
j + 1].Contains(
"x");
2830 if (options[
j + 1].Contains(
"|>"))
2832 else if (options[
j + 1].Contains(
">"))
2837 Option5[
j] = options[
j + 1].Contains(
"5");
2838 Option4[
j] = options[
j + 1].Contains(
"4");
2842 Option0[
j] = options[
j + 1].Contains(
"0");
2852 options[0].ReplaceAll(
"x0",
"");
2853 options[0].ReplaceAll(
"y0",
"");
2861 if (options[0].Contains(
"|>"))
2863 else if (options[0].Contains(
">"))
2867 if (options[0].Contains(
"s=")) {
2869 options[0].ReplaceAll(options[0](
ScaleRegExp),
"");
2877 Bool_t DrawAxis = options[0].Contains(
"a");
2898 if (
xline.empty()) {
2899 Error(
"PaintGraphMultiErrors",
"too many points, out of memory");
2912 Error(
"PaintGraphMultiErrors",
"too many points, out of memory");
2918 tg->TAttLine::Modify();
2921 arrow.SetLineWidth(
tg->GetLineWidth());
2922 arrow.SetLineColor(
tg->GetLineColor());
2923 arrow.SetFillColor(
tg->GetFillColor());
2927 box.SetLineWidth(
tg->GetLineWidth());
2928 box.SetLineColor(
tg->GetLineColor());
2929 box.SetFillColor(
tg->GetFillColor());
2930 box.SetFillStyle(
tg->GetFillStyle());
2968 x =
gPad->GetUxmin();
2969 if (
x >
gPad->GetUxmax())
2970 x =
gPad->GetUxmax();
2972 y =
gPad->GetUymin();
2973 if (
y >
gPad->GetUymax())
2974 y =
gPad->GetUymax();
2991 box.SetLineWidth(
tg->GetLineWidth(
j));
2992 box.SetLineColor(
tg->GetLineColor(
j));
2993 box.SetFillColor(
tg->GetFillColor(
j));
2994 box.SetFillStyle(
tg->GetFillStyle(
j));
3035 tg->GetAttLine(
j)->Modify();
3037 arrow.SetLineWidth(
tg->GetLineWidth(
j));
3038 arrow.SetLineColor(
tg->GetLineColor(
j));
3039 arrow.SetFillColor(
tg->GetFillColor(
j));
3099 tg->TAttLine::Modify();
3101 arrow.SetLineWidth(
tg->GetLineWidth());
3102 arrow.SetLineColor(
tg->GetLineColor());
3103 arrow.SetFillColor(
tg->GetFillColor());
3182 gPad->SetLogx(logx);
3183 gPad->SetLogy(logy);
3200 static Float_t cxx[30] = {1.0,1.0,0.5,0.5,1.0,1.0,0.5,0.6,1.0,0.5,0.5,1.0,0.5,0.6,1.0,1.0,1.0,1.0,1.0,1.0,0.0,0.0,1.0,1.0,1.0,1.0,0.5,0.5,0.5,1.0};
3201 static Float_t cyy[30] = {1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,0.5,0.5,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,0.0,0.0,1.0,1.0,1.0,1.0,0.5,0.5,0.5,1.0};
3254 Error(
"PaintGraphBentErrors",
"too many points, out of memory");
3298 Double_t x,
y,
exl,
exh,
eyl,
eyh,
xl1,
xl2,
xr1,
xr2, yup,
yup1,
yup2, ylow,
ylow1,
ylow2;
3315 if (
x >
gPad->GetUxmax())
x =
gPad->GetUxmax();
3317 if (
y >
gPad->GetUymax())
y =
gPad->GetUymax();
3320 if (
x >
gPad->GetUxmax())
continue;
3322 if (
y >
gPad->GetUymax())
continue;
3416 if (
exl != 0. ||
exh != 0.) {
3449 if (
eyl != 0. ||
eyh != 0.) {
3499 gPad->SetLogx(logx);
3500 gPad->SetLogy(logy);
3517 static Float_t cxx[30] = {1.0,1.0,0.5,0.5,1.0,1.0,0.5,0.6,1.0,0.5,0.5,1.0,0.5,0.6,1.0,1.0,1.0,1.0,1.0,1.0,0.0,0.0,1.0,1.0,1.0,1.0,0.5,0.5,0.5,1.0};
3518 static Float_t cyy[30] = {1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,0.5,0.5,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,0.0,0.0,1.0,1.0,1.0,1.0,0.5,0.5,0.5,1.0};
3565 Error(
"PaintGraphErrors",
"too many points, out of memory");
3610 Double_t x,
y,
ex,
ey,
xl1,
xl2,
xr1,
xr2, yup,
yup1,
yup2, ylow,
ylow1,
ylow2;
3622 if (
x >
gPad->GetUxmax())
x =
gPad->GetUxmax();
3624 if (
y >
gPad->GetUymax())
y =
gPad->GetUymax();
3627 if (
x >
gPad->GetUxmax())
continue;
3629 if (
y >
gPad->GetUymax())
continue;
3789 gPad->SetLogx(logx);
3790 gPad->SetLogy(logy);
3909 if (!
gPad->GetLogx() && !
gPad->GetLogy()) {
3910 Double_t a,
b,
c = 1,
x1,
x2,
y1,
y2,
discr,
norm1,
norm2,
xts,
yts;
4002 TIter next(
gPad->GetListOfPrimitives());
4003 while (
auto obj = next()) {
4006 if (obj->GetName() && !
strcmp(obj->GetName(),
"title")) {
4012 if (title)
delete title;
4018 if (
ht <= 0)
ht = 0.05;
4057 ptitle->SetName(
"title");
4086 Error(
"TGraphQQ::Paint",
"2nd dataset or theoretical function not specified");
4091 theGraphQQ->GetXaxis()->SetTitle(
"theoretical quantiles");
4092 theGraphQQ->GetYaxis()->SetTitle(
"data quantiles");
4109 line3.SetLineStyle(2);
4155 theHist->GetXaxis()->SetTickLength(0.);
4156 theHist->GetXaxis()->SetLabelOffset(999.);
4157 theHist->GetXaxis()->SetAxisColor(
gPad->GetFrameFillColor());
4160 theHist->GetYaxis()->SetTickLength(0.);
4161 theHist->GetYaxis()->SetLabelOffset(999.);
4162 theHist->GetYaxis()->SetAxisColor(
gPad->GetFrameFillColor());
4235 if (
gPad->GetGridx()) {
4236 if (
gPad->GetLogy()) {
4248 if (
gPad->GetLogx()) {
4280 if (
gPad->GetLogx()) {
4284 for (i=0; i<
N; i++)
rX[i] =
dX-
X[i];
4303 if (
gPad->GetGridy()) {
4304 if (
gPad->GetLogx()) {
4323 if (
gPad->GetLogy()) {
4354 if (
gPad->GetLogy()) {
4358 for (i=0; i<
N; i++)
rY[i] =
dY-Y[i];
4433 if (
theX[0] == 0.) {
4443 if (
theY[0] == 0.) {
4481 if (
h->GetMinimum() <
h->GetMaximum()) {
4483 if (
maxc>
h->GetMaximum())
maxc =
h->GetMaximum();
4485 Error(
"PaintScatter",
"Minimal (%g) and Maximal (%g) values of the internal histogram are not valid",
h->GetMinimum(),
h->GetMaximum());
4517 palette->SetLabelColor(
h->GetZaxis()->GetLabelColor());
4518 palette->SetLabelFont(
h->GetZaxis()->GetLabelFont());
4519 palette->SetLabelOffset(
h->GetZaxis()->GetLabelOffset());
4520 palette->SetLabelSize(
h->GetZaxis()->GetLabelSize());
4521 palette->SetTitleOffset(
h->GetZaxis()->GetTitleOffset());
4522 palette->SetTitleSize(
h->GetZaxis()->GetTitleSize());
4523 palette->SetNdivisions(
h->GetZaxis()->GetNdivisions());
4524 palette->SetTitle(
h->GetZaxis()->GetTitle());
4525 palette->SetTitleColor(
h->GetZaxis()->GetTitleColor());
4526 palette->SetTitleFont(
h->GetZaxis()->GetTitleFont());
4534 TIter next(
gPad->GetListOfPrimitives());
4557 int logx =
gPad->GetLogx();
4558 int logy =
gPad->GetLogy();
4559 int logz =
gPad->GetLogz();
4568 for (
int i=0; i<
n; i++) {
4605 gPad->PaintPolyMarker(1,&
x,&
y);
4742 auto pos =
scTitle.Last(
';') + 1;
4750 TIter next(
gPad->GetListOfPrimitives());
4778 int logx =
gPad->GetLogx();
4779 int logy =
gPad->GetLogy();
4780 int logz =
gPad->GetLogz();
4793 double x,
y,z,
c,s,ms;
4795 for (
Int_t i = 0; i <
n; i++) {
4845 gPad->PaintMarker3D(
x,
y, z);
4870 auto obj =
lnk->GetObject();
4875 obj->Paint(
lnk->GetOption());
4895 std::vector<Double_t>
xf(2*
n);
4896 std::vector<Double_t>
yf(2*
n);
4897 std::vector<Double_t>
xt(
n);
4898 std::vector<Double_t>
yt(
n);
4899 Double_t x1,
x2,
y1,
y2,
x3,
y3,
xm,
ym,
a,
a1,
a2,
a3;
4931 for (i=1; i<
n; i++) {
4932 if (
x[i]==
x[i-1] &&
y[i]==
y[i-1])
continue;
4935 if (
xf[i]==
xf[i-1])
xf[i] += 0.000001;
4969 for (i=1; i<
nf; i++) {
5040 for (i=
nf2; i>0; i--) {
5041 for (
j=i-1;
j>0;
j--) {
5076 for (i=0; i<
nf+1; i++) {
5082 gPad->PaintFillArea(
nf+1,
xf.data(),
yf.data());
5097 while (
auto obj = next()) {
5107 if (!
dofit) fit =
nullptr;
5240 if (
qlx.empty() ||
qly.empty()) {
5241 Error(
"Smooth",
"not enough space in memory");
5281 if ((
x[i]-
x[i-1])*(
x[i-1]-
x[i-2]) < 0)
six++;
5282 if ((
y[i]-
y[i-1])*(
y[i-1]-
y[i-2]) < 0)
siy++;
5328 if (
x[0] ==
x[1] &&
y[0] ==
y[1])
goto L40;
5355 if (
x[k-1] ==
x[k-2] &&
y[k-1] ==
y[k-2])
goto L50;
5377 if (
x[k-1] ==
x[k] &&
y[k-1] ==
y[k])
goto L80;
5400 dx1 =
x[k-1] -
x[km-1];
5401 dy1 =
y[k-1] -
y[km-1];
5447 if (k <= 1)
goto L120;
5542 z = z*z/((
a*
a+
b*
b)*(delta*delta));
5543 z = (z+2.642937)*z/((.3715652*z+3.063444)*z+.2441889)-
cc;
5553 if (
iw+2 == 0)
goto L190;
5575 Error(
"Smooth",
"Attempt to plot outside plot limits");
5655 if (s > 0)
goto L180;
const Int_t kMaxPixel
Max value for an int.
int Int_t
Signed integer 4 bytes (int)
char Char_t
Character 1 byte (char)
float Float_t
Float 4 bytes (float)
double Double_t
Double 8 bytes.
constexpr Ssiz_t kNPOS
The equivalent of std::string::npos for the ROOT class TString.
const char Option_t
Option string (const char)
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
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 wmin
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 r
Option_t Option_t TPoint TPoint const char x2
Option_t Option_t TPoint TPoint const char x1
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void xpos
Option_t Option_t TPoint TPoint const char y2
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void ypos
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t wmax
Option_t Option_t TPoint TPoint const char y1
static Int_t gHighlightPoint
static TGraph * gHighlightGraph
static std::unique_ptr< TMarker > gHighlightMarker
R__EXTERN TStyle * gStyle
Draw all kinds of Arrows.
virtual void SetFillColor(Color_t fcolor)
Set the fill area color.
virtual void SetFillStyle(Style_t fstyle)
Set the fill area style.
virtual void SetLineStyle(Style_t lstyle)
Set the line style.
virtual Width_t GetLineWidth() const
Return the line width.
virtual void SetLineColor(Color_t lcolor)
Set the line color.
Int_t DistancetoLine(Int_t px, Int_t py, Double_t xp1, Double_t yp1, Double_t xp2, Double_t yp2)
Compute distance from point px,py to a line.
static Style_t GetMarkerStyleBase(Style_t style)
Internal helper function that returns the corresponding marker style with line width 1 for the given ...
virtual void SetTextAlign(Short_t align=11)
Set the text alignment.
virtual void SetTextColor(Color_t tcolor=1)
Set the text color.
virtual void SetTextFont(Font_t tfont=62)
Set the text font.
virtual void SetTextSize(Float_t tsize=1)
Set the text size.
virtual Int_t GetNDF() const
Return the number of degrees of freedom in the fit the fNDF parameter has been previously computed du...
virtual void GetParLimits(Int_t ipar, Double_t &parmin, Double_t &parmax) const
Return limits for parameter ipar.
virtual Double_t GetParError(Int_t ipar) const
Return value of parameter number ipar.
Double_t GetChisquare() const
Return the Chisquare after fitting. See ROOT::Fit::FitResult::Chi2()
virtual Int_t GetNpar() const
virtual Int_t GetNumberFreeParameters() const
Return the number of free parameters.
virtual const char * GetParName(Int_t ipar) const
virtual Double_t GetParameter(Int_t ipar) const
virtual void PaintAxis(Double_t xmin, Double_t ymin, Double_t xmax, Double_t ymax, Double_t &wmin, Double_t &wmax, Int_t &ndiv, Option_t *chopt="", Double_t gridlength=0, Bool_t drawGridOnly=kFALSE)
Control function to draw an axis.
void SetLabelOffset(Float_t labeloffset)
void SetTickSize(Float_t ticksize)
void SetLabelSize(Float_t labelsize)
Graphics object made of three arrays X, Y and Z with the same number of points each.
TGraph with asymmetric error bars and multiple y error dimensions.
void PaintGraphPolar(TGraph *theGraph, Option_t *option)
Paint this TGraphPolar with its current attributes.
void PaintGraph(TGraph *theGraph, Int_t npoints, const Double_t *x, const Double_t *y, Option_t *chopt) override
Control function to draw a graph.
void PaintGraphErrors(TGraph *theGraph, Option_t *option)
Paint this TGraphErrors with its current attributes.
void PaintGraphAsymmErrors(TGraph *theGraph, Option_t *option)
Paint this TGraphAsymmErrors with its current attributes.
void PaintGraphMultiErrors(TGraph *theGraph, Option_t *option)
Paint this TGraphMultiErrors with its current attributes.
virtual void PaintHighlightPoint(TGraph *theGraph, Option_t *option)
Paint highlight point as TMarker object (open circle)
void PaintGraphReverse(TGraph *theGraph, Option_t *option)
Paint theGraph reverting values along X and/or Y axis. a new graph is created.
void PaintGrapHist(TGraph *theGraph, Int_t npoints, const Double_t *x, const Double_t *y, Option_t *chopt) override
This is a service method used by THistPainter to paint 1D histograms.
void PaintScatter2D(TScatter2D *theScatter, Option_t *option) override
Paint a scatter plot.
static Int_t fgMaxPointsPerLine
Number of points per chunks' line when drawing a graph.
void PaintStats(TGraph *theGraph, TF1 *fit) override
Paint the statistics box with the fit info.
void PaintPolyLineHatches(TGraph *theGraph, Int_t n, const Double_t *x, const Double_t *y)
Paint a polyline with hatches on one side showing an exclusion zone.
void DrawPanelHelper(TGraph *theGraph) override
Display a panel with all histogram drawing options.
char * GetObjectInfoHelper(TGraph *theGraph, Int_t px, Int_t py) const override
void ExecuteEventHelper(TGraph *theGraph, Int_t event, Int_t px, Int_t py) override
Execute action corresponding to one event.
virtual void HighlightPoint(TGraph *theGraph, Int_t hpoint, Int_t distance)
Check on highlight point.
void ComputeLogs(Int_t npoints, Int_t opt)
Compute the logarithm of variables gxwork and gywork according to the value of Options and put the re...
std::vector< Double_t > gxworkl
Int_t DistancetoPrimitiveHelper(TGraph *theGraph, Int_t px, Int_t py) override
Compute distance from point px,py to a graph.
std::vector< Double_t > gxwork
std::vector< Double_t > gywork
void PaintScatter(TScatter *theScatter, Option_t *option) override
Paint a scatter plot.
void Smooth(TGraph *theGraph, Int_t npoints, Double_t *x, Double_t *y, Int_t drawtype)
Smooth a curve given by N points.
std::vector< Double_t > gyworkl
Internal buffers for coordinates. Used for graphs painting.
void SetHighlight(TGraph *theGraph) override
Set highlight (enable/disable) mode for theGraph.
virtual Int_t GetHighlightPoint(TGraph *theGraph) const
Return the highlighted point for theGraph.
void PaintGraphSimple(TGraph *theGraph, Option_t *option)
Paint a simple graph, without errors bars.
void PaintGraphQQ(TGraph *theGraph, Option_t *option)
Paint this graphQQ. No options for the time being.
~TGraphPainter() override
Destructor.
static void SetMaxPointsPerLine(Int_t maxp=50)
Static function to set fgMaxPointsPerLine for graph painting.
void PaintGraphBentErrors(TGraph *theGraph, Option_t *option)
Paint this TGraphBentErrors with its current attributes.
TGraphPainter()
Default constructor.
void PaintHelper(TGraph *theGraph, Option_t *option) override
Paint a any kind of TGraph.
This class allows to draw quantile-quantile plots.
A TGraph is an object made of two arrays X and Y with npoints each.
@ kClipFrame
Clip to the frame boundary.
@ kNoStats
Don't draw stats box.
1-D histogram with a float per channel (see TH1 documentation)
@ kNoTitle
Don't draw the histogram title.
@ kNoStats
Don't draw stats box.
2-D histogram with a float per channel (see TH1 documentation)
To draw Mathematical Formula.
Use the TLine constructor to create a simple line.
virtual void PaintLine(Double_t x1, Double_t y1, Double_t x2, Double_t y2)
Draw this line with new coordinates.
Mother of all ROOT objects.
virtual const char * GetName() const
Returns name of object.
R__ALWAYS_INLINE Bool_t TestBit(UInt_t f) const
void SetBit(UInt_t f, Bool_t set)
Set or unset the user status bits as specified in f.
virtual Bool_t InheritsFrom(const char *classname) const
Returns kTRUE if object inherits from class "classname".
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
virtual const char * GetTitle() const
Returns title of object.
@ kCannotPick
if object in a pad cannot be picked
@ kCanDelete
if object in a list can be deleted
@ kMustCleanup
if object destructor must call RecursiveRemove()
The palette painting class.
The histogram statistics painter class.
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.
virtual const char * GetFitFormat() const
virtual void SetFitFormat(const char *format="5.4g")
Change (i.e. set) the format for printing fit parameters in statistics box.
Int_t GetOptFit() const
Return the fit option.
void SetParent(TObject *obj) override
void SetOptFit(Int_t fit=1)
Set the fit option.
void Paint(Option_t *option="") override
Paint the pave stat.
A Pave (see TPave) with text, lines or/and boxes inside.
virtual TText * AddText(Double_t x1, Double_t y1, const char *label)
Add a new Text line to this pavetext at given coordinates.
void Clear(Option_t *option="") override
Clear all lines in this pavetext.
virtual TText * GetLine(Int_t number) const
Get Pointer to line number in this pavetext.
virtual void SetName(const char *name="")
virtual void SetBorderSize(Int_t bordersize=4)
Sets the border size of the TPave box and shadow.
Option_t * GetOption() const override
Double_t GetX1NDC() const
virtual void SetX2NDC(Double_t x2)
Regular expression class.
A TScatter2D is able to draw five variables scatter plot on a single plot.
A TScatter is able to draw four variables scatter plot on a single plot.
Double_t * GetSize() const
Get the array of marker sizes.
Double_t * GetColor() const
Get the array of colors.
void ToLower()
Change string to lower-case.
const char * Data() const
TString & ReplaceAll(const TString &s1, const TString &s2)
void ToUpper()
Change string to upper case.
TString & Append(const char *cs)
static TString Format(const char *fmt,...)
Static method which formats a string using a printf style format descriptor and return a TString.
Bool_t Contains(const char *pat, ECaseCompare cmp=kExact) const
Color_t GetLabelColor(Option_t *axis="X") const
Return the label color number in the axis.
Color_t GetStatTextColor() const
Float_t GetTitleX() const
Int_t GetOptTitle() const
Int_t GetNdivisions(Option_t *axis="X") const
Return number of divisions.
Float_t GetStatFontSize() const
Float_t GetBarOffset() const
Float_t GetLabelSize(Option_t *axis="X") const
Return label size.
Float_t GetTickLength(Option_t *axis="X") const
Return tick length.
Style_t GetLabelFont(Option_t *axis="X") const
Return label font.
Float_t GetTitleY() const
Style_t GetTitleFont(Option_t *axis="X") const
Return title font.
Color_t GetTitleFillColor() const
Style_t GetTitleStyle() const
Float_t GetLabelOffset(Option_t *axis="X") const
Return label offset.
Color_t GetStatColor() const
Float_t GetBarWidth() const
void SetDrawBorder(Int_t drawborder=1)
Width_t GetTitleBorderSize() const
Int_t GetColorPalette(Int_t i) const
Return color number i in current palette.
Float_t GetEndErrorSize() const
Int_t GetDrawBorder() const
Width_t GetStatBorderSize() const
Color_t GetTitleTextColor() const
Float_t GetTitleH() const
Style_t GetStatStyle() const
const char * GetFitFormat() const
const char * GetStatFormat() const
Int_t GetNumberOfColors() const
Return number of colors in the color palette.
Style_t GetStatFont() const
Float_t GetTitleFontSize() const
Int_t GetTitleAlign() const
Color_t GetAxisColor(Option_t *axis="X") const
Return the axis color number in the axis.
Float_t GetTitleW() const
Base class for several text objects.
Abstract base class used by ROOT graphics editor.
static TVirtualPadEditor * GetPadEditor(Bool_t load=kTRUE)
Returns the pad editor dialog. Static method.
small helper class to store/restore gPad context in TPad methods
void box(Int_t pat, Double_t x1, Double_t y1, Double_t x2, Double_t y2)
Int_t Nint(T x)
Round to nearest integer. Rounds half integers to the nearest even integer.
Short_t Max(Short_t a, Short_t b)
Returns the largest of a and b.
Double_t Prob(Double_t chi2, Int_t ndf)
Computation of the probability for a certain Chi-squared (chi2) and number of degrees of freedom (ndf...
Bool_t IsInside(T xp, T yp, Int_t np, T *x, T *y)
Function which returns kTRUE if point xp,yp lies inside the polygon defined by the np points in array...
Double_t ATan(Double_t)
Returns the principal value of the arc tangent of x, expressed in radians.
constexpr Double_t PiOver2()
T MinElement(Long64_t n, const T *a)
Returns minimum of array a of length n.
Double_t Sqrt(Double_t x)
Returns the square root of x.
LongDouble_t Power(LongDouble_t x, LongDouble_t y)
Returns x raised to the power y.
Short_t Min(Short_t a, Short_t b)
Returns the smallest of a and b.
Double_t Cos(Double_t)
Returns the cosine of an angle of x radians.
Double_t Sin(Double_t)
Returns the sine of an angle of x radians.
T MaxElement(Long64_t n, const T *a)
Returns maximum of array a of length n.
Double_t Log10(Double_t x)
Returns the common (base-10) logarithm of x.
Short_t Abs(Short_t d)
Returns the absolute value of parameter Short_t d.