689 if (
gPad->GetLogx()) {
690 for (
Int_t i = 0; i < npoints; i++) {
694 for (
Int_t i = 0; i < npoints; i++)
697 if (!opt &&
gPad->GetLogy()) {
698 for (
Int_t i = 0; i < npoints; i++) {
702 for (
Int_t i = 0; i < npoints; i++)
721 if (distance <= 5)
return distance;
725 const Int_t big = 9999;
726 const Int_t kMaxDiff = 10;
733 if (px <= puxmin)
return big;
734 if (py >= puymin)
return big;
735 if (px >= puxmax)
return big;
736 if (py <= puymax)
return big;
746 theX = theGraphPolar->
GetXpol();
747 theY = theGraphPolar->
GetYpol();
749 theX = theGraph->
GetX();
750 theY = theGraph->
GetY();
754 for (i=0;i<theNpoints;i++) {
755 pxp =
gPad->XtoAbsPixel(
gPad->XtoPad(theX[i]));
756 pyp =
gPad->YtoAbsPixel(
gPad->YtoPad(theY[i]));
766 if (distance < kMaxDiff)
return distance;
768 for (i=0;i<theNpoints-1;i++) {
771 if (
d < distance) distance =
d;
786 TIter next(functions);
789 if (
f->InheritsFrom(
TF1::Class())) dist =
f->DistancetoPrimitive(-px,py);
790 else dist =
f->DistancetoPrimitive(px,py);
791 if (dist < kMaxDiff) {
792 gPad->SetSelected(
f);
808 Error(
"DrawPanel",
"need to draw graph first");
813 gROOT->ProcessLine(
Form(
"((TCanvas*)0x%zx)->Selected((TVirtualPad*)0x%zx,(TObject*)0x%zx,1)",
814 (
size_t)
gPad->GetCanvas(), (
size_t)
gPad, (
size_t)theGraph));
836 const Int_t kMaxDiff = 10;
837 static Bool_t middle, badcase;
838 static Int_t ipoint, pxp, pyp;
839 static Int_t px1,px2,py1,py2;
840 static Int_t pxold, pyold, px1old, py1old, px2old, py2old;
841 static Int_t dpx, dpy;
842 static std::vector<Int_t>
x,
y;
849 if (!
gPad->IsEditable())
return;
859 theGraph->TAttLine::Modify();
860 px1 =
gPad->XtoAbsPixel(
gPad->GetX1());
861 py1 =
gPad->YtoAbsPixel(
gPad->GetY1());
862 px2 =
gPad->XtoAbsPixel(
gPad->GetX2());
863 py2 =
gPad->YtoAbsPixel(
gPad->GetY2());
867 if (!
x.empty() || !
y.empty())
break;
868 x.resize(theNpoints+1);
869 y.resize(theNpoints+1);
870 for (i=0;i<theNpoints;i++) {
871 pxp =
gPad->XtoAbsPixel(
gPad->XtoPad(theX[i]));
872 pyp =
gPad->YtoAbsPixel(
gPad->YtoPad(theY[i]));
873 if (pxp < -kMaxPixel || pxp >=
kMaxPixel ||
879 gVirtualX->DrawLine(pxp-4, pyp-4, pxp+4, pyp-4);
880 gVirtualX->DrawLine(pxp+4, pyp-4, pxp+4, pyp+4);
881 gVirtualX->DrawLine(pxp+4, pyp+4, pxp-4, pyp+4);
882 gVirtualX->DrawLine(pxp-4, pyp+4, pxp-4, pyp-4);
887 if (
d < kMaxDiff) ipoint =i;
893 if (ipoint < 0)
return;
897 px2old =
gPad->XtoAbsPixel(theX[1]);
898 py2old =
gPad->YtoAbsPixel(theY[1]);
899 }
else if (ipoint == theNpoints-1) {
900 px1old =
gPad->XtoAbsPixel(
gPad->XtoPad(theX[theNpoints-2]));
901 py1old =
gPad->YtoAbsPixel(
gPad->YtoPad(theY[theNpoints-2]));
905 px1old =
gPad->XtoAbsPixel(
gPad->XtoPad(theX[ipoint-1]));
906 py1old =
gPad->YtoAbsPixel(
gPad->YtoPad(theY[ipoint-1]));
907 px2old =
gPad->XtoAbsPixel(
gPad->XtoPad(theX[ipoint+1]));
908 py2old =
gPad->YtoAbsPixel(
gPad->YtoPad(theY[ipoint+1]));
910 pxold =
gPad->XtoAbsPixel(
gPad->XtoPad(theX[ipoint]));
911 pyold =
gPad->YtoAbsPixel(
gPad->YtoPad(theY[ipoint]));
919 for (i=0;i<theNpoints;i++) {
920 pxp =
gPad->XtoAbsPixel(
gPad->XtoPad(theX[i]));
921 pyp =
gPad->YtoAbsPixel(
gPad->YtoPad(theY[i]));
923 if (
d < kMaxDiff) middle =
kFALSE;
935 for(i=0;i<theNpoints-1;i++) {
936 gVirtualX->DrawLine(
x[i]+dpx,
y[i]+dpy,
x[i+1]+dpx,
y[i+1]+dpy);
939 if (pxp < -kMaxPixel || pxp >=
kMaxPixel ||
940 pyp < -kMaxPixel || pyp >=
kMaxPixel)
continue;
941 gVirtualX->DrawLine(pxp-4, pyp-4, pxp+4, pyp-4);
942 gVirtualX->DrawLine(pxp+4, pyp-4, pxp+4, pyp+4);
943 gVirtualX->DrawLine(pxp+4, pyp+4, pxp-4, pyp+4);
944 gVirtualX->DrawLine(pxp-4, pyp+4, pxp-4, pyp-4);
946 pxp =
x[theNpoints-1]+dpx;
947 pyp =
y[theNpoints-1]+dpy;
948 gVirtualX->DrawLine(pxp-4, pyp-4, pxp+4, pyp-4);
949 gVirtualX->DrawLine(pxp+4, pyp-4, pxp+4, pyp+4);
950 gVirtualX->DrawLine(pxp+4, pyp+4, pxp-4, pyp+4);
951 gVirtualX->DrawLine(pxp-4, pyp+4, pxp-4, pyp-4);
956 for(i=0;i<theNpoints-1;i++) {
957 gVirtualX->DrawLine(
x[i]+dpx,
y[i]+dpy,
x[i+1]+dpx,
y[i+1]+dpy);
960 if (pxp < -kMaxPixel || pxp >=
kMaxPixel ||
961 pyp < -kMaxPixel || pyp >=
kMaxPixel)
continue;
962 gVirtualX->DrawLine(pxp-4, pyp-4, pxp+4, pyp-4);
963 gVirtualX->DrawLine(pxp+4, pyp-4, pxp+4, pyp+4);
964 gVirtualX->DrawLine(pxp+4, pyp+4, pxp-4, pyp+4);
965 gVirtualX->DrawLine(pxp-4, pyp+4, pxp-4, pyp-4);
967 pxp =
x[theNpoints-1]+dpx;
968 pyp =
y[theNpoints-1]+dpy;
969 gVirtualX->DrawLine(pxp-4, pyp-4, pxp+4, pyp-4);
970 gVirtualX->DrawLine(pxp+4, pyp-4, pxp+4, pyp+4);
971 gVirtualX->DrawLine(pxp+4, pyp+4, pxp-4, pyp+4);
972 gVirtualX->DrawLine(pxp-4, pyp+4, pxp-4, pyp-4);
974 if (px1old)
gVirtualX->DrawLine(px1old, py1old, pxold, pyold);
975 if (px2old)
gVirtualX->DrawLine(pxold, pyold, px2old, py2old);
976 gVirtualX->DrawLine(pxold-4, pyold-4, pxold+4, pyold-4);
977 gVirtualX->DrawLine(pxold+4, pyold-4, pxold+4, pyold+4);
978 gVirtualX->DrawLine(pxold+4, pyold+4, pxold-4, pyold+4);
979 gVirtualX->DrawLine(pxold-4, pyold+4, pxold-4, pyold-4);
986 if (px1old)
gVirtualX->DrawLine(px1old, py1old, pxold, pyold);
987 if (px2old)
gVirtualX->DrawLine(pxold, pyold, px2old, py2old);
988 gVirtualX->DrawLine(pxold-4, pyold-4, pxold+4, pyold-4);
989 gVirtualX->DrawLine(pxold+4, pyold-4, pxold+4, pyold+4);
990 gVirtualX->DrawLine(pxold+4, pyold+4, pxold-4, pyold+4);
991 gVirtualX->DrawLine(pxold-4, pyold+4, pxold-4, pyold-4);
1000 dxr = dx/(1 -
gPad->GetLeftMargin() -
gPad->GetRightMargin());
1001 dyr = dy/(1 -
gPad->GetBottomMargin() -
gPad->GetTopMargin());
1007 ymin - dyr*
gPad->GetBottomMargin(),
1017 for(i=0;i<theNpoints;i++) {
1018 if (badcase)
continue;
1019 if (!
x.empty()) theX[i] =
gPad->PadtoX(
gPad->AbsPixeltoX(
x[i]+dpx));
1020 if (!
y.empty()) theY[i] =
gPad->PadtoY(
gPad->AbsPixeltoY(
y[i]+dpy));
1029 theX[ipoint] =
gPad->PadtoX(
gPad->AbsPixeltoX(pxold));
1030 theY[ipoint] =
gPad->PadtoY(
gPad->AbsPixeltoY(pyold));
1034 theX[theNpoints-1] = theX[0];
1035 theY[theNpoints-1] = theY[0];
1037 if (ipoint == theNpoints-1) {
1038 theX[0] = theX[theNpoints-1];
1039 theY[0] = theY[theNpoints-1];
1051 if (
gROOT->IsEscaped()) {
1065 dxr = dx/(1 -
gPad->GetLeftMargin() -
gPad->GetRightMargin());
1066 dyr = dy/(1 -
gPad->GetBottomMargin() -
gPad->GetTopMargin());
1072 ymin - dyr*
gPad->GetBottomMargin(),
1078 for(i=0;i<theNpoints;i++) {
1079 if (badcase)
continue;
1080 if (!
x.empty()) theX[i] =
gPad->PadtoX(
gPad->AbsPixeltoX(
x[i]+dpx));
1081 if (!
y.empty()) theY[i] =
gPad->PadtoY(
gPad->AbsPixeltoY(
y[i]+dpy));
1084 theX[ipoint] =
gPad->PadtoX(
gPad->AbsPixeltoX(pxold));
1085 theY[ipoint] =
gPad->PadtoY(
gPad->AbsPixeltoY(pyold));
1089 theX[theNpoints-1] = theX[0];
1090 theY[theNpoints-1] = theY[0];
1092 if (ipoint == theNpoints-1) {
1093 theX[0] = theX[theNpoints-1];
1094 theY[0] = theY[theNpoints-1];
1148 const Int_t kHighlightRange = 50;
1149 static Int_t distanceOld = kHighlightRange;
1152 if ((distance < kHighlightRange) && (distance < distanceOld)) {
1190 if (
gPad->GetLogx()) {
1194 if (
gPad->GetLogy()) {
1198 if ((hx < uxmin) || (hx > uxmax))
return;
1199 if ((hy < uymin) || (hy > uymax))
return;
1223 strlcpy(chopt,
option,80);
1226 char *l1 = strstr(chopt,
"pfc");
1227 char *l2 = strstr(chopt,
"plc");
1228 char *l3 = strstr(chopt,
"pmc");
1229 if (l1 || l2 || l3) {
1238 char *l4 = strstr(chopt,
"rx");
1239 char *l5 = strstr(chopt,
"ry");
1273 TIter next(functions);
1294 gPad->PushSelectableObject(theGraph);
1296 Int_t optionLine , optionAxis , optionCurve , optionStar , optionMark;
1297 Int_t optionBar , optionR , optionOne , optionE;
1298 Int_t optionFill , optionZ , optionCurveFill, optionIAxis;
1299 Int_t i, npt, nloop;
1302 Double_t barxmin, barxmax, barymin, barymax;
1309 Error(
"PaintGraph",
"illegal number of points (%d)", npoints);
1316 if (opt.
Contains(
"L")) optionLine = 1;
else optionLine = 0;
1317 if (opt.
Contains(
"A")) optionAxis = 1;
else optionAxis = 0;
1318 if (opt.
Contains(
"C")) optionCurve = 1;
else optionCurve = 0;
1319 if (opt.
Contains(
"*")) optionStar = 1;
else optionStar = 0;
1320 if (opt.
Contains(
"P")) optionMark = 1;
else optionMark = 0;
1321 if (opt.
Contains(
"B")) optionBar = 1;
else optionBar = 0;
1322 if (opt.
Contains(
"R")) optionR = 1;
else optionR = 0;
1323 if (opt.
Contains(
"1")) optionOne = 1;
else optionOne = 0;
1324 if (opt.
Contains(
"F")) optionFill = 1;
else optionFill = 0;
1325 if (opt.
Contains(
"I")) optionIAxis = 1;
else optionIAxis = 0;
1331 if (optionLine+optionFill+optionCurve+optionStar+optionMark+optionBar+optionE == 0) {
1332 if (!chopt[0]) optionLine=1;
1338 optionCurveFill = 0;
1339 if (optionCurve && optionFill) {
1340 optionCurveFill = 1;
1345 Double_t rwxmin,rwxmax, rwymin, rwymax, maximum, minimum, dx, dy;
1348 rwxmin =
gPad->GetUxmin();
1349 rwxmax =
gPad->GetUxmax();
1350 rwymin =
gPad->GetUymin();
1351 rwymax =
gPad->GetUymax();
1354 if (minimum == -1111) {
1358 if (maximum == -1111) {
1362 uxmin =
gPad->PadtoX(rwxmin);
1363 uxmax =
gPad->PadtoX(rwxmax);
1366 theGraph->
ComputeRange(rwxmin, rwymin, rwxmax, rwymax);
1368 if (rwxmin == rwxmax) rwxmax += 1.;
1369 if (rwymin == rwymax) rwymax += 1.;
1370 dx = 0.1*(rwxmax-rwxmin);
1371 dy = 0.1*(rwymax-rwymin);
1372 uxmin = rwxmin - dx;
1373 uxmax = rwxmax + dx;
1374 minimum = rwymin - dy;
1375 maximum = rwymax + dy;
1379 if (uxmin < 0 && rwxmin >= 0) uxmin = 0.9*rwxmin;
1380 if (uxmax > 0 && rwxmax <= 0) {
1381 if (
gPad->GetLogx()) uxmax = 1.1*rwxmax;
1384 if (minimum < 0 && rwymin >= 0) minimum = 0.9*rwymin;
1385 if (maximum > 0 && rwymax <= 0) {
1389 if (minimum <= 0 && gPad->GetLogy()) minimum = 0.001*maximum;
1390 if (uxmin <= 0 && gPad->GetLogx()) {
1391 if (uxmax > 1000) uxmin = 1;
1392 else uxmin = 0.001*uxmax;
1399 char chopth[8] =
" ";
1400 if (strstr(chopt,
"x+")) strncat(chopth,
"x+",3);
1401 if (strstr(chopt,
"y+")) strncat(chopth,
"y+",3);
1402 if (optionIAxis) strncat(chopth,
"A",2);
1409 if (theNpoints > npt) npt = theNpoints;
1421 if (
gPad->GetLogy()) {
1434 rwxmin =
gPad->GetUxmin();
1435 rwxmax =
gPad->GetUxmax();
1436 rwymin =
gPad->GetUymin();
1437 rwymax =
gPad->GetUymax();
1438 uxmin =
gPad->PadtoX(rwxmin);
1439 uxmax =
gPad->PadtoX(rwxmax);
1444 maximum =
gPad->PadtoY(rwymax);
1445 minimum =
gPad->PadtoY(rwymin);
1449 theGraph->TAttLine::Modify();
1450 theGraph->TAttFill::Modify();
1451 theGraph->TAttMarker::Modify();
1454 gxwork.resize(2*npoints+10);
1455 gywork.resize(2*npoints+10);
1459 if (optionLine || optionFill) {
1465 if (optionFill && (xn !=
x1 || yn !=
y1)) nloop++;
1467 for (i=1;i<=nloop;i++) {
1510 if (optionCurveFill) {
1512 if (xn !=
x1 || yn !=
y1) nloop++;
1516 for (i=1;i<=nloop;i++) {
1541 for (i=1;i<=nloop;i++) {
1545 if (
y[i-1] < minimum ||
y[i-1] > maximum)
continue;
1546 if (
x[i-1] < uxmin ||
x[i-1] > uxmax)
continue;
1572 for (i=1;i<=npoints;i++) {
1587 for (i=1;i<=npoints;i++) {
1602 if(FillSave ==
gPad->GetFrameFillColor()) {
1604 if (
gPad->GetFrameFillColor()==1) {
1606 theGraph->TAttFill::Modify();
1609 theGraph->TAttFill::Modify();
1615 for (i=1;i<npoints;i++) {
1616 if (
x[i] < barxmin) barxmin =
x[i];
1617 if (
x[i] > barxmax) barxmax =
x[i];
1619 bdelta = (barxmax-barxmin)/
Double_t(npoints);
1623 for (i=1;i<npoints;i++) {
1624 if (
y[i] < barymin) barymin =
y[i];
1625 if (
y[i] > barymax) barymax =
y[i];
1627 bdelta = (barymax-barymin)/
Double_t(npoints);
1631 for (i=1;i<=npoints;i++) {
1632 xlow =
x[i-1] - dbar;
1633 xhigh =
x[i-1] + dbar;
1635 if (xlow < uxmin && xhigh < uxmin)
continue;
1636 if (xhigh > uxmax && xlow > uxmax)
continue;
1637 if (xlow < uxmin) xlow = uxmin;
1638 if (xhigh > uxmax) xhigh = uxmax;
1640 else ylow =
gPad->GetUymin();
1654 for (i=1;i<=npoints;i++) {
1656 ylow =
y[i-1] - dbar;
1657 yhigh =
y[i-1] + dbar;
1668 theGraph->TAttFill::Modify();
1712 const char *where =
"PaintGrapHist";
1714 Int_t optionLine , optionAxis , optionCurve, optionStar, optionMark;
1715 Int_t optionBar , optionRot , optionOne , optionOff ;
1716 Int_t optionFill , optionZ;
1717 Int_t optionHist , optionBins , optionMarker;
1719 Int_t drawtype=0, drawborder, drawbordersav;
1725 Double_t xi, xi1, xj, xj1, yi1, yi, yj, yj1, xwmin, ywmin;
1729 char choptaxis[10] =
" ";
1732 Error(where,
"illegal number of points (%d)", npoints);
1737 if (opt.
Contains(
"H")) optionHist = 1;
else optionHist = 0;
1738 if (opt.
Contains(
"F")) optionFill = 1;
else optionFill = 0;
1739 if (opt.
Contains(
"C")) optionCurve= 1;
else optionCurve= 0;
1740 if (opt.
Contains(
"*")) optionStar = 1;
else optionStar = 0;
1741 if (opt.
Contains(
"R")) optionRot = 1;
else optionRot = 0;
1742 if (opt.
Contains(
"1")) optionOne = 1;
else optionOne = 0;
1743 if (opt.
Contains(
"B")) optionBar = 1;
else optionBar = 0;
1744 if (opt.
Contains(
"N")) optionBins = 1;
else optionBins = 0;
1745 if (opt.
Contains(
"L")) optionLine = 1;
else optionLine = 0;
1746 if (opt.
Contains(
"P")) optionMark = 1;
else optionMark = 0;
1747 if (opt.
Contains(
"A")) optionAxis = 1;
else optionAxis = 0;
1748 if (opt.
Contains(
"][")) optionOff = 1;
else optionOff = 0;
1749 if (opt.
Contains(
"P0")) optionMark = 10;
1751 Int_t optionFill2 = 0;
1753 optionFill = 0; optionFill2 = 1;
1768 nbins = last -
first + 1;
1780 Double_t rounding = (uxmax-uxmin)*1.e-5;
1783 Int_t nx1, nx2, ndivx, ndivy, ndiv;
1796 if (ndivx < 0) strlcat(choptaxis,
"N",10);
1797 if (
gPad->GetGridx()) {
1799 strlcat(choptaxis,
"W",10);
1801 if (
gPad->GetLogx()) {
1805 strlcat(choptaxis,
"G",10);
1815 axis.
PaintAxis(rwxmin,rwymin,rwxmax,rwymin,rwmin,rwmax,ndiv,choptaxis);
1825 strlcat(choptaxis,
"N",10);
1828 if (
gPad->GetGridy()) {
1830 strlcat(choptaxis,
"W",10);
1832 if (
gPad->GetLogy()) {
1836 strlcat(choptaxis,
"G",10);
1845 axis.
PaintAxis(rwxmin,rwymin,rwxmin,rwymax,rwmin,rwmax,ndiv,choptaxis);
1850 theGraph->TAttLine::Modify();
1851 theGraph->TAttFill::Modify();
1852 theGraph->TAttMarker::Modify();
1861 Int_t fwidth =
gPad->GetFrameLineWidth();
1864 if (optionOff) fwidth = 1;
1875 gxwork.resize(2*npoints+10);
1876 gywork.resize(2*npoints+10);
1880 if (optionFill && !optionCurve) {
1888 for (j=
first; j<=last;j++) {
1895 xj1 =
x[j]; xj =
x[j-1];
1897 if (j != last)
Error(where,
"X must be in increasing order");
1898 else Error(where,
"X must have N+1 values with option N");
1906 if ((
gxwork[npt-1] >= uxmin-rounding &&
gxwork[npt-1] <= uxmax+rounding) ||
1907 (
gxwork[npt] >= uxmin-rounding &&
gxwork[npt] <= uxmax+rounding)) npt += 2;
1920 if (!fillarea)
gyworkl[0] = ylast;
1931 for (j=
first; j<=last;j++) {
1936 yj1 =
y[j]; yj =
y[j-1];
1938 if (j != last)
Error(where,
"Y must be in increasing order");
1939 else Error(where,
"Y must have N+1 values with option N");
1945 if ((
gxwork[npt-1] >= uxmin-rounding &&
gxwork[npt-1] <= uxmax+rounding) ||
1946 (
gxwork[npt] >= uxmin-rounding &&
gxwork[npt] <= uxmax+rounding)) npt += 2;
1953 if (!fillarea)
gyworkl[0] = ylast;
1960 theGraph->TAttLine::Modify();
1961 theGraph->TAttFill::Modify();
1966 if ((optionHist) || !chopt[0]) {
1974 for (i=
first; i<=last;i++) {
1979 xi1 =
x[i]; xi =
x[i-1];
1981 if (i != last)
Error(where,
"X must be in increasing order");
1982 else Error(where,
"X must have N+1 values with option N");
1990 if ((
gxwork[npt-1] >= uxmin-rounding &&
gxwork[npt-1] <= uxmax+rounding) ||
1991 (
gxwork[npt] >= uxmin-rounding &&
gxwork[npt] <= uxmax+rounding)) npt += 2;
2003 Int_t nbpoints = npt-2;
2009 for (ip=point1; ip<=nbpoints; ip++) {
2016 Int_t point2 = nbpoints;
2017 for (ip=point2; ip>=point1; ip--) {
2023 nbpoints = point2-point1+1;
2027 if (
gxwork[0] >
gPad->GetUxmin()) { nbpoints++; point1 = 0; }
2028 if (
gxwork[nbpoints] <
gPad->GetUxmax()) nbpoints++;
2031 gPad->PaintPolyLine(nbpoints,
gxworkl.data() + point1,
gyworkl.data() + point1, noClip);
2041 for (i=
first; i<=last;i++) {
2046 yi1 =
y[i]; yi =
y[i-1];
2048 if (i != last)
Error(where,
"Y must be in increasing order");
2049 else Error(where,
"Y must have N+1 values with option N");
2055 if ((
gxwork[npt-1] >= uxmin-rounding &&
gxwork[npt-1] <= uxmax+rounding) ||
2056 (
gxwork[npt] >= uxmin-rounding &&
gxwork[npt] <= uxmax+rounding)) npt += 2;
2075 if (!optionOne) drawtype = 2;
2080 for (i=
first; i<=last;i++) {
2085 xi1 =
x[i]; xi =
x[i-1];
2087 if (i != last)
Error(where,
"X must be in increasing order");
2088 else Error(where,
"X must have N+1 values with option N");
2091 gxwork[npt-1] =
x[i-1] + 0.5*(
x[i]-
x[i-1]);
2122 drawtype = drawtype+10;
2124 for (i=
first; i<=last;i++) {
2129 yi1 =
y[i]; yi =
y[i-1];
2131 if (i != last)
Error(where,
"Y must be in increasing order");
2132 else Error(where,
"Y must have N+1 values with option N");
2135 gywork[npt-1] =
y[i-1] + 0.5*(
y[i]-
y[i-1]);
2168 wminstep =
wmin + 0.5*delta;
2170 gPad->GetRangeAxis(ax1,ay1,ax2,ay2);
2174 for (i=
first; i<=last;i++) {
2179 xi1 =
x[i]; xi =
x[i-1];
2181 if (i != last)
Error(where,
"X must be in increasing order");
2182 else Error(where,
"X must have N+1 values with option N");
2185 gxwork[npt-1] =
x[i-1] + 0.5*(
x[i]-
x[i-1]);
2187 if (
gxwork[npt-1] < uxmin ||
gxwork[npt-1] > uxmax) { npt--;
continue;}
2190 if ((
gywork[npt-1] < rwymin) || ((
gywork[npt-1] > rwymax) && !optionFill2)) {
2227 for (i=
first; i<=last;i++) {
2230 gywork[npt-1] = wminstep+(i-
first)*delta+0.5*delta;
2232 yi1 =
y[i]; yi =
y[i-1];
2234 if (i != last)
Error(where,
"Y must be in increasing order");
2235 else Error(where,
"Y must have N+1 values with option N");
2238 gywork[npt-1] =
y[i-1] + 0.5*(
y[i]-
y[i-1]);
2241 if ((
gxwork[npt-1] < uxmin) || (
gxwork[npt-1] > uxmax)) {
2263 if (optionLine != 0 && npt > 1) {
2274 offset = delta*baroffset; dbar = delta*barwidth;
2278 dbar = (
x[1]-
x[0])*barwidth;
2281 dbar = (
y[1]-
y[0])*barwidth;
2284 drawbordersav = drawborder;
2291 else ylow =
gPad->GetUymin();
2293 for (i=
first; i<=last;i++) {
2300 if (xlow < rwxmax && xhigh > rwxmin)
2304 xhigh = xhigh+delta;
2307 xi1 =
x[i]; xi =
x[i-1];
2309 Error(where,
"X must be in increasing order");
2313 dbar = (
x[i+1]-
x[i])*barwidth;
2323 else xlow =
gPad->GetUxmin();
2324 for (i=
first; i<=last;i++) {
2332 gPad->PaintBox(xlow,ylow,xhigh,yhigh);
2334 ylow = ylow + delta;
2335 yhigh = yhigh + delta;
2338 yi1 =
y[i]; yi =
y[i-1];
2340 Error(where,
"Y must be in increasing order");
2344 dbar = (
y[i+1]-
y[i])*barwidth;
2357 if ((optionStar) || (optionMark)) optionMarker=1;
2363 for (i=
first; i<=last;i++) {
2364 if (!optionBins) xm =
wmin+(i-
first)*delta+0.5*delta;
2365 else xm =
x[i-1] + 0.5*(
x[i]-
x[i-1]);
2367 if (optionMark != 10) {
2368 if (ym<rwymax && ym > rwymin) {
2374 if (ym<rwymax && ym >= rwymin) {
2391 wminstep =
wmin + 0.5*delta;
2392 for (i=
first; i<=last;i++) {
2393 if (!optionBins) ym = wminstep+(i-
first)*delta+0.5*delta;
2394 else ym =
y[i-1] + 0.5*(
y[i]-
y[i-1]);
2396 if (optionMark != 10) {
2397 if (xm<rwxmax && xm > rwxmin) {
2403 if (xm<rwxmax && xm >= rwxmin) {
2438 std::vector<Double_t> xline, yline;
2443 const Int_t kBASEMARKER=8;
2444 Double_t s2x, s2y, symbolsize, sbase;
2445 Double_t x,
y, xl1, xl2, xr1, xr2, yup1, yup2, ylow1, ylow2, tx, ty;
2446 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};
2447 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};
2466 const char *arrowOpt =
nullptr;
2467 if (strchr(
option,
'>')) arrowOpt =
">";
2468 if (strstr(
option,
"|>")) arrowOpt =
"|>";
2487 xline.resize(2*theNpoints);
2488 yline.resize(2*theNpoints);
2489 if (xline.empty() || yline.empty()) {
2490 Error(
"PaintGraphAsymmErrors",
"too many points, out of memory");
2497 theGraph->TAttLine::Modify();
2512 sbase = symbolsize*kBASEMARKER;
2525 tx =
gPad->PixeltoX(dxend) -
gPad->PixeltoX(0);
2526 ty =-
gPad->PixeltoY(dxend) +
gPad->PixeltoY(0);
2527 Float_t asize = 0.6*symbolsize*kBASEMARKER/
gPad->GetWh();
2530 for (
Int_t i=0;i<theNpoints;i++) {
2531 x =
gPad->XtoPad(theX[i]);
2532 y =
gPad->YtoPad(theY[i]);
2535 if (x < gPad->GetUxmin())
x =
gPad->GetUxmin();
2536 if (
x >
gPad->GetUxmax())
x =
gPad->GetUxmax();
2537 if (y < gPad->GetUymin())
y =
gPad->GetUymin();
2538 if (
y >
gPad->GetUymax())
y =
gPad->GetUymax();
2540 if (x < gPad->GetUxmin())
continue;
2541 if (
x >
gPad->GetUxmax())
continue;
2542 if (y < gPad->GetUymin())
continue;
2543 if (
y >
gPad->GetUymax())
continue;
2547 xl2 =
gPad->XtoPad(theX[i] - theEXlow[i]);
2551 x1b =
gPad->XtoPad(theX[i] - theEXlow[i]);
2552 y1b =
gPad->YtoPad(theY[i] - theEYlow[i]);
2553 x2b =
gPad->XtoPad(theX[i] + theEXhigh[i]);
2554 y2b =
gPad->YtoPad(theY[i] + theEYhigh[i]);
2555 if (x1b < gPad->GetUxmin()) x1b =
gPad->GetUxmin();
2556 if (x1b >
gPad->GetUxmax()) x1b =
gPad->GetUxmax();
2557 if (y1b < gPad->GetUymin()) y1b =
gPad->GetUymin();
2558 if (y1b >
gPad->GetUymax()) y1b =
gPad->GetUymax();
2559 if (x2b < gPad->GetUxmin()) x2b =
gPad->GetUxmin();
2560 if (x2b >
gPad->GetUxmax()) x2b =
gPad->GetUxmax();
2561 if (y2b < gPad->GetUymin()) y2b =
gPad->GetUymin();
2562 if (y2b >
gPad->GetUymax()) y2b =
gPad->GetUymax();
2563 if (option5)
box.PaintBox(x1b, y1b, x2b, y2b,
"l");
2564 else box.PaintBox(x1b, y1b, x2b, y2b);
2572 yline[if1-1] =
gPad->YtoPad(theY[i] + theEYhigh[i]);
2573 yline[if2-1] =
gPad->YtoPad(theY[i] - theEYlow[i]);
2581 arrow.PaintArrow(xl1,
y,xl2,
y,asize,arrowOpt);
2583 if (!brackets)
gPad->PaintLine(xl1,
y,xl2,
y);
2586 xb[0] = xl2+tx; yb[0] =
y-ty;
2587 xb[1] = xl2; yb[1] =
y-ty;
2588 xb[2] = xl2; yb[2] =
y+ty;
2589 xb[3] = xl2+tx; yb[3] =
y+ty;
2590 gPad->PaintPolyLine(4, xb, yb);
2592 gPad->PaintLine(xl2,
y-ty,xl2,
y+ty);
2598 xr2 =
gPad->XtoPad(theX[i] + theEXhigh[i]);
2601 arrow.PaintArrow(xr1,
y,xr2,
y,asize,arrowOpt);
2603 if (!brackets)
gPad->PaintLine(xr1,
y,xr2,
y);
2606 xb[0] = xr2-tx; yb[0] =
y-ty;
2607 xb[1] = xr2; yb[1] =
y-ty;
2608 xb[2] = xr2; yb[2] =
y+ty;
2609 xb[3] = xr2-tx; yb[3] =
y+ty;
2610 gPad->PaintPolyLine(4, xb, yb);
2612 gPad->PaintLine(xr2,
y-ty,xr2,
y+ty);
2618 yup2 =
gPad->YtoPad(theY[i] + theEYhigh[i]);
2619 if (yup2 >
gPad->GetUymax()) yup2 =
gPad->GetUymax();
2622 arrow.PaintArrow(
x,yup1,
x,yup2,asize,arrowOpt);
2624 if (!brackets)
gPad->PaintLine(
x,yup1,
x,yup2);
2627 xb[0] =
x-tx; yb[0] = yup2-ty;
2628 xb[1] =
x-tx; yb[1] = yup2;
2629 xb[2] =
x+tx; yb[2] = yup2;
2630 xb[3] =
x+tx; yb[3] = yup2-ty;
2631 gPad->PaintPolyLine(4, xb, yb);
2633 gPad->PaintLine(
x-tx,yup2,
x+tx,yup2);
2639 ylow2 =
gPad->YtoPad(theY[i] - theEYlow[i]);
2640 if (ylow2 < gPad->GetUymin()) ylow2 =
gPad->GetUymin();
2641 if (ylow2 < ylow1) {
2643 arrow.PaintArrow(
x,ylow1,
x,ylow2,asize,arrowOpt);
2645 if (!brackets)
gPad->PaintLine(
x,ylow1,
x,ylow2);
2648 xb[0] =
x-tx; yb[0] = ylow2+ty;
2649 xb[1] =
x-tx; yb[1] = ylow2;
2650 xb[2] =
x+tx; yb[2] = ylow2;
2651 xb[3] =
x+tx; yb[3] = ylow2+ty;
2652 gPad->PaintPolyLine(4, xb, yb);
2654 gPad->PaintLine(
x-tx,ylow2,
x+tx,ylow2);
2668 if (option4)
PaintGraph(theGraph, 2*theNpoints, xline.data(), yline.data(),
"FC");
2669 else PaintGraph(theGraph, 2*theNpoints, xline.data(), yline.data(),
"F");
2670 gPad->SetLogx(logx);
2671 gPad->SetLogy(logy);
2687 Int_t NYErrors = tg->GetNYErrors();
2688 if (NYErrors <= 0) {
2696 std::vector<TString> options(NYErrors + 1);
2705 while ((firstSemicolon = tsOpt.
First(
';')) !=
kNPOS && filled <= NYErrors) {
2706 options[filled] = tsOpt(0, firstSemicolon);
2707 tsOpt = tsOpt(firstSemicolon + 1, tsOpt.
Length());
2711 if (filled <= NYErrors) {
2712 options[filled] = tsOpt.
Copy();
2716 for (
Int_t i = filled; i <= NYErrors; i++)
2719 std::vector<Double_t> xline;
2720 std::vector<std::vector<Double_t>> yline(NYErrors);
2725 const Int_t kBASEMARKER = 8;
2726 Double_t s2x, s2y, symbolsize, sbase;
2727 Double_t x,
y, xl1, xl2, xr1, xr2, yup1, yup2, ylow1, ylow2, tx, ty;
2728 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};
2729 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};
2730 Int_t theNpoints = tg->GetN();
2734 Double_t *theExH = tg->GetEXhigh();
2735 std::vector<Double_t *> theEyL(NYErrors);
2736 std::vector<Double_t *> theEyH(NYErrors);
2739 for (
Int_t j = 0; j < NYErrors; j++) {
2740 theEyL[j] = tg->GetEYlow(j);
2741 theEyH[j] = tg->GetEYhigh(j);
2742 theEyExists &= (theEyL[j] && theEyH[j]);
2745 if (!theX || !theY || !theExL || !theExH || !theEyExists)
2748 std::vector<Bool_t> DrawErrors(NYErrors);
2753 std::vector<Bool_t> Braticks(NYErrors);
2754 std::vector<Bool_t> Brackets(NYErrors);
2755 std::vector<Bool_t> EndLines(NYErrors);
2756 std::vector<Char_t *> ArrowOpt(NYErrors);
2757 std::vector<Bool_t> Option5(NYErrors);
2758 std::vector<Bool_t> Option4(NYErrors);
2759 std::vector<Bool_t> Option3(NYErrors);
2761 std::vector<Bool_t> Option2(NYErrors);
2762 std::vector<Bool_t> Option0(NYErrors);
2764 std::vector<Double_t> Scale(NYErrors);
2766 const TRegexp ScaleRegExp(
"s=*[0-9]\\.*[0-9]");
2768 for (
Int_t j = 0; j < NYErrors; j++) {
2769 if (options[j + 1].Contains(
"s=")) {
2770 sscanf(strstr(options[j + 1].Data(),
"s="),
"s=%lf", &Scale[j]);
2771 options[j + 1].ReplaceAll(options[j + 1](ScaleRegExp),
"");
2775 DrawErrors[j] = !options[j + 1].Contains(
"x");
2776 AnyErrors |= DrawErrors[j];
2777 Braticks[j] = options[j + 1].Contains(
"[]");
2778 Brackets[j] = options[j + 1].Contains(
"||") || Braticks[j];
2779 EndLines[j] = !options[j + 1].Contains(
"z");
2781 if (options[j + 1].Contains(
"|>"))
2782 ArrowOpt[j] = (
Char_t *)
"|>";
2783 else if (options[j + 1].Contains(
">"))
2784 ArrowOpt[j] = (
Char_t *)
">";
2786 ArrowOpt[j] =
nullptr;
2788 Option5[j] = options[j + 1].Contains(
"5");
2789 Option4[j] = options[j + 1].Contains(
"4");
2790 Option3[j] = options[j + 1].Contains(
"3") || Option4[j];
2791 AnyOption3 |= Option3[j];
2792 Option2[j] = options[j + 1].Contains(
"2") || Option5[j];
2793 Option0[j] = options[j + 1].Contains(
"0");
2794 AnyOption0 |= Option0[j];
2796 NoErrorsX &= (Option3[j] || Option2[j]);
2797 Option0X |= !(Option3[j] || Option2[j]) && Option0[j];
2798 DrawMarker |= !(Brackets[j] || Option3[j] || Option2[j]);
2801 Bool_t Draw0PointsX = !options[0].Contains(
"x0") && (
gPad->GetLogx() == 0);
2802 Bool_t Draw0PointsY = !options[0].Contains(
"y0") && (
gPad->GetLogy() == 0);
2803 options[0].ReplaceAll(
"x0",
"");
2804 options[0].ReplaceAll(
"y0",
"");
2806 Bool_t DrawErrorsX = !options[0].Contains(
"x");
2807 Bool_t BraticksX = options[0].Contains(
"[]");
2808 Bool_t BracketsX = options[0].Contains(
"||") || BraticksX;
2809 Bool_t EndLinesX = !options[0].Contains(
"z");
2811 Char_t *ArrowOptX =
nullptr;
2812 if (options[0].Contains(
"|>"))
2813 ArrowOptX = (
Char_t *)
"|>";
2814 else if (options[0].Contains(
">"))
2815 ArrowOptX = (
Char_t *)
">";
2818 if (options[0].Contains(
"s=")) {
2819 sscanf(strstr(options[0].Data(),
"s="),
"s=%lf", &ScaleX);
2820 options[0].ReplaceAll(options[0](ScaleRegExp),
"");
2823 if (!AnyErrors && !DrawErrorsX) {
2828 Bool_t DrawAxis = options[0].Contains(
"a");
2829 Bool_t IndividualStyles = options[0].Contains(
"s");
2834 Int_t NPointsInside = AnyOption0 ? theNpoints : 0;
2836 for (
Int_t i = 0; i < theNpoints && !AnyOption0; i++) {
2837 x =
gPad->XtoPad(theX[i]);
2838 y =
gPad->YtoPad(theY[i]);
2840 if ((
x >=
gPad->GetUxmin()) && (x <= gPad->GetUxmax()) && (
y >=
gPad->GetUymin()) && (y <= gPad->GetUymax()) &&
2841 (Draw0PointsX || theX[i] != 0.) && (Draw0PointsY || theY[i] != 0.))
2846 xline.resize(2 * NPointsInside);
2848 if (xline.empty()) {
2849 Error(
"PaintGraphMultiErrors",
"too many points, out of memory");
2854 if2 = 2 * NPointsInside;
2857 for (
Int_t j = 0; j < NYErrors; j++) {
2858 if (Option3[j] && DrawErrors[j]) {
2859 yline[j].resize(2 * NPointsInside);
2861 if (yline[j].empty()) {
2862 Error(
"PaintGraphMultiErrors",
"too many points, out of memory");
2868 tg->TAttLine::Modify();
2871 arrow.SetLineWidth(tg->GetLineWidth());
2872 arrow.SetLineColor(tg->GetLineColor());
2873 arrow.SetFillColor(tg->GetFillColor());
2877 box.SetLineWidth(tg->GetLineWidth());
2878 box.SetLineColor(tg->GetLineColor());
2879 box.SetFillColor(tg->GetFillColor());
2880 box.SetFillStyle(tg->GetFillStyle());
2882 symbolsize = tg->GetMarkerSize();
2883 sbase = symbolsize * kBASEMARKER;
2889 cx = cxx[
mark - 20];
2890 cy = cyy[
mark - 20];
2894 s2x =
gPad->PixeltoX(
Int_t(0.5 * sbase)) -
gPad->PixeltoX(0);
2895 s2y = -
gPad->PixeltoY(
Int_t(0.5 * sbase)) +
gPad->PixeltoY(0);
2897 tx =
gPad->PixeltoX(dxend) -
gPad->PixeltoX(0);
2898 ty = -
gPad->PixeltoY(dxend) +
gPad->PixeltoY(0);
2899 Float_t asize = 0.6 * symbolsize * kBASEMARKER /
gPad->GetWh();
2903 for (
Int_t i = 0; i < theNpoints; i++) {
2904 x =
gPad->XtoPad(theX[i]);
2905 y =
gPad->YtoPad(theY[i]);
2908 (
x <
gPad->GetUxmin()) || (
x >
gPad->GetUxmax()) || (y < gPad->GetUymin()) || (
y >
gPad->GetUymax());
2910 if ((isOutside && !AnyOption0) || (!Draw0PointsX && theX[i] == 0.) || (!Draw0PointsY && theY[i] == 0.))
2915 if (x < gPad->GetUxmin())
2916 x =
gPad->GetUxmin();
2917 if (
x >
gPad->GetUxmax())
2918 x =
gPad->GetUxmax();
2919 if (y < gPad->GetUymin())
2920 y =
gPad->GetUymin();
2921 if (
y >
gPad->GetUymax())
2922 y =
gPad->GetUymax();
2932 for (
Int_t j = 0; j < NYErrors; j++) {
2937 if (Option2[j] && (!isOutside || Option0[j])) {
2938 if (IndividualStyles) {
2939 box.SetLineWidth(tg->GetLineWidth(j));
2940 box.SetLineColor(tg->GetLineColor(j));
2941 box.SetFillColor(tg->GetFillColor(j));
2942 box.SetFillStyle(tg->GetFillStyle(j));
2945 x1b =
gPad->XtoPad(theX[i] - Scale[j] * theExL[i]);
2946 y1b =
gPad->YtoPad(theY[i] - theEyL[j][i]);
2947 x2b =
gPad->XtoPad(theX[i] + Scale[j] * theExH[i]);
2948 y2b =
gPad->YtoPad(theY[i] + theEyH[j][i]);
2949 if (x1b < gPad->GetUxmin())
2950 x1b =
gPad->GetUxmin();
2951 if (x1b >
gPad->GetUxmax())
2952 x1b =
gPad->GetUxmax();
2953 if (y1b < gPad->GetUymin())
2954 y1b =
gPad->GetUymin();
2955 if (y1b >
gPad->GetUymax())
2956 y1b =
gPad->GetUymax();
2957 if (x2b < gPad->GetUxmin())
2958 x2b =
gPad->GetUxmin();
2959 if (x2b >
gPad->GetUxmax())
2960 x2b =
gPad->GetUxmax();
2961 if (y2b < gPad->GetUymin())
2962 y2b =
gPad->GetUymin();
2963 if (y2b >
gPad->GetUymax())
2964 y2b =
gPad->GetUymax();
2966 box.PaintBox(x1b, y1b, x2b, y2b,
"l");
2968 box.PaintBox(x1b, y1b, x2b, y2b);
2973 if (!isOutside || Option0[j]) {
2974 yline[j][if1 - 2] =
gPad->YtoPad(theY[i] + theEyH[j][i]);
2975 yline[j][if2] =
gPad->YtoPad(theY[i] - theEyL[j][i]);
2977 yline[j][if1 - 2] =
gPad->GetUymin();
2978 yline[j][if2] =
gPad->GetUymin();
2982 if (IndividualStyles) {
2983 tg->GetAttLine(j)->Modify();
2985 arrow.SetLineWidth(tg->GetLineWidth(j));
2986 arrow.SetLineColor(tg->GetLineColor(j));
2987 arrow.SetFillColor(tg->GetFillColor(j));
2990 ylow1 =
y - s2y * cy;
2991 ylow2 =
gPad->YtoPad(theY[i] - theEyL[j][i]);
2992 if (ylow2 < gPad->GetUymin())
2993 ylow2 =
gPad->GetUymin();
2994 if (ylow2 < ylow1 && DrawErrors[j] && !Option2[j] && !Option3[j] && (!isOutside || Option0[j])) {
2996 arrow.PaintArrow(
x, ylow1,
x, ylow2, asize, ArrowOpt[j]);
2999 gPad->PaintLine(
x, ylow1,
x, ylow2);
3010 gPad->PaintPolyLine(4, xb, yb);
3012 gPad->PaintLine(
x - tx, ylow2,
x + tx, ylow2);
3017 yup1 =
y + s2y * cy;
3018 yup2 =
gPad->YtoPad(theY[i] + theEyH[j][i]);
3019 if (yup2 >
gPad->GetUymax())
3020 yup2 =
gPad->GetUymax();
3021 if (yup2 > yup1 && DrawErrors[j] && !Option2[j] && !Option3[j] && (!isOutside || Option0[j])) {
3023 arrow.PaintArrow(
x, yup1,
x, yup2, asize, ArrowOpt[j]);
3026 gPad->PaintLine(
x, yup1,
x, yup2);
3037 gPad->PaintPolyLine(4, xb, yb);
3039 gPad->PaintLine(
x - tx, yup2,
x + tx, yup2);
3046 if (IndividualStyles) {
3047 tg->TAttLine::Modify();
3049 arrow.SetLineWidth(tg->GetLineWidth());
3050 arrow.SetLineColor(tg->GetLineColor());
3051 arrow.SetFillColor(tg->GetFillColor());
3055 xl2 =
gPad->XtoPad(theX[i] - ScaleX * theExL[i]);
3056 if (xl1 > xl2 && !NoErrorsX && (!isOutside || Option0X)) {
3058 arrow.PaintArrow(xl1,
y, xl2,
y, asize, ArrowOptX);
3061 gPad->PaintLine(xl1,
y, xl2,
y);
3072 gPad->PaintPolyLine(4, xb, yb);
3074 gPad->PaintLine(xl2,
y - ty, xl2,
y + ty);
3080 xr2 =
gPad->XtoPad(theX[i] + ScaleX * theExH[i]);
3081 if (xr1 < xr2 && !NoErrorsX && (!isOutside || Option0X)) {
3083 arrow.PaintArrow(xr1,
y, xr2,
y, asize, ArrowOptX);
3086 gPad->PaintLine(xr1,
y, xr2,
y);
3097 gPad->PaintPolyLine(4, xb, yb);
3099 gPad->PaintLine(xr2,
y - ty, xr2,
y + ty);
3111 tg->TAttFill::Copy(tgDummy);
3112 tg->TAttLine::Copy(tgDummy);
3113 tg->TAttMarker::Copy(tgDummy);
3115 for (
Int_t j = 0; j < NYErrors; j++)
3116 if (Option3[j] && DrawErrors[j]) {
3117 if (IndividualStyles) {
3118 tg->GetAttFill(j)->
Copy(tgDummy);
3119 tg->GetAttLine(j)->Copy(tgDummy);
3127 PaintGraph(&tgDummy, 2 * NPointsInside, xline.data(), yline[j].data(),
"FC");
3129 PaintGraph(&tgDummy, 2 * NPointsInside, xline.data(), yline[j].data(),
"F");
3130 gPad->SetLogx(logx);
3131 gPad->SetLogy(logy);
3142 std::vector<Double_t> xline, yline;
3147 const Int_t kBASEMARKER=8;
3148 Double_t s2x, s2y, symbolsize, sbase;
3149 Double_t x,
y, xl1, xl2, xr1, xr2, yup1, yup2, ylow1, ylow2, tx, ty;
3151 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};
3152 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};
3175 const char *arrowOpt =
nullptr;
3176 if (strchr(
option,
'>')) arrowOpt =
">";
3177 if (strstr(
option,
"|>")) arrowOpt =
"|>";
3196 xline.resize(2*theNpoints);
3197 yline.resize(2*theNpoints);
3198 if (xline.empty() || yline.empty()) {
3199 Error(
"PaintGraphBentErrors",
"too many points, out of memory");
3206 theGraph->TAttLine::Modify();
3221 sbase = symbolsize*kBASEMARKER;
3234 tx =
gPad->PixeltoX(dxend) -
gPad->PixeltoX(0);
3235 ty =-
gPad->PixeltoY(dxend) +
gPad->PixeltoY(0);
3236 Float_t asize = 0.6*symbolsize*kBASEMARKER/
gPad->GetWh();
3239 for (
Int_t i=0;i<theNpoints;i++) {
3240 x =
gPad->XtoPad(theX[i]);
3241 y =
gPad->YtoPad(theY[i]);
3242 bxl =
gPad->YtoPad(theY[i]+theEXlowd[i]);
3243 bxh =
gPad->YtoPad(theY[i]+theEXhighd[i]);
3244 byl =
gPad->XtoPad(theX[i]+theEYlowd[i]);
3245 byh =
gPad->XtoPad(theX[i]+theEYhighd[i]);
3248 if (x < gPad->GetUxmin())
x =
gPad->GetUxmin();
3249 if (
x >
gPad->GetUxmax())
x =
gPad->GetUxmax();
3250 if (y < gPad->GetUymin())
y =
gPad->GetUymin();
3251 if (
y >
gPad->GetUymax())
y =
gPad->GetUymax();
3253 if (x < gPad->GetUxmin())
continue;
3254 if (
x >
gPad->GetUxmax())
continue;
3255 if (y < gPad->GetUymin())
continue;
3256 if (
y >
gPad->GetUymax())
continue;
3262 x1b =
gPad->XtoPad(theX[i] - theEXlow[i]);
3263 y1b =
gPad->YtoPad(theY[i] - theEYlow[i]);
3264 x2b =
gPad->XtoPad(theX[i] + theEXhigh[i]);
3265 y2b =
gPad->YtoPad(theY[i] + theEYhigh[i]);
3266 if (x1b < gPad->GetUxmin()) x1b =
gPad->GetUxmin();
3267 if (x1b >
gPad->GetUxmax()) x1b =
gPad->GetUxmax();
3268 if (y1b < gPad->GetUymin()) y1b =
gPad->GetUymin();
3269 if (y1b >
gPad->GetUymax()) y1b =
gPad->GetUymax();
3270 if (x2b < gPad->GetUxmin()) x2b =
gPad->GetUxmin();
3271 if (x2b >
gPad->GetUxmax()) x2b =
gPad->GetUxmax();
3272 if (y2b < gPad->GetUymin()) y2b =
gPad->GetUymin();
3273 if (y2b >
gPad->GetUymax()) y2b =
gPad->GetUymax();
3274 if (option5)
box.PaintBox(x1b, y1b, x2b, y2b,
"l");
3275 else box.PaintBox(x1b, y1b, x2b, y2b);
3283 yline[if1-1] =
gPad->YtoPad(theY[i] + theEYhigh[i]);
3284 yline[if2-1] =
gPad->YtoPad(theY[i] - theEYlow[i]);
3291 xl2 =
gPad->XtoPad(theX[i] - theEXlow[i]);
3294 arrow.PaintArrow(xl1,
y,xl2,bxl,asize,arrowOpt);
3296 if (!brackets)
gPad->PaintLine(xl1,
y,xl2,bxl);
3299 xb[0] = xl2+tx; yb[0] = bxl-ty;
3300 xb[1] = xl2; yb[1] = bxl-ty;
3301 xb[2] = xl2; yb[2] = bxl+ty;
3302 xb[3] = xl2+tx; yb[3] = bxl+ty;
3303 gPad->PaintPolyLine(4, xb, yb);
3305 gPad->PaintLine(xl2,bxl-ty,xl2,bxl+ty);
3311 xr2 =
gPad->XtoPad(theX[i] + theEXhigh[i]);
3314 arrow.PaintArrow(xr1,
y,xr2,bxh,asize,arrowOpt);
3316 if (!brackets)
gPad->PaintLine(xr1,
y,xr2,bxh);
3319 xb[0] = xr2-tx; yb[0] = bxh-ty;
3320 xb[1] = xr2; yb[1] = bxh-ty;
3321 xb[2] = xr2; yb[2] = bxh+ty;
3322 xb[3] = xr2-tx; yb[3] = bxh+ty;
3323 gPad->PaintPolyLine(4, xb, yb);
3325 gPad->PaintLine(xr2,bxh-ty,xr2,bxh+ty);
3331 yup2 =
gPad->YtoPad(theY[i] + theEYhigh[i]);
3332 if (yup2 >
gPad->GetUymax()) yup2 =
gPad->GetUymax();
3335 arrow.PaintArrow(
x,yup1,byh,yup2,asize,arrowOpt);
3337 if (!brackets)
gPad->PaintLine(
x,yup1,byh,yup2);
3340 xb[0] = byh-tx; yb[0] = yup2-ty;
3341 xb[1] = byh-tx; yb[1] = yup2;
3342 xb[2] = byh+tx; yb[2] = yup2;
3343 xb[3] = byh+tx; yb[3] = yup2-ty;
3344 gPad->PaintPolyLine(4, xb, yb);
3346 gPad->PaintLine(byh-tx,yup2,byh+tx,yup2);
3352 ylow2 =
gPad->YtoPad(theY[i] - theEYlow[i]);
3353 if (ylow2 < gPad->GetUymin()) ylow2 =
gPad->GetUymin();
3354 if (ylow2 < ylow1) {
3356 arrow.PaintArrow(
x,ylow1,byl,ylow2,asize,arrowOpt);
3358 if (!brackets)
gPad->PaintLine(
x,ylow1,byl,ylow2);
3361 xb[0] = byl-tx; yb[0] = ylow2+ty;
3362 xb[1] = byl-tx; yb[1] = ylow2;
3363 xb[2] = byl+tx; yb[2] = ylow2;
3364 xb[3] = byl+tx; yb[3] = ylow2+ty;
3365 gPad->PaintPolyLine(4, xb, yb);
3367 gPad->PaintLine(byl-tx,ylow2,byl+tx,ylow2);
3381 if (option4)
PaintGraph(theGraph, 2*theNpoints, xline.data(), yline.data(),
"FC");
3382 else PaintGraph(theGraph, 2*theNpoints, xline.data(), yline.data(),
"F");
3383 gPad->SetLogx(logx);
3384 gPad->SetLogy(logy);
3395 std::vector<Double_t> xline, yline;
3400 const Int_t kBASEMARKER=8;
3401 Double_t s2x, s2y, symbolsize, sbase;
3402 Double_t x,
y,
ex,
ey, xl1, xl2, xr1, xr2, yup1, yup2, ylow1, ylow2, tx, ty;
3403 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};
3404 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};
3421 const char *arrowOpt =
nullptr;
3422 if (strchr(
option,
'>')) arrowOpt =
">";
3423 if (strstr(
option,
"|>")) arrowOpt =
"|>";
3442 xline.resize(2*theNpoints);
3443 yline.resize(2*theNpoints);
3444 if (xline.empty() || yline.empty()) {
3445 Error(
"Paint",
"too many points, out of memory");
3452 theGraph->TAttLine::Modify();
3467 sbase = symbolsize*kBASEMARKER;
3480 tx =
gPad->PixeltoX(dxend) -
gPad->PixeltoX(0);
3481 ty =-
gPad->PixeltoY(dxend) +
gPad->PixeltoY(0);
3482 Float_t asize = 0.6*symbolsize*kBASEMARKER/
gPad->GetWh();
3485 for (
Int_t i=0;i<theNpoints;i++) {
3486 x =
gPad->XtoPad(theX[i]);
3487 y =
gPad->YtoPad(theY[i]);
3490 if (x < gPad->GetUxmin())
x =
gPad->GetUxmin();
3491 if (
x >
gPad->GetUxmax())
x =
gPad->GetUxmax();
3492 if (y < gPad->GetUymin())
y =
gPad->GetUymin();
3493 if (
y >
gPad->GetUymax())
y =
gPad->GetUymax();
3495 if (x < gPad->GetUxmin())
continue;
3496 if (
x >
gPad->GetUxmax())
continue;
3497 if (y < gPad->GetUymin())
continue;
3498 if (
y >
gPad->GetUymax())
continue;
3506 x1b =
gPad->XtoPad(theX[i] -
ex);
3507 y1b =
gPad->YtoPad(theY[i] -
ey);
3508 x2b =
gPad->XtoPad(theX[i] +
ex);
3509 y2b =
gPad->YtoPad(theY[i] +
ey);
3510 if (x1b < gPad->GetUxmin()) x1b =
gPad->GetUxmin();
3511 if (x1b >
gPad->GetUxmax()) x1b =
gPad->GetUxmax();
3512 if (y1b < gPad->GetUymin()) y1b =
gPad->GetUymin();
3513 if (y1b >
gPad->GetUymax()) y1b =
gPad->GetUymax();
3514 if (x2b < gPad->GetUxmin()) x2b =
gPad->GetUxmin();
3515 if (x2b >
gPad->GetUxmax()) x2b =
gPad->GetUxmax();
3516 if (y2b < gPad->GetUymin()) y2b =
gPad->GetUymin();
3517 if (y2b >
gPad->GetUymax()) y2b =
gPad->GetUymax();
3518 if (option5)
box.PaintBox(x1b, y1b, x2b, y2b,
"l");
3519 else box.PaintBox(x1b, y1b, x2b, y2b);
3527 yline[if1-1] =
gPad->YtoPad(theY[i] +
ey);
3528 yline[if2-1] =
gPad->YtoPad(theY[i] -
ey);
3535 xl2 =
gPad->XtoPad(theX[i] -
ex);
3538 arrow.PaintArrow(xl1,
y,xl2,
y,asize,arrowOpt);
3540 if (!brackets)
gPad->PaintLine(xl1,
y,xl2,
y);
3543 xb[0] = xl2+tx; yb[0] =
y-ty;
3544 xb[1] = xl2; yb[1] =
y-ty;
3545 xb[2] = xl2; yb[2] =
y+ty;
3546 xb[3] = xl2+tx; yb[3] =
y+ty;
3547 gPad->PaintPolyLine(4, xb, yb);
3549 gPad->PaintLine(xl2,
y-ty,xl2,
y+ty);
3555 xr2 =
gPad->XtoPad(theX[i] +
ex);
3558 arrow.PaintArrow(xr1,
y,xr2,
y,asize,arrowOpt);
3560 if (!brackets)
gPad->PaintLine(xr1,
y,xr2,
y);
3563 xb[0] = xr2-tx; yb[0] =
y-ty;
3564 xb[1] = xr2; yb[1] =
y-ty;
3565 xb[2] = xr2; yb[2] =
y+ty;
3566 xb[3] = xr2-tx; yb[3] =
y+ty;
3567 gPad->PaintPolyLine(4, xb, yb);
3569 gPad->PaintLine(xr2,
y-ty,xr2,
y+ty);
3575 yup2 =
gPad->YtoPad(theY[i] +
ey);
3576 if (yup2 >
gPad->GetUymax()) yup2 =
gPad->GetUymax();
3579 arrow.PaintArrow(
x,yup1,
x,yup2,asize,arrowOpt);
3581 if (!brackets)
gPad->PaintLine(
x,yup1,
x,yup2);
3584 xb[0] =
x-tx; yb[0] = yup2-ty;
3585 xb[1] =
x-tx; yb[1] = yup2;
3586 xb[2] =
x+tx; yb[2] = yup2;
3587 xb[3] =
x+tx; yb[3] = yup2-ty;
3588 gPad->PaintPolyLine(4, xb, yb);
3590 gPad->PaintLine(
x-tx,yup2,
x+tx,yup2);
3596 ylow2 =
gPad->YtoPad(theY[i] -
ey);
3597 if (ylow2 < gPad->GetUymin()) ylow2 =
gPad->GetUymin();
3598 if (ylow2 < ylow1) {
3600 arrow.PaintArrow(
x,ylow1,
x,ylow2,asize,arrowOpt);
3602 if (!brackets)
gPad->PaintLine(
x,ylow1,
x,ylow2);
3605 xb[0] =
x-tx; yb[0] = ylow2+ty;
3606 xb[1] =
x-tx; yb[1] = ylow2;
3607 xb[2] =
x+tx; yb[2] = ylow2;
3608 xb[3] =
x+tx; yb[3] = ylow2+ty;
3609 gPad->PaintPolyLine(4, xb, yb);
3611 gPad->PaintLine(
x-tx,ylow2,
x+tx,ylow2);
3625 if (option4)
PaintGraph(theGraph, 2*theNpoints, xline.data(), yline.data(),
"FC");
3626 else PaintGraph(theGraph, 2*theNpoints, xline.data(), yline.data(),
"F");
3627 gPad->SetLogx(logx);
3628 gPad->SetLogy(logy);
3640 Double_t rwrmin, rwrmax, rwtmin, rwtmax;
3644 Int_t theNpoints = theGraphPolar->
GetN();
3650 if (theNpoints<1)
return;
3665 if (thePolargram)
if (!
gPad->FindObject(thePolargram->
GetName())) thePolargram=0;
3666 if (!thePolargram) {
3679 if (!thePolargram) {
3681 rwrmin = theY[0]; rwrmax = theY[theNpoints-1];
3682 rwtmin = theX[0]; rwtmax = theX[theNpoints-1];
3684 for (ipt = 0; ipt < theNpoints; ipt++) {
3687 if (theX[ipt] -theEX[ipt] < rwtmin) rwtmin = theX[ipt]-theEX[ipt];
3688 if (theX[ipt] +theEX[ipt] > rwtmax) rwtmax = theX[ipt]+theEX[ipt];
3690 if (theX[ipt] < rwtmin) rwtmin=theX[ipt];
3691 if (theX[ipt] > rwtmax) rwtmax=theX[ipt];
3694 if (theY[ipt] -theEY[ipt] < rwrmin) rwrmin = theY[ipt]-theEY[ipt];
3695 if (theY[ipt] +theEY[ipt] > rwrmax) rwrmax = theY[ipt]+theEY[ipt];
3697 if (theY[ipt] < rwrmin) rwrmin=theY[ipt];
3698 if (theY[ipt] > rwrmax) rwrmax=theY[ipt];
3702 if (rwrmin == rwrmax) rwrmax += 1.;
3703 if (rwtmin == rwtmax) rwtmax += 1.;
3710 rwtmax += dt/theNpoints;
3712 rwrmin = thePolargram->
GetRMin();
3713 rwrmax = thePolargram->
GetRMax();
3714 rwtmin = thePolargram->
GetTMin();
3715 rwtmax = thePolargram->
GetTMax();
3720 thePolargram =
new TGraphPolargram(
"Polargram",rwrmin,rwrmax,rwtmin,rwtmax);
3724 if (nolabel) thePolargram->
Draw(
"N");
3725 else thePolargram->
Draw(
"");
3734 Double_t radiusNDC = rwrmax-rwrmin;
3744 for (i=0; i<theNpoints; i++) {
3745 Double_t eymin, eymax, exmin,exmax;
3746 exmin = (theY[i]-theEY[i]-rwrmin)/radiusNDC*
3748 eymin = (theY[i]-theEY[i]-rwrmin)/radiusNDC*
3750 exmax = (theY[i]+theEY[i]-rwrmin)/radiusNDC*
3752 eymax = (theY[i]+theEY[i]-rwrmin)/radiusNDC*
3754 theGraphPolar->TAttLine::Modify();
3755 if (exmin != exmax || eymin != eymax)
gPad->PaintLine(exmin,eymin,exmax,eymax);
3759 for (i=0; i<theNpoints; i++) {
3760 Double_t rad = (theY[i]-rwrmin)/radiusNDC;
3763 theGraphPolar->TAttLine::Modify();
3764 if (phimin != phimax) thePolargram->
PaintCircle(0,0,rad,phimin,phimax,0);
3770 if (!(
gPad->GetLogx()) && !(
gPad->GetLogy())) {
3771 Double_t a,
b,
c=1,
x1,
x2,
y1,
y2, discr, norm1, norm2, xts, yts;
3779 for (i=0; i<theNpoints; i++) {
3782 xt = (theY[i]-rwrmin)/radiusNDC*
TMath::Cos(
c*(theX[i]-rwtmin)/thetaNDC);
3783 yt = (theY[i]-rwrmin)/radiusNDC*
TMath::Sin(
c*(theX[i]-rwtmin)/thetaNDC);
3784 norm = sqrt(xt*xt+yt*yt);
3789 if (!previouspointin) {
3794 a = (yt-yts)/(xt-xts);
3796 discr = 4*(
a*
a-
b*
b+1);
3797 x1 = (-2*
a*
b+sqrt(discr))/(2*(
a*
a+1));
3798 x2 = (-2*
a*
b-sqrt(discr))/(2*(
a*
a+1));
3801 norm1 = sqrt((
x1-xt)*(
x1-xt)+(
y1-yt)*(
y1-yt));
3802 norm2 = sqrt((
x2-xt)*(
x2-xt)+(
y2-yt)*(
y2-yt));
3803 previouspointin =
kFALSE;
3805 if (norm1 < norm2) {
3815 PaintGraph(theGraphPolar, j+1, theXpol, theYpol, opt);
3820 if (j>=1 && !previouspointin) {
3821 a = (yt-theYpol[j])/(xt-theXpol[j]);
3822 b = theYpol[j]-
a*theXpol[j];
3823 previouspointin =
kTRUE;
3824 discr = 4*(
a*
a-
b*
b+1);
3825 x1 = (-2*
a*
b+sqrt(discr))/(2*(
a*
a+1));
3826 x2 = (-2*
a*
b-sqrt(discr))/(2*(
a*
a+1));
3829 norm1 = sqrt((
x1-xt)*(
x1-xt)+(
y1-yt)*(
y1-yt));
3830 norm2 = sqrt((
x2-xt)*(
x2-xt)+(
y2-yt)*(
y2-yt));
3832 if (norm1 < norm2) {
3839 PaintGraph(theGraphPolar, j+1, theXpol, theYpol, opt);
3846 PaintGraph(theGraphPolar, j+1, theXpol, theYpol, opt);
3849 for (i=0; i<theNpoints; i++) {
3853 PaintGraph(theGraphPolar, theNpoints, theXpol, theYpol,opt);
3861 TIter next(
gPad->GetListOfPrimitives());
3862 while (
auto obj = next()) {
3866 if (strcmp(title->
GetName(),
"title")) {title =
nullptr;
continue;}
3870 if (title)
delete title;
3876 if (ht <= 0) ht = 0.05;
3897 if (talh < 1) talh = 1;
else if (talh > 3) talh = 3;
3899 if (talv < 1) talv = 1;
else if (talv > 3) talv = 3;
3941 TF1 *theF = theGraphQQ->
GetF();
3944 Error(
"TGraphQQ::Paint",
"2nd dataset or theoretical function not specified");
3959 Double_t yxmin, xymin, yxmax, xymax;
3965 TLine line1, line2, line3;
3968 yxmin = (theYq2-theYq1)*(
xmin-theXq1)/(theXq2-theXq1) + theYq1;
3970 xymin = (theXq2-theXq1)*(
ymin-theYq1)/(theYq2-theYq1) + theXq1;
3976 line2.
PaintLine(xqmin, yqmin, xqmax, yqmax);
3978 yxmax = (theYq2-theYq1)*(
xmax-theXq1)/(theXq2-theXq1) + theYq1;
3980 xymax = (theXq2-theXq1)*(
ymax-theYq1)/(theYq2-theYq1) + theXq1;
4023 if (lxp) opth.
Append(
"x+");
4024 if (lyp) opth.
Append(
"y+");
4038 XA1 =
gPad->GetUxmin();
4039 XA2 =
gPad->GetUxmax();
4040 YA1 =
gPad->GetUymin();
4041 YA2 =
gPad->GetUymax();
4046 std::vector<Double_t> newX(
N);
4047 std::vector<Double_t> newY(
N);
4059 if (
gPad->GetGridx()) {
4060 GL = (YA2 - YA1) / (
gPad->GetY2() -
gPad->GetY1());
4066 auto *theNewAxis =
new TGaxis(
gPad->GetUxmax(),
4077 theNewAxis->SetTickLength(TLX);
4079 theNewAxis->Paint();
4082 for (
Int_t i=0; i<
N; i++) newX[i] = dX-X[i];
4084 for (
Int_t i=0; i<
N; i++) newX[i] = X[i];
4095 if (
gPad->GetGridy()) {
4096 GL = (XA2 - XA1) / (
gPad->GetX2() -
gPad->GetX1());
4113 theNewAxis->SetTickLength(-TLY);
4114 theNewAxis->SetLabelOffset(LOY-TLY);
4115 theNewAxis->Paint();
4118 for (
Int_t i=0; i<
N; i++) newY[i] = dY-Y[i];
4120 for (
Int_t i=0; i<
N; i++) newY[i] = Y[i];
4125 for (
Int_t i=0; i<
N; i++) theNewGraph->
SetPoint(i, newX[i], newY[i]);
4158 if (!functions)
return;
4167 obj->Paint(lnk->GetOption());
4187 std::vector<Double_t> xf(2*
n);
4188 std::vector<Double_t> yf(2*
n);
4189 std::vector<Double_t> xt(
n);
4190 std::vector<Double_t> yt(
n);
4191 Double_t x1,
x2,
y1,
y2,
x3, y3, xm, ym,
a, a1, a2, a3;
4194 Int_t ix1,iy1,ix2,iy2;
4198 gPad->GetPadPar(x1p,y1p,x2p,y2p);
4199 ix1 = (
Int_t)(iw*x1p);
4200 iy1 = (
Int_t)(ih*y1p);
4201 ix2 = (
Int_t)(iw*x2p);
4202 iy2 = (
Int_t)(ih*y2p);
4214 gPad->GetRange(rx1,ry1,rx2,ry2);
4215 Double_t rx = (x2ndc-x1ndc)/(rx2-rx1);
4216 Double_t ry = (y2ndc-y1ndc)/(ry2-ry1);
4220 xf[0] = rx*(
x[0]-rx1)+x1ndc;
4221 yf[0] = ry*(
y[0]-ry1)+y1ndc;
4223 for (i=1; i<
n; i++) {
4224 if (
x[i]==
x[i-1] &&
y[i]==
y[i-1])
continue;
4226 xf[nf] = rx*(
x[i]-rx1)+x1ndc;
4227 if (xf[i]==xf[i-1]) xf[i] += 0.000001;
4228 yf[nf] = ry*(
y[i]-ry1)+y1ndc;
4247 if (xf[nf]==xf[nf-1]) {
4252 if (xf[nf]>=xf[nf-1]) {
4261 for (i=1; i<nf; i++) {
4273 if (xi1<xi0) a1 = a1+3.14159;
4279 if (xi0<xi2) a2 = a2+3.14159;
4294 if ((xm-xi0)*(
x3-xi0)<0 && (ym-yi0)*(y3-yi0)<0) {
4298 if ((xm==
x1) && (ym==
y1)) {
4307 if (xf[nf]==xf[0] && yf[nf]==yf[0]) {
4308 xm = (xt[nf]+xt[0])*0.5;
4309 ym = (yt[nf]+yt[0])*0.5;
4317 if ((xm-xf[0])*(
x3-xf[0])<0 && (ym-yf[0])*(y3-yf[0])<0) {
4331 for (i=nf2; i>0; i--) {
4332 for (j=i-1; j>0; j--) {
4333 if (xt[i-1]==xt[i] || xt[j-1]==xt[j])
continue;
4334 c1 = (yt[i-1]-yt[i])/(xt[i-1]-xt[i]);
4335 b1 = yt[i]-
c1*xt[i];
4336 c2 = (yt[j-1]-yt[j])/(xt[j-1]-xt[j]);
4337 b2 = yt[j]-
c2*xt[j];
4339 xc = (b2-b1)/(
c1-
c2);
4345 nf++; xf[nf] = xt[i]; yf[nf] = yt[i];
4346 nf++; xf[nf] = xc ; yf[nf] = yc;
4364 nf++; xf[nf] = xt[0]; yf[nf] = yt[0];
4367 for (i=0; i<nf+1; i++) {
4368 xf[i] = (1/rx)*(xf[i]-x1ndc)+rx1;
4369 yf[i] = (1/ry)*(yf[i]-y1ndc)+ry1;
4373 gPad->PaintFillArea(nf+1,xf.data(),yf.data());
4374 theGraph->TAttLine::Modify();
4387 TIter next(functions);
4388 while (
auto obj = next()) {
4398 if (!dofit)
fit = 0;
4400 if (dofit == 1) dofit = 111;
4402 Int_t print_fval = dofit%10;
4403 Int_t print_ferrors = (dofit/10)%10;
4404 Int_t print_fchi2 = (dofit/100)%10;
4405 Int_t print_fprob = (dofit/1000)%10;
4406 Int_t nlinesf = print_fval + print_fchi2 + print_fprob;
4408 if (print_fval < 2) nlinesf +=
fit->GetNumberFreeParameters();
4409 else nlinesf +=
fit->GetNpar();
4448 if (print_fchi2) stats->
AddText(t);
4454 if (print_fval || print_ferrors) {
4456 for (
Int_t ipar=0;ipar<
fit->GetNpar();ipar++) {
4457 fit->GetParLimits(ipar,parmin,parmax);
4458 if (print_fval < 2 && parmin*parmax != 0 && parmin >= parmax)
continue;
4459 if (print_ferrors) {
4472 if (!done) functions->
Add(stats);
4502 Int_t i, k, kp, km, npointsMax, banksize, n2, npt;
4503 Int_t maxiterations, finished;
4504 Int_t jtype, ktype, closed;
4505 Double_t sxmin, sxmax, symin, symax;
4508 Double_t ratio_signs, xratio, yratio;
4514 Double_t co, so, ct, st, ctu, stu, xnt;
4515 Double_t dx1, dy1, dx2, dy2, dk1, dk2;
4522 c = t = co = so = ct = st = ctu = stu = dx1 = dy1 = dx2 = dy2 = 0;
4523 xt = yt = xa = xb = ya = yb = u1 = u2 = u3 = tj = sb = 0;
4525 npointsMax = npoints*10;
4529 std::vector<Double_t> qlx(npointsMax);
4530 std::vector<Double_t> qly(npointsMax);
4531 if (qlx.empty() || qly.empty()) {
4532 Error(
"Smooth",
"not enough space in memory");
4539 jtype = (drawtype%1000)-10;
4540 if (jtype > 0) { ktype = jtype; loptx =
kTRUE; }
4541 else ktype = drawtype%1000;
4570 for (i=1;i<npoints;i++) {
4572 if ((
x[i]-
x[i-1])*(
x[i-1]-
x[i-2]) < 0) six++;
4573 if ((
y[i]-
y[i-1])*(
y[i-1]-
y[i-2]) < 0) siy++;
4575 if (
x[i] < sxmin) sxmin =
x[i];
4576 if (
x[i] > sxmax) sxmax =
x[i];
4577 if (
y[i] < symin) symin =
y[i];
4578 if (
y[i] > symax) symax =
y[i];
4583 if (dx1n < 0.01*(sxmax-sxmin) && dy1n < 0.01*(symax-symin)) closed = 1;
4584 if (sxmin == sxmax) {
4587 if (six > 1) ratio_signs = siy/six;
4588 else ratio_signs = 20;
4589 xratio = ratio_signs/(sxmax-sxmin);
4591 if (symin == symax) yratio = 1;
4592 else yratio = 1/(symax-symin);
4596 for (i=0;i<npoints;i++) {
4597 x[i] = (
x[i]-sxmin)*xratio;
4598 y[i] = (
y[i]-symin)*yratio;
4617 if (
x[0] !=
x[npoints-1] ||
y[0] !=
y[npoints-1])
goto L40;
4618 if (
x[npoints-2] ==
x[npoints-1] &&
y[npoints-2] ==
y[npoints-1])
goto L40;
4619 if (
x[0] ==
x[1] &&
y[0] ==
y[1])
goto L40;
4642 if (npt > 1)
goto L310;
4646 if (
x[k-1] ==
x[k-2] &&
y[k-1] ==
y[k-2])
goto L50;
4651 if (npt > 1)
goto L310;
4654 if (k < npoints)
goto L90;
4655 if (!flgic) { kp = 2;
goto L130;}
4658 if (flgis)
goto L150;
4668 if (
x[k-1] ==
x[k] &&
y[k-1] ==
y[k])
goto L80;
4676 if (!flgis)
goto L50;
4691 dx1 =
x[k-1] -
x[km-1];
4692 dy1 =
y[k-1] -
y[km-1];
4693 dk1 = dx1*dx1 + dy1*dy1;
4694 dx2 =
x[kp-1] -
x[k-1];
4695 dy2 =
y[kp-1] -
y[k-1];
4696 dk2 = dx2*dx2 + dy2*dy2;
4697 ctu = dx1*dk2 + dx2*dk1;
4698 stu = dy1*dk2 + dy2*dk1;
4699 xnt = ctu*ctu + stu*stu;
4713 if (flgis)
goto L160;
4717 w3 = 2*(dx1*dy2-dx2*dy1);
4729 w3 = 2*(dx1*dy2-dx2*dy1);
4738 if (k <= 1)
goto L120;
4768 xa = (
a*t-2*dx)/tcube;
4769 xb = (3*dx-(co+
a)*t)/tsquare;
4770 ya = (
b*t-2*dy)/tcube;
4771 yb = (3*dy-(so+
b)*t)/tsquare;
4802 p2 = (u1*tj-u3)*3*tj+u2;
4832 z = s*sth*(s-s*sth)*(w1*sth+w1+w2);
4833 z = z*z/((
a*
a+
b*
b)*(delta*delta));
4834 z = (z+2.642937)*z/((.3715652*z+3.063444)*z+.2441889)-cc;
4838 if (iw > 0)
goto L250;
4839 if (z > err)
goto L240;
4844 if (iw+2 == 0)
goto L190;
4845 if (iw+2 > 0)
goto L290;
4863 theGraph->
Zero(kp,0,sb,err,s,z,maxiterations);
4864 if (kp == 2)
goto L210;
4866 Error(
"Smooth",
"Attempt to plot outside plot limits");
4869 if (iw > 0)
goto L200;
4895 qlx[npt] = sxmin + xt/xratio;
4896 qly[npt] = symin + yt/yratio;
4903 if (npt < banksize)
goto L320;
4904 if (drawtype >= 1000 || ktype > 1) {
4905 Int_t newsize = banksize + n2;
4906 std::vector<Double_t> qtemp(banksize);
4907 for (i=0;i<banksize;i++) qtemp[i] = qlx[i];
4908 qlx.resize(newsize);
4909 for (i=0;i<banksize;i++) qlx[i] = qtemp[i];
4910 for (i=0;i<banksize;i++) qtemp[i] = qly[i];
4911 qly.resize(newsize);
4912 for (i=0;i<banksize;i++) qly[i] = qtemp[i];
4920 if (drawtype >= 1000) {
4921 gPad->PaintFillArea(npt,qlx.data(),qly.data(),
"B");
4925 qlx[npt] = qlx[npt-1];
4926 qlx[npt+1] = qlx[0];
4932 qly[npt] = qly[npt-1];
4933 qly[npt+1] = qly[0];
4935 gPad->PaintFillArea(npt+2,qlx.data(),qly.data());
4938 gPad->PaintPolyLine(npt,qlx.data(),qly.data());
4941 qlx[0] = sxmin + xt/xratio;
4942 qly[0] = symin + yt/yratio;
4944 if (finished > 0)
goto L390;
4945 if (finished < 0) { finished = 0;
goto L110;}
4946 if (s > 0)
goto L180;
4952 for (i=0;i<npoints;i++) {
4953 x[i] = sxmin +
x[i]/xratio;
4954 y[i] = symin +
y[i]/yratio;
const Int_t kMaxPixel
Max value for an int.
RooFitResult * fit(const char *options)
static const double x3[11]
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
char * Form(const char *fmt,...)
Formats a string in a circular formatting buffer.
R__EXTERN TStyle * gStyle
Draw all kinds of Arrows.
virtual Color_t GetLabelColor() const
virtual Color_t GetAxisColor() const
virtual Float_t GetLabelOffset() const
virtual void SetAxisColor(Color_t color=1, Float_t alpha=1.)
Set color of the line axis and tick marks.
virtual Style_t GetLabelFont() const
virtual void SetLabelOffset(Float_t offset=0.005)
Set distance between the axis and the labels.
virtual Float_t GetLabelSize() const
virtual Float_t GetTickLength() const
virtual void SetTickLength(Float_t length=0.03)
Set tick mark length.
virtual Color_t GetFillColor() const
Return the fill area color.
virtual Style_t GetFillStyle() const
Return the fill area style.
virtual void SetFillColor(Color_t fcolor)
Set the fill area color.
virtual void SetFillStyle(Style_t fstyle)
Set the fill area style.
virtual Color_t GetLineColor() const
Return the line color.
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.
virtual Style_t GetLineStyle() const
Return the line style.
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.
virtual Style_t GetMarkerStyle() const
Return the marker style.
virtual void SetMarkerColor(Color_t mcolor=1)
Set the marker color.
virtual Color_t GetMarkerColor() const
Return the marker color.
virtual Size_t GetMarkerSize() const
Return the marker size.
virtual void SetMarkerStyle(Style_t mstyle=1)
Set the marker style.
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 void SetLimits(Double_t xmin, Double_t xmax)
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)
Double_t * GetEX() const override
Double_t * GetEY() const override
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
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 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
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.
Double_t * GetYpol()
Return points in polar coordinates.
TGraphPolargram * GetPolargram()
void SetPolargram(TGraphPolargram *p)
void SetOptionAxis(Bool_t opt)
Double_t * GetXpol()
Return points in polar coordinates.
void PaintCircle(Double_t x, Double_t y, Double_t r, Double_t phimin, Double_t phimax, Double_t theta)
This is simplified from TEllipse::PaintEllipse.
void Draw(Option_t *options="") override
Draw Polargram.
This class allows to draw quantile-quantile plots.
A TGraph is an object made of two arrays X and Y with npoints each.
virtual void SetPoint(Int_t i, Double_t x, Double_t y)
Set x and y values for point number i.
virtual Double_t * GetEXhighd() const
virtual Bool_t IsEditable() const
@ kClipFrame
Clip to the frame boundary.
@ kNoStats
Don't draw stats box.
Double_t GetMinimum() const
virtual Double_t * GetEYlow() const
virtual Double_t * GetEX() const
Double_t GetMaximum() const
virtual Double_t * GetEXlowd() const
virtual void ComputeRange(Double_t &xmin, Double_t &ymin, Double_t &xmax, Double_t &ymax) const
Compute the x/y range of the points in this graph.
virtual Double_t * GetEYlowd() const
void Zero(Int_t &k, Double_t AZ, Double_t BZ, Double_t E2, Double_t &X, Double_t &Y, Int_t maxiterations)
Find zero of a continuous function.
TList * GetListOfFunctions() const
virtual Bool_t IsHighlight() const
virtual Double_t * GetEYhighd() const
TAxis * GetXaxis() const
Get x axis of the graph.
virtual Double_t * GetEXhigh() const
virtual Double_t * GetEYhigh() const
TAxis * GetYaxis() const
Get y axis of the graph.
TH1F * GetHistogram() const
Returns a pointer to the histogram used to draw the axis Takes into account the two following cases.
virtual Double_t * GetEY() const
virtual void SetHistogram(TH1F *h)
virtual Double_t * GetEXlow() const
virtual Int_t GetPoint(Int_t i, Double_t &x, Double_t &y) const
Get x and y values for point number i.
1-D histogram with a float per channel (see TH1 documentation)}
virtual void SetDirectory(TDirectory *dir)
By default, when a histogram is created, it is added to the list of histogram objects in the current ...
Int_t DistancetoPrimitive(Int_t px, Int_t py) override
Compute distance from point px,py to a line.
virtual Double_t GetMinimumStored() const
@ kNoTitle
Don't draw the histogram title.
@ kNoStats
Don't draw stats box.
virtual Double_t GetMaximum(Double_t maxval=FLT_MAX) const
Return maximum value smaller than maxval of bins in the range, unless the value has been overridden b...
virtual void SetMaximum(Double_t maximum=-1111)
virtual Int_t GetNdivisions(Option_t *axis="X") const
Return the number of divisions for "axis".
virtual void SetMinimum(Double_t minimum=-1111)
void Paint(Option_t *option="") override
Control routine to paint any kind of histograms.
virtual Double_t GetMaximumStored() const
virtual Double_t GetMinimum(Double_t minval=-FLT_MAX) const
Return minimum value larger than minval of bins in the range, unless the value has been overridden by...
virtual void Sumw2(Bool_t flag=kTRUE)
Create structure to store sum of squares of weights.
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.
TObject * Next() override
Return next object in the list. Returns 0 when no more objects in list.
void Add(TObject *obj) override
TObject * First() const override
Return the first object in the list. Returns 0 when list is empty.
virtual TObjLink * FirstLink() const
TObject * Clone(const char *newname="") const override
Make a clone of an object using the Streamer facility.
void Copy(TObject &named) const override
Copy this to obj.
virtual void SetTitle(const char *title="")
Set the title of the TNamed.
const char * GetName() const override
Returns name of object.
const char * GetTitle() const override
Returns title of object.
TObject * GetObject() const
Mother of all ROOT objects.
virtual const char * GetName() const
Returns name of object.
R__ALWAYS_INLINE Bool_t TestBit(UInt_t f) const
virtual Option_t * GetDrawOption() const
Get option used by the graphics system to draw this object.
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 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.
void Draw(Option_t *option="") override
Draw this pavetext with its current attributes.
void Paint(Option_t *option="") override
Paint this pavetext with its current attributes.
virtual TText * GetLine(Int_t number) const
Get Pointer to line number in this pavetext.
const char * GetName() const override
Returns name of object.
virtual void SetName(const char *name="")
virtual void SetBorderSize(Int_t bordersize=4)
Double_t GetX1NDC() const
virtual void SetX2NDC(Double_t x2)
Regular expression class.
TString Copy() const
Copy a string.
void ToLower()
Change string to lower-case.
int CompareTo(const char *cs, ECaseCompare cmp=kExact) const
Compare a string to char *cs2.
Ssiz_t First(char c) const
Find first occurrence of a character c.
const char * Data() const
TString & ReplaceAll(const TString &s1, const TString &s2)
void ToUpper()
Change string to upper case.
Int_t CountChar(Int_t c) const
Return number of times character c occurs in the string.
TString & Append(const char *cs)
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
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
Style_t GetStatFont() const
Float_t GetTitleFontSize() 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)
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.