690 if (
gPad->GetLogx()) {
698 if (!opt &&
gPad->GetLogy()) {
780 else distance =
f->DistancetoPrimitive(px,py);
782 gPad->SetSelected(
f);
798 Error(
"DrawPanel",
"need to draw graph first");
803 gROOT->ProcessLine(
TString::Format(
"((TCanvas*)0x%zx)->Selected((TVirtualPad*)0x%zx,(TObject*)0x%zx,1)",
829 static Int_t px1,px2,py1,py2;
832 static std::vector<Int_t>
x,
y;
839 if (!
gPad->IsEditable())
return;
850 px1 =
gPad->XtoAbsPixel(
gPad->GetX1());
851 py1 =
gPad->YtoAbsPixel(
gPad->GetY1());
852 px2 =
gPad->XtoAbsPixel(
gPad->GetX2());
853 py2 =
gPad->YtoAbsPixel(
gPad->GetY2());
857 if (!
x.empty() || !
y.empty())
break;
990 dxr =
dx/(1 -
gPad->GetLeftMargin() -
gPad->GetRightMargin());
991 dyr =
dy/(1 -
gPad->GetBottomMargin() -
gPad->GetTopMargin());
1021 if (
theGraph->InheritsFrom(
"TCutG")) {
1041 if (
gROOT->IsEscaped()) {
1055 dxr =
dx/(1 -
gPad->GetLeftMargin() -
gPad->GetRightMargin());
1056 dyr =
dy/(1 -
gPad->GetBottomMargin() -
gPad->GetTopMargin());
1076 if (
theGraph->InheritsFrom(
"TCutG")) {
1122 if (
theGraph->IsHighlight())
return;
1180 if (
gPad->GetLogx()) {
1184 if (
gPad->GetLogy()) {
1284 if (
theGraph->InheritsFrom(
"TGraphPolar"))
1300 Error(
"PaintGraph",
"illegal number of points (%d)",
npoints);
1403 if (!
theGraph->GetHistogram())
return;
1408 theGraph->GetHistogram()->SetDirectory(
nullptr);
1412 if (
gPad->GetLogy()) {
1458 for (i=1;i<=
nloop;i++) {
1508 for (i=1;i<=
nloop;i++) {
1533 for (i=1;i<=
nloop;i++) {
1596 if (
gPad->GetFrameFillColor()==1) {
1624 xlow =
x[i-1] -
dbar;
1632 else ylow =
gPad->GetUymin();
1648 ylow =
y[i-1] -
dbar;
1704 const char *
where =
"PaintGrapHist";
1718 Int_t first, last, nbins;
1760 nbins = last - first + 1;
1789 if (
gPad->GetGridx()) {
1793 if (
gPad->GetLogx()) {
1820 if (
gPad->GetGridy()) {
1824 if (
gPad->GetLogy()) {
1880 for (
j=first;
j<=last;
j++) {
1889 if (
j != last)
Error(
where,
"X must be in increasing order");
1890 else Error(
where,
"X must have N+1 values with option N");
1923 for (
j=first;
j<=last;
j++) {
1930 if (
j != last)
Error(
where,
"Y must be in increasing order");
1931 else Error(
where,
"Y must have N+1 values with option N");
1966 for (i=first; i<=last;i++) {
1971 xi1 =
x[i]; xi =
x[i-1];
1973 if (i != last)
Error(
where,
"X must be in increasing order");
1974 else Error(
where,
"X must have N+1 values with option N");
2033 for (i=first; i<=last;i++) {
2040 if (i != last)
Error(
where,
"Y must be in increasing order");
2041 else Error(
where,
"Y must have N+1 values with option N");
2072 for (i=first; i<=last;i++) {
2077 xi1 =
x[i]; xi =
x[i-1];
2079 if (i != last)
Error(
where,
"X must be in increasing order");
2080 else Error(
where,
"X must have N+1 values with option N");
2116 for (i=first; i<=last;i++) {
2123 if (i != last)
Error(
where,
"Y must be in increasing order");
2124 else Error(
where,
"Y must have N+1 values with option N");
2166 for (i=first; i<=last;i++) {
2171 xi1 =
x[i]; xi =
x[i-1];
2173 if (i != last)
Error(
where,
"X must be in increasing order");
2174 else Error(
where,
"X must have N+1 values with option N");
2219 for (i=first; i<=last;i++) {
2226 if (i != last)
Error(
where,
"Y must be in increasing order");
2227 else Error(
where,
"Y must have N+1 values with option N");
2266 offset = delta*baroffset;
dbar = delta*barwidth;
2270 dbar = (
x[1]-
x[0])*barwidth;
2273 dbar = (
y[1]-
y[0])*barwidth;
2283 else ylow =
gPad->GetUymin();
2285 for (i=first; i<=last;i++) {
2299 xi1 =
x[i]; xi =
x[i-1];
2301 Error(
where,
"X must be in increasing order");
2305 dbar = (
x[i+1]-
x[i])*barwidth;
2315 else xlow =
gPad->GetUxmin();
2316 for (i=first; i<=last;i++) {
2326 ylow = ylow + delta;
2332 Error(
where,
"Y must be in increasing order");
2336 dbar = (
y[i+1]-
y[i])*barwidth;
2355 for (i=first; i<=last;i++) {
2357 else xm =
x[i-1] + 0.5*(
x[i]-
x[i-1]);
2384 for (i=first; i<=last;i++) {
2386 else ym =
y[i-1] + 0.5*(
y[i]-
y[i-1]);
2436 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};
2437 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};
2486 Error(
"PaintGraphAsymmErrors",
"too many points, out of memory");
2512 if (mark >= 20 && mark <= 49) {
2530 Double_t x,
y,
exl,
exh,
eyl,
eyh,
xl1,
xl2,
xr1,
xr2, yup,
yup1,
yup2, ylow,
ylow1,
ylow2;
2542 if (
x >
gPad->GetUxmax())
x =
gPad->GetUxmax();
2544 if (
y >
gPad->GetUymax())
y =
gPad->GetUymax();
2547 if (
x >
gPad->GetUxmax())
continue;
2549 if (
y >
gPad->GetUymax())
continue;
2628 if (
exl != 0. ||
exh != 0.) {
2661 if (
eyl != 0. ||
eyh != 0.) {
2710 gPad->SetLogx(logx);
2711 gPad->SetLogy(logy);
2736 std::vector<TString> options(
NYErrors + 1);
2752 options[filled] =
tsOpt.Copy();
2759 std::vector<Double_t>
xline;
2766 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};
2767 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};
2786 std::vector<Bool_t> DrawErrors(
NYErrors);
2802 std::vector<Double_t> Scale(
NYErrors);
2807 if (options[
j + 1].Contains(
"s=")) {
2813 DrawErrors[
j] = !options[
j + 1].Contains(
"x");
2819 if (options[
j + 1].Contains(
"|>"))
2821 else if (options[
j + 1].Contains(
">"))
2826 Option5[
j] = options[
j + 1].Contains(
"5");
2827 Option4[
j] = options[
j + 1].Contains(
"4");
2831 Option0[
j] = options[
j + 1].Contains(
"0");
2841 options[0].ReplaceAll(
"x0",
"");
2842 options[0].ReplaceAll(
"y0",
"");
2850 if (options[0].Contains(
"|>"))
2852 else if (options[0].Contains(
">"))
2856 if (options[0].Contains(
"s=")) {
2858 options[0].ReplaceAll(options[0](
ScaleRegExp),
"");
2866 Bool_t DrawAxis = options[0].Contains(
"a");
2887 if (
xline.empty()) {
2888 Error(
"PaintGraphMultiErrors",
"too many points, out of memory");
2901 Error(
"PaintGraphMultiErrors",
"too many points, out of memory");
2907 tg->TAttLine::Modify();
2910 arrow.SetLineWidth(
tg->GetLineWidth());
2911 arrow.SetLineColor(
tg->GetLineColor());
2912 arrow.SetFillColor(
tg->GetFillColor());
2916 box.SetLineWidth(
tg->GetLineWidth());
2917 box.SetLineColor(
tg->GetLineColor());
2918 box.SetFillColor(
tg->GetFillColor());
2919 box.SetFillStyle(
tg->GetFillStyle());
2927 if (mark >= 20 && mark <= 49) {
2928 cx = cxx[mark - 20];
2929 cy =
cyy[mark - 20];
2957 x =
gPad->GetUxmin();
2958 if (
x >
gPad->GetUxmax())
2959 x =
gPad->GetUxmax();
2961 y =
gPad->GetUymin();
2962 if (
y >
gPad->GetUymax())
2963 y =
gPad->GetUymax();
2980 box.SetLineWidth(
tg->GetLineWidth(
j));
2981 box.SetLineColor(
tg->GetLineColor(
j));
2982 box.SetFillColor(
tg->GetFillColor(
j));
2983 box.SetFillStyle(
tg->GetFillStyle(
j));
3024 tg->GetAttLine(
j)->Modify();
3026 arrow.SetLineWidth(
tg->GetLineWidth(
j));
3027 arrow.SetLineColor(
tg->GetLineColor(
j));
3028 arrow.SetFillColor(
tg->GetFillColor(
j));
3088 tg->TAttLine::Modify();
3090 arrow.SetLineWidth(
tg->GetLineWidth());
3091 arrow.SetLineColor(
tg->GetLineColor());
3092 arrow.SetFillColor(
tg->GetFillColor());
3171 gPad->SetLogx(logx);
3172 gPad->SetLogy(logy);
3189 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};
3190 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};
3243 Error(
"PaintGraphBentErrors",
"too many points, out of memory");
3269 if (mark >= 20 && mark <= 49) {
3287 Double_t x,
y,
exl,
exh,
eyl,
eyh,
xl1,
xl2,
xr1,
xr2, yup,
yup1,
yup2, ylow,
ylow1,
ylow2;
3304 if (
x >
gPad->GetUxmax())
x =
gPad->GetUxmax();
3306 if (
y >
gPad->GetUymax())
y =
gPad->GetUymax();
3309 if (
x >
gPad->GetUxmax())
continue;
3311 if (
y >
gPad->GetUymax())
continue;
3405 if (
exl != 0. ||
exh != 0.) {
3438 if (
eyl != 0. ||
eyh != 0.) {
3488 gPad->SetLogx(logx);
3489 gPad->SetLogy(logy);
3506 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};
3507 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};
3554 Error(
"PaintGraphErrors",
"too many points, out of memory");
3581 if (mark >= 20 && mark <= 49) {
3599 Double_t x,
y,
ex,
ey,
xl1,
xl2,
xr1,
xr2, yup,
yup1,
yup2, ylow,
ylow1,
ylow2;
3611 if (
x >
gPad->GetUxmax())
x =
gPad->GetUxmax();
3613 if (
y >
gPad->GetUymax())
y =
gPad->GetUymax();
3616 if (
x >
gPad->GetUxmax())
continue;
3618 if (
y >
gPad->GetUymax())
continue;
3778 gPad->SetLogx(logx);
3779 gPad->SetLogy(logy);
3898 if (!
gPad->GetLogx() && !
gPad->GetLogy()) {
3899 Double_t a,
b,
c = 1,
x1,
x2,
y1,
y2,
discr,
norm1,
norm2,
xts,
yts;
3991 TIter next(
gPad->GetListOfPrimitives());
3992 while (
auto obj = next()) {
3995 if (obj->GetName() && !
strcmp(obj->GetName(),
"title")) {
4001 if (title)
delete title;
4007 if (
ht <= 0)
ht = 0.05;
4046 ptitle->SetName(
"title");
4075 Error(
"TGraphQQ::Paint",
"2nd dataset or theoretical function not specified");
4080 theGraphQQ->GetXaxis()->SetTitle(
"theoretical quantiles");
4081 theGraphQQ->GetYaxis()->SetTitle(
"data quantiles");
4098 line3.SetLineStyle(2);
4144 theHist->GetXaxis()->SetTickLength(0.);
4145 theHist->GetXaxis()->SetLabelOffset(999.);
4146 theHist->GetXaxis()->SetAxisColor(
gPad->GetFrameFillColor());
4149 theHist->GetYaxis()->SetTickLength(0.);
4150 theHist->GetYaxis()->SetLabelOffset(999.);
4151 theHist->GetYaxis()->SetAxisColor(
gPad->GetFrameFillColor());
4216 theHist->GetXaxis()->SetTickLength(0.);
4217 theHist->GetXaxis()->SetLabelOffset(999.);
4220 if (
gPad->GetGridx()) {
4221 if (
gPad->GetLogy()) {
4233 if (
gPad->GetLogx()) {
4264 if (
gPad->GetLogx()) {
4268 for (i=0; i<
N; i++)
rX[i] =
dX-
X[i];
4288 if (
gPad->GetGridy()) {
4289 if (
gPad->GetLogx()) {
4301 if (
gPad->GetLogy()) {
4331 if (
gPad->GetLogy()) {
4335 for (i=0; i<
N; i++)
rY[i] =
dY-Y[i];
4397 for (
int i=0; i<
n; i++) {
4415 if (
theX[0] == 0.) {
4425 if (
theY[0] == 0.) {
4461 if (
h->GetMinimum() <
h->GetMaximum()) {
4463 if (
maxc>
h->GetMaximum())
maxc =
h->GetMaximum();
4465 Error(
"PaintScatter",
"Mininal (%g) and Maximal (%g) values of the internal histogram are not valid",
h->GetMinimum(),
h->GetMaximum());
4497 palette->SetLabelColor(
h->GetZaxis()->GetLabelColor());
4498 palette->SetLabelFont(
h->GetZaxis()->GetLabelFont());
4499 palette->SetLabelOffset(
h->GetZaxis()->GetLabelOffset());
4500 palette->SetLabelSize(
h->GetZaxis()->GetLabelSize());
4501 palette->SetTitleOffset(
h->GetZaxis()->GetTitleOffset());
4502 palette->SetTitleSize(
h->GetZaxis()->GetTitleSize());
4503 palette->SetNdivisions(
h->GetZaxis()->GetNdivisions());
4504 palette->SetTitle(
h->GetZaxis()->GetTitle());
4505 palette->SetTitleColor(
h->GetZaxis()->GetTitleColor());
4506 palette->SetTitleFont(
h->GetZaxis()->GetTitleFont());
4515 int logx =
gPad->GetLogx();
4516 int logy =
gPad->GetLogy();
4517 int logz =
gPad->GetLogz();
4526 for (
int i=0; i<
n; i++) {
4563 gPad->PaintPolyMarker(1,&
x,&
y);
4588 auto obj =
lnk->GetObject();
4593 obj->Paint(
lnk->GetOption());
4613 std::vector<Double_t>
xf(2*
n);
4614 std::vector<Double_t>
yf(2*
n);
4615 std::vector<Double_t>
xt(
n);
4616 std::vector<Double_t>
yt(
n);
4617 Double_t x1,
x2,
y1,
y2,
x3,
y3,
xm,
ym,
a,
a1,
a2,
a3;
4649 for (i=1; i<
n; i++) {
4650 if (
x[i]==
x[i-1] &&
y[i]==
y[i-1])
continue;
4653 if (
xf[i]==
xf[i-1])
xf[i] += 0.000001;
4687 for (i=1; i<
nf; i++) {
4757 for (i=
nf2; i>0; i--) {
4758 for (
j=i-1;
j>0;
j--) {
4759 if (
xt[i-1]==
xt[i] ||
xt[
j-1]==
xt[
j])
continue;
4793 for (i=0; i<
nf+1; i++) {
4799 gPad->PaintFillArea(
nf+1,
xf.data(),
yf.data());
4814 while (
auto obj = next()) {
4824 if (!
dofit) fit =
nullptr;
4852 stats->SetOptStat(0);
4861 stats->SetName(
"stats");
4864 stats->SetTextAlign(12);
4957 if (
qlx.empty() ||
qly.empty()) {
4958 Error(
"Smooth",
"not enough space in memory");
4998 if ((
x[i]-
x[i-1])*(
x[i-1]-
x[i-2]) < 0)
six++;
4999 if ((
y[i]-
y[i-1])*(
y[i-1]-
y[i-2]) < 0)
siy++;
5045 if (
x[0] ==
x[1] &&
y[0] ==
y[1])
goto L40;
5072 if (
x[k-1] ==
x[k-2] &&
y[k-1] ==
y[k-2])
goto L50;
5094 if (
x[k-1] ==
x[k] &&
y[k-1] ==
y[k])
goto L80;
5117 dx1 =
x[k-1] -
x[km-1];
5118 dy1 =
y[k-1] -
y[km-1];
5164 if (k <= 1)
goto L120;
5259 z = z*z/((
a*
a+
b*
b)*(delta*delta));
5260 z = (z+2.642937)*z/((.3715652*z+3.063444)*z+.2441889)-
cc;
5265 if (z > err)
goto L240;
5270 if (
iw+2 == 0)
goto L190;
5292 Error(
"Smooth",
"Attempt to plot outside plot limits");
5370 if (finished > 0)
goto L390;
5371 if (finished < 0) { finished = 0;
goto L110;}
5372 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 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 SetTextColor(Color_t tcolor=1)
Set the text color.
virtual void SetTextFont(Font_t tfont=62)
Set the text font.
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)
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.
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 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.
A Pave (see TPave) with text, lines or/and boxes inside.
virtual TText * GetLine(Int_t number) const
Get Pointer to line number in this pavetext.
Double_t GetX1NDC() const
virtual void SetX2NDC(Double_t x2)
Regular expression class.
A TScatter is able to draw four variables scatter plot on a single plot.
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()
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.
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.