690 if (
gPad->GetLogx()) {
691 for (i=0;i<npoints;i++) {
696 if (!opt &&
gPad->GetLogy()) {
697 for (i=0;i<npoints;i++) {
718 if (distance <= 5)
return distance;
722 const Int_t big = 9999;
723 const Int_t kMaxDiff = 10;
730 if (px <= puxmin)
return big;
731 if (py >= puymin)
return big;
732 if (px >= puxmax)
return big;
733 if (py <= puymax)
return big;
743 theX = theGraphPolar->
GetXpol();
744 theY = theGraphPolar->
GetYpol();
746 theX = theGraph->
GetX();
747 theY = theGraph->
GetY();
751 for (i=0;i<theNpoints;i++) {
752 pxp =
gPad->XtoAbsPixel(
gPad->XtoPad(theX[i]));
753 pyp =
gPad->YtoAbsPixel(
gPad->YtoPad(theY[i]));
763 if (distance < kMaxDiff)
return distance;
765 for (i=0;i<theNpoints-1;i++) {
768 if (
d < distance) distance =
d;
783 TIter next(functions);
786 if (
f->InheritsFrom(TF1::Class())) dist =
f->DistancetoPrimitive(-px,py);
787 else dist =
f->DistancetoPrimitive(px,py);
788 if (dist < kMaxDiff) {
789 gPad->SetSelected(
f);
805 Error(
"DrawPanel",
"need to draw graph first");
810 gROOT->ProcessLine(
Form(
"((TCanvas*)0x%zx)->Selected((TVirtualPad*)0x%zx,(TObject*)0x%zx,1)",
811 (
size_t)
gPad->GetCanvas(), (
size_t)
gPad, (
size_t)theGraph));
833 const Int_t kMaxDiff = 10;
834 static Bool_t middle, badcase;
835 static Int_t ipoint, pxp, pyp;
836 static Int_t px1,px2,py1,py2;
837 static Int_t pxold, pyold, px1old, py1old, px2old, py2old;
838 static Int_t dpx, dpy;
846 if (!
gPad->IsEditable())
return;
856 theGraph->TAttLine::Modify();
857 px1 =
gPad->XtoAbsPixel(
gPad->GetX1());
858 py1 =
gPad->YtoAbsPixel(
gPad->GetY1());
859 px2 =
gPad->XtoAbsPixel(
gPad->GetX2());
860 py2 =
gPad->YtoAbsPixel(
gPad->GetY2());
865 x =
new Int_t[theNpoints+1];
866 y =
new Int_t[theNpoints+1];
867 for (i=0;i<theNpoints;i++) {
868 pxp =
gPad->XtoAbsPixel(
gPad->XtoPad(theX[i]));
869 pyp =
gPad->YtoAbsPixel(
gPad->YtoPad(theY[i]));
870 if (pxp < -kMaxPixel || pxp >=
kMaxPixel ||
876 gVirtualX->DrawLine(pxp-4, pyp-4, pxp+4, pyp-4);
877 gVirtualX->DrawLine(pxp+4, pyp-4, pxp+4, pyp+4);
878 gVirtualX->DrawLine(pxp+4, pyp+4, pxp-4, pyp+4);
879 gVirtualX->DrawLine(pxp-4, pyp+4, pxp-4, pyp-4);
884 if (
d < kMaxDiff) ipoint =i;
890 if (ipoint < 0)
return;
894 px2old =
gPad->XtoAbsPixel(theX[1]);
895 py2old =
gPad->YtoAbsPixel(theY[1]);
896 }
else if (ipoint == theNpoints-1) {
897 px1old =
gPad->XtoAbsPixel(
gPad->XtoPad(theX[theNpoints-2]));
898 py1old =
gPad->YtoAbsPixel(
gPad->YtoPad(theY[theNpoints-2]));
902 px1old =
gPad->XtoAbsPixel(
gPad->XtoPad(theX[ipoint-1]));
903 py1old =
gPad->YtoAbsPixel(
gPad->YtoPad(theY[ipoint-1]));
904 px2old =
gPad->XtoAbsPixel(
gPad->XtoPad(theX[ipoint+1]));
905 py2old =
gPad->YtoAbsPixel(
gPad->YtoPad(theY[ipoint+1]));
907 pxold =
gPad->XtoAbsPixel(
gPad->XtoPad(theX[ipoint]));
908 pyold =
gPad->YtoAbsPixel(
gPad->YtoPad(theY[ipoint]));
916 for (i=0;i<theNpoints;i++) {
917 pxp =
gPad->XtoAbsPixel(
gPad->XtoPad(theX[i]));
918 pyp =
gPad->YtoAbsPixel(
gPad->YtoPad(theY[i]));
920 if (
d < kMaxDiff) middle =
kFALSE;
932 for(i=0;i<theNpoints-1;i++) {
933 gVirtualX->DrawLine(
x[i]+dpx,
y[i]+dpy,
x[i+1]+dpx,
y[i+1]+dpy);
936 if (pxp < -kMaxPixel || pxp >=
kMaxPixel ||
937 pyp < -kMaxPixel || pyp >=
kMaxPixel)
continue;
938 gVirtualX->DrawLine(pxp-4, pyp-4, pxp+4, pyp-4);
939 gVirtualX->DrawLine(pxp+4, pyp-4, pxp+4, pyp+4);
940 gVirtualX->DrawLine(pxp+4, pyp+4, pxp-4, pyp+4);
941 gVirtualX->DrawLine(pxp-4, pyp+4, pxp-4, pyp-4);
943 pxp =
x[theNpoints-1]+dpx;
944 pyp =
y[theNpoints-1]+dpy;
945 gVirtualX->DrawLine(pxp-4, pyp-4, pxp+4, pyp-4);
946 gVirtualX->DrawLine(pxp+4, pyp-4, pxp+4, pyp+4);
947 gVirtualX->DrawLine(pxp+4, pyp+4, pxp-4, pyp+4);
948 gVirtualX->DrawLine(pxp-4, pyp+4, pxp-4, pyp-4);
953 for(i=0;i<theNpoints-1;i++) {
954 gVirtualX->DrawLine(
x[i]+dpx,
y[i]+dpy,
x[i+1]+dpx,
y[i+1]+dpy);
957 if (pxp < -kMaxPixel || pxp >=
kMaxPixel ||
958 pyp < -kMaxPixel || pyp >=
kMaxPixel)
continue;
959 gVirtualX->DrawLine(pxp-4, pyp-4, pxp+4, pyp-4);
960 gVirtualX->DrawLine(pxp+4, pyp-4, pxp+4, pyp+4);
961 gVirtualX->DrawLine(pxp+4, pyp+4, pxp-4, pyp+4);
962 gVirtualX->DrawLine(pxp-4, pyp+4, pxp-4, pyp-4);
964 pxp =
x[theNpoints-1]+dpx;
965 pyp =
y[theNpoints-1]+dpy;
966 gVirtualX->DrawLine(pxp-4, pyp-4, pxp+4, pyp-4);
967 gVirtualX->DrawLine(pxp+4, pyp-4, pxp+4, pyp+4);
968 gVirtualX->DrawLine(pxp+4, pyp+4, pxp-4, pyp+4);
969 gVirtualX->DrawLine(pxp-4, pyp+4, pxp-4, pyp-4);
971 if (px1old)
gVirtualX->DrawLine(px1old, py1old, pxold, pyold);
972 if (px2old)
gVirtualX->DrawLine(pxold, pyold, px2old, py2old);
973 gVirtualX->DrawLine(pxold-4, pyold-4, pxold+4, pyold-4);
974 gVirtualX->DrawLine(pxold+4, pyold-4, pxold+4, pyold+4);
975 gVirtualX->DrawLine(pxold+4, pyold+4, pxold-4, pyold+4);
976 gVirtualX->DrawLine(pxold-4, pyold+4, pxold-4, pyold-4);
983 if (px1old)
gVirtualX->DrawLine(px1old, py1old, pxold, pyold);
984 if (px2old)
gVirtualX->DrawLine(pxold, pyold, px2old, py2old);
985 gVirtualX->DrawLine(pxold-4, pyold-4, pxold+4, pyold-4);
986 gVirtualX->DrawLine(pxold+4, pyold-4, pxold+4, pyold+4);
987 gVirtualX->DrawLine(pxold+4, pyold+4, pxold-4, pyold+4);
988 gVirtualX->DrawLine(pxold-4, pyold+4, pxold-4, pyold-4);
997 dxr = dx/(1 -
gPad->GetLeftMargin() -
gPad->GetRightMargin());
998 dyr = dy/(1 -
gPad->GetBottomMargin() -
gPad->GetTopMargin());
1004 ymin - dyr*
gPad->GetBottomMargin(),
1014 for(i=0;i<theNpoints;i++) {
1015 if (badcase)
continue;
1016 if (
x) theX[i] =
gPad->PadtoX(
gPad->AbsPixeltoX(
x[i]+dpx));
1017 if (
y) theY[i] =
gPad->PadtoY(
gPad->AbsPixeltoY(
y[i]+dpy));
1026 theX[ipoint] =
gPad->PadtoX(
gPad->AbsPixeltoX(pxold));
1027 theY[ipoint] =
gPad->PadtoY(
gPad->AbsPixeltoY(pyold));
1031 theX[theNpoints-1] = theX[0];
1032 theY[theNpoints-1] = theY[0];
1034 if (ipoint == theNpoints-1) {
1035 theX[0] = theX[theNpoints-1];
1036 theY[0] = theY[theNpoints-1];
1048 if (
gROOT->IsEscaped()) {
1062 dxr = dx/(1 -
gPad->GetLeftMargin() -
gPad->GetRightMargin());
1063 dyr = dy/(1 -
gPad->GetBottomMargin() -
gPad->GetTopMargin());
1069 ymin - dyr*
gPad->GetBottomMargin(),
1075 for(i=0;i<theNpoints;i++) {
1076 if (badcase)
continue;
1077 if (
x) theX[i] =
gPad->PadtoX(
gPad->AbsPixeltoX(
x[i]+dpx));
1078 if (
y) theY[i] =
gPad->PadtoY(
gPad->AbsPixeltoY(
y[i]+dpy));
1081 theX[ipoint] =
gPad->PadtoX(
gPad->AbsPixeltoX(pxold));
1082 theY[ipoint] =
gPad->PadtoY(
gPad->AbsPixeltoY(pyold));
1086 theX[theNpoints-1] = theX[0];
1087 theY[theNpoints-1] = theY[0];
1089 if (ipoint == theNpoints-1) {
1090 theX[0] = theX[theNpoints-1];
1091 theY[0] = theY[theNpoints-1];
1145 const Int_t kHighlightRange = 50;
1146 static Int_t distanceOld = kHighlightRange;
1149 if ((distance < kHighlightRange) && (distance < distanceOld)) {
1187 if (
gPad->GetLogx()) {
1191 if (
gPad->GetLogy()) {
1195 if ((hx < uxmin) || (hx > uxmax))
return;
1196 if ((hy < uymin) || (hy > uymax))
return;
1220 strlcpy(chopt,option,80);
1223 char *l1 = strstr(chopt,
"pfc");
1224 char *l2 = strstr(chopt,
"plc");
1225 char *l3 = strstr(chopt,
"pmc");
1226 if (l1 || l2 || l3) {
1235 char *l4 = strstr(chopt,
"rx");
1236 char *l5 = strstr(chopt,
"ry");
1243 if (theGraph->
InheritsFrom(TGraphBentErrors::Class())) {
1245 }
else if (theGraph->
InheritsFrom(TGraphQQ::Class())) {
1247 }
else if (theGraph->
InheritsFrom(TGraphAsymmErrors::Class())) {
1249 }
else if (theGraph->
InheritsFrom(TGraphMultiErrors::Class())) {
1251 }
else if (theGraph->
InheritsFrom(TGraphErrors::Class())) {
1268 if (
f->InheritsFrom(TF1::Class())) fit = (
TF1*)
f;
1270 TIter next(functions);
1272 if (
f->InheritsFrom(TF1::Class())) {
1291 gPad->PushSelectableObject(theGraph);
1293 Int_t optionLine , optionAxis , optionCurve , optionStar , optionMark;
1294 Int_t optionBar , optionR , optionOne , optionE;
1295 Int_t optionFill , optionZ , optionCurveFill, optionIAxis;
1296 Int_t i, npt, nloop;
1299 Double_t barxmin, barxmax, barymin, barymax;
1306 Error(
"PaintGraph",
"illegal number of points (%d)", npoints);
1313 if (opt.
Contains(
"L")) optionLine = 1;
else optionLine = 0;
1314 if (opt.
Contains(
"A")) optionAxis = 1;
else optionAxis = 0;
1315 if (opt.
Contains(
"C")) optionCurve = 1;
else optionCurve = 0;
1316 if (opt.
Contains(
"*")) optionStar = 1;
else optionStar = 0;
1317 if (opt.
Contains(
"P")) optionMark = 1;
else optionMark = 0;
1318 if (opt.
Contains(
"B")) optionBar = 1;
else optionBar = 0;
1319 if (opt.
Contains(
"R")) optionR = 1;
else optionR = 0;
1320 if (opt.
Contains(
"1")) optionOne = 1;
else optionOne = 0;
1321 if (opt.
Contains(
"F")) optionFill = 1;
else optionFill = 0;
1322 if (opt.
Contains(
"I")) optionIAxis = 1;
else optionIAxis = 0;
1328 if (optionLine+optionFill+optionCurve+optionStar+optionMark+optionBar+optionE == 0) {
1329 if (!chopt[0]) optionLine=1;
1335 optionCurveFill = 0;
1336 if (optionCurve && optionFill) {
1337 optionCurveFill = 1;
1342 Double_t rwxmin,rwxmax, rwymin, rwymax, maximum, minimum, dx, dy;
1345 rwxmin =
gPad->GetUxmin();
1346 rwxmax =
gPad->GetUxmax();
1347 rwymin =
gPad->GetUymin();
1348 rwymax =
gPad->GetUymax();
1351 if (minimum == -1111) {
1355 if (maximum == -1111) {
1359 uxmin =
gPad->PadtoX(rwxmin);
1360 uxmax =
gPad->PadtoX(rwxmax);
1363 theGraph->
ComputeRange(rwxmin, rwymin, rwxmax, rwymax);
1365 if (rwxmin == rwxmax) rwxmax += 1.;
1366 if (rwymin == rwymax) rwymax += 1.;
1367 dx = 0.1*(rwxmax-rwxmin);
1368 dy = 0.1*(rwymax-rwymin);
1369 uxmin = rwxmin - dx;
1370 uxmax = rwxmax + dx;
1371 minimum = rwymin - dy;
1372 maximum = rwymax + dy;
1376 if (uxmin < 0 && rwxmin >= 0) uxmin = 0.9*rwxmin;
1377 if (uxmax > 0 && rwxmax <= 0) {
1378 if (
gPad->GetLogx()) uxmax = 1.1*rwxmax;
1381 if (minimum < 0 && rwymin >= 0) minimum = 0.9*rwymin;
1382 if (maximum > 0 && rwymax <= 0) {
1386 if (minimum <= 0 && gPad->GetLogy()) minimum = 0.001*maximum;
1387 if (uxmin <= 0 && gPad->GetLogx()) {
1388 if (uxmax > 1000) uxmin = 1;
1389 else uxmin = 0.001*uxmax;
1396 char chopth[8] =
" ";
1397 if (strstr(chopt,
"x+")) strncat(chopth,
"x+",3);
1398 if (strstr(chopt,
"y+")) strncat(chopth,
"y+",3);
1399 if (optionIAxis) strncat(chopth,
"A",2);
1406 if (theNpoints > npt) npt = theNpoints;
1418 if (
gPad->GetLogy()) {
1431 rwxmin =
gPad->GetUxmin();
1432 rwxmax =
gPad->GetUxmax();
1433 rwymin =
gPad->GetUymin();
1434 rwymax =
gPad->GetUymax();
1435 uxmin =
gPad->PadtoX(rwxmin);
1436 uxmax =
gPad->PadtoX(rwxmax);
1441 maximum =
gPad->PadtoY(rwymax);
1442 minimum =
gPad->PadtoY(rwymin);
1446 theGraph->TAttLine::Modify();
1447 theGraph->TAttFill::Modify();
1448 theGraph->TAttMarker::Modify();
1456 if (optionLine || optionFill) {
1462 if (optionFill && (xn !=
x1 || yn != y1)) nloop++;
1464 for (i=1;i<=nloop;i++) {
1507 if (optionCurveFill) {
1509 if (xn !=
x1 || yn != y1) nloop++;
1513 for (i=1;i<=nloop;i++) {
1538 for (i=1;i<=nloop;i++) {
1542 if (
y[i-1] < minimum ||
y[i-1] > maximum)
continue;
1543 if (
x[i-1] < uxmin ||
x[i-1] > uxmax)
continue;
1569 for (i=1;i<=npoints;i++) {
1584 for (i=1;i<=npoints;i++) {
1601 for (i=1;i<npoints;i++) {
1602 if (
x[i] < barxmin) barxmin =
x[i];
1603 if (
x[i] > barxmax) barxmax =
x[i];
1605 bdelta = (barxmax-barxmin)/
Double_t(npoints);
1609 for (i=1;i<npoints;i++) {
1610 if (
y[i] < barymin) barymin =
y[i];
1611 if (
y[i] > barymax) barymax =
y[i];
1613 bdelta = (barymax-barymin)/
Double_t(npoints);
1617 for (i=1;i<=npoints;i++) {
1618 xlow =
x[i-1] - dbar;
1619 xhigh =
x[i-1] + dbar;
1621 if (xlow < uxmin && xhigh < uxmin)
continue;
1622 if (xhigh > uxmax && xlow > uxmax)
continue;
1623 if (xlow < uxmin) xlow = uxmin;
1624 if (xhigh > uxmax) xhigh = uxmax;
1626 else ylow =
gPad->GetUymin();
1640 for (i=1;i<=npoints;i++) {
1642 ylow =
y[i-1] - dbar;
1643 yhigh =
y[i-1] + dbar;
1696 const char *where =
"PaintGrapHist";
1698 Int_t optionLine , optionAxis , optionCurve, optionStar, optionMark;
1699 Int_t optionBar , optionRot , optionOne , optionOff ;
1700 Int_t optionFill , optionZ;
1701 Int_t optionHist , optionBins , optionMarker;
1703 Int_t drawtype=0, drawborder, drawbordersav;
1709 Double_t xi, xi1, xj, xj1, yi1, yi, yj, yj1, xwmin, ywmin;
1713 char choptaxis[10] =
" ";
1716 Error(where,
"illegal number of points (%d)", npoints);
1721 if (opt.
Contains(
"H")) optionHist = 1;
else optionHist = 0;
1722 if (opt.
Contains(
"F")) optionFill = 1;
else optionFill = 0;
1723 if (opt.
Contains(
"C")) optionCurve= 1;
else optionCurve= 0;
1724 if (opt.
Contains(
"*")) optionStar = 1;
else optionStar = 0;
1725 if (opt.
Contains(
"R")) optionRot = 1;
else optionRot = 0;
1726 if (opt.
Contains(
"1")) optionOne = 1;
else optionOne = 0;
1727 if (opt.
Contains(
"B")) optionBar = 1;
else optionBar = 0;
1728 if (opt.
Contains(
"N")) optionBins = 1;
else optionBins = 0;
1729 if (opt.
Contains(
"L")) optionLine = 1;
else optionLine = 0;
1730 if (opt.
Contains(
"P")) optionMark = 1;
else optionMark = 0;
1731 if (opt.
Contains(
"A")) optionAxis = 1;
else optionAxis = 0;
1732 if (opt.
Contains(
"][")) optionOff = 1;
else optionOff = 0;
1733 if (opt.
Contains(
"P0")) optionMark = 10;
1735 Int_t optionFill2 = 0;
1737 optionFill = 0; optionFill2 = 1;
1752 nbins = last -
first + 1;
1764 Double_t rounding = (uxmax-uxmin)*1.e-5;
1767 Int_t nx1, nx2, ndivx, ndivy, ndiv;
1780 if (ndivx < 0) strlcat(choptaxis,
"N",10);
1781 if (
gPad->GetGridx()) {
1783 strlcat(choptaxis,
"W",10);
1785 if (
gPad->GetLogx()) {
1789 strlcat(choptaxis,
"G",10);
1799 axis->
PaintAxis(rwxmin,rwymin,rwxmax,rwymin,rwmin,rwmax,ndiv,choptaxis);
1809 strlcat(choptaxis,
"N",10);
1812 if (
gPad->GetGridy()) {
1814 strlcat(choptaxis,
"W",10);
1816 if (
gPad->GetLogy()) {
1820 strlcat(choptaxis,
"G",10);
1829 axis->
PaintAxis(rwxmin,rwymin,rwxmin,rwymax,rwmin,rwmax,ndiv,choptaxis);
1835 theGraph->TAttLine::Modify();
1836 theGraph->TAttFill::Modify();
1837 theGraph->TAttMarker::Modify();
1841 if (!optionRot) {wmin =
x[0]; wmax =
x[1];}
1842 else {wmin =
y[0]; wmax =
y[1];}
1844 if (!optionBins) delta = (wmax - wmin)/
Double_t(nbins);
1846 Int_t fwidth =
gPad->GetFrameLineWidth();
1849 if (optionOff) fwidth = 1;
1865 if (optionFill && !optionCurve) {
1873 for (j=
first; j<=last;j++) {
1880 xj1 =
x[j]; xj =
x[j-1];
1882 if (j != last)
Error(where,
"X must be in increasing order");
1883 else Error(where,
"X must have N+1 values with option N");
1891 if ((
gxwork[npt-1] >= uxmin-rounding &&
gxwork[npt-1] <= uxmax+rounding) ||
1892 (
gxwork[npt] >= uxmin-rounding &&
gxwork[npt] <= uxmax+rounding)) npt += 2;
1905 if (!fillarea)
gyworkl[0] = ylast;
1916 for (j=
first; j<=last;j++) {
1921 yj1 =
y[j]; yj =
y[j-1];
1923 if (j != last)
Error(where,
"Y must be in increasing order");
1924 else Error(where,
"Y must have N+1 values with option N");
1930 if ((
gxwork[npt-1] >= uxmin-rounding &&
gxwork[npt-1] <= uxmax+rounding) ||
1931 (
gxwork[npt] >= uxmin-rounding &&
gxwork[npt] <= uxmax+rounding)) npt += 2;
1938 if (!fillarea)
gyworkl[0] = ylast;
1945 theGraph->TAttLine::Modify();
1946 theGraph->TAttFill::Modify();
1951 if ((optionHist) || !chopt[0]) {
1958 for (i=
first; i<=last;i++) {
1963 xi1 =
x[i]; xi =
x[i-1];
1965 if (i != last)
Error(where,
"X must be in increasing order");
1966 else Error(where,
"X must have N+1 values with option N");
1974 if ((
gxwork[npt-1] >= uxmin-rounding &&
gxwork[npt-1] <= uxmax+rounding) ||
1975 (
gxwork[npt] >= uxmin-rounding &&
gxwork[npt] <= uxmax+rounding)) npt += 2;
1987 Int_t nbpoints = npt-2;
1993 for (ip=point1; ip<=nbpoints; ip++) {
2000 Int_t point2 = nbpoints;
2001 for (ip=point2; ip>=point1; ip--) {
2007 nbpoints = point2-point1+1;
2011 if (
gxwork[0] >
gPad->GetUxmin()) { nbpoints++; point1 = 0; }
2012 if (
gxwork[nbpoints] <
gPad->GetUxmax()) nbpoints++;
2024 for (i=
first; i<=last;i++) {
2029 yi1 =
y[i]; yi =
y[i-1];
2031 if (i != last)
Error(where,
"Y must be in increasing order");
2032 else Error(where,
"Y must have N+1 values with option N");
2038 if ((
gxwork[npt-1] >= uxmin-rounding &&
gxwork[npt-1] <= uxmax+rounding) ||
2039 (
gxwork[npt] >= uxmin-rounding &&
gxwork[npt] <= uxmax+rounding)) npt += 2;
2058 if (!optionOne) drawtype = 2;
2063 for (i=
first; i<=last;i++) {
2068 xi1 =
x[i]; xi =
x[i-1];
2070 if (i != last)
Error(where,
"X must be in increasing order");
2071 else Error(where,
"X must have N+1 values with option N");
2074 gxwork[npt-1] =
x[i-1] + 0.5*(
x[i]-
x[i-1]);
2105 drawtype = drawtype+10;
2107 for (i=
first; i<=last;i++) {
2112 yi1 =
y[i]; yi =
y[i-1];
2114 if (i != last)
Error(where,
"Y must be in increasing order");
2115 else Error(where,
"Y must have N+1 values with option N");
2118 gywork[npt-1] =
y[i-1] + 0.5*(
y[i]-
y[i-1]);
2151 wminstep = wmin + 0.5*delta;
2153 gPad->GetRangeAxis(ax1,ay1,ax2,ay2);
2157 for (i=
first; i<=last;i++) {
2162 xi1 =
x[i]; xi =
x[i-1];
2164 if (i != last)
Error(where,
"X must be in increasing order");
2165 else Error(where,
"X must have N+1 values with option N");
2168 gxwork[npt-1] =
x[i-1] + 0.5*(
x[i]-
x[i-1]);
2170 if (
gxwork[npt-1] < uxmin ||
gxwork[npt-1] > uxmax) { npt--;
continue;}
2173 if ((
gywork[npt-1] < rwymin) || ((
gywork[npt-1] > rwymax) && !optionFill2)) {
2210 for (i=
first; i<=last;i++) {
2213 gywork[npt-1] = wminstep+(i-
first)*delta+0.5*delta;
2215 yi1 =
y[i]; yi =
y[i-1];
2217 if (i != last)
Error(where,
"Y must be in increasing order");
2218 else Error(where,
"Y must have N+1 values with option N");
2221 gywork[npt-1] =
y[i-1] + 0.5*(
y[i]-
y[i-1]);
2224 if ((
gxwork[npt-1] < uxmin) || (
gxwork[npt-1] > uxmax)) {
2246 if (optionLine != 0 && npt > 1) {
2257 offset = delta*baroffset; dbar = delta*barwidth;
2260 offset = (
x[1]-
x[0])*baroffset;
2261 dbar = (
x[1]-
x[0])*barwidth;
2263 offset = (
y[1]-
y[0])*baroffset;
2264 dbar = (
y[1]-
y[0])*barwidth;
2267 drawbordersav = drawborder;
2271 xhigh = wmin+offset+dbar;
2274 else ylow =
gPad->GetUymin();
2276 for (i=
first; i<=last;i++) {
2283 if (xlow < rwxmax && xhigh > rwxmin)
2287 xhigh = xhigh+delta;
2290 xi1 =
x[i]; xi =
x[i-1];
2292 Error(where,
"X must be in increasing order");
2295 offset = (
x[i+1]-
x[i])*baroffset;
2296 dbar = (
x[i+1]-
x[i])*barwidth;
2297 xlow =
x[i] + offset;
2298 xhigh =
x[i] + offset + dbar;
2303 ylow = wmin + offset;
2304 yhigh = wmin + offset + dbar;
2306 else xlow =
gPad->GetUxmin();
2307 for (i=
first; i<=last;i++) {
2315 gPad->PaintBox(xlow,ylow,xhigh,yhigh);
2317 ylow = ylow + delta;
2318 yhigh = yhigh + delta;
2321 yi1 =
y[i]; yi =
y[i-1];
2323 Error(where,
"Y must be in increasing order");
2326 offset = (
y[i+1]-
y[i])*baroffset;
2327 dbar = (
y[i+1]-
y[i])*barwidth;
2328 ylow =
y[i] + offset;
2329 yhigh =
y[i] + offset + dbar;
2340 if ((optionStar) || (optionMark)) optionMarker=1;
2346 for (i=
first; i<=last;i++) {
2347 if (!optionBins) xm = wmin+(i-
first)*delta+0.5*delta;
2348 else xm =
x[i-1] + 0.5*(
x[i]-
x[i-1]);
2350 if (optionMark != 10) {
2351 if (ym<rwymax && ym > rwymin) {
2357 if (ym<rwymax && ym >= rwymin) {
2374 wminstep = wmin + 0.5*delta;
2375 for (i=
first; i<=last;i++) {
2376 if (!optionBins) ym = wminstep+(i-
first)*delta+0.5*delta;
2377 else ym =
y[i-1] + 0.5*(
y[i]-
y[i-1]);
2379 if (optionMark != 10) {
2380 if (xm<rwxmax && xm > rwxmin) {
2386 if (xm<rwxmax && xm >= rwxmin) {
2427 const Int_t kBASEMARKER=8;
2428 Double_t s2x, s2y, symbolsize, sbase;
2429 Double_t x,
y, xl1, xl2, xr1, xr2, yup1, yup2, ylow1, ylow2, tx, ty;
2430 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};
2431 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};
2440 if (strchr(option,
'X') || strchr(option,
'x')) {
PaintGraphSimple(theGraph, option);
return;}
2443 if (strstr(option,
"||") || strstr(option,
"[]")) {
2445 if (strstr(option,
"[]")) braticks =
kTRUE;
2448 if (strchr(option,
'z')) endLines =
kFALSE;
2449 if (strchr(option,
'Z')) endLines =
kFALSE;
2450 const char *arrowOpt = 0;
2451 if (strchr(option,
'>')) arrowOpt =
">";
2452 if (strstr(option,
"|>")) arrowOpt =
"|>";
2455 if (strchr(option,
'a')) axis =
kTRUE;
2456 if (strchr(option,
'A')) axis =
kTRUE;
2464 if (strchr(option,
'0')) option0 =
kTRUE;
2465 if (strchr(option,
'2')) option2 =
kTRUE;
2466 if (strchr(option,
'3')) option3 =
kTRUE;
2467 if (strchr(option,
'4')) {option3 =
kTRUE; option4 =
kTRUE;}
2468 if (strchr(option,
'5')) {option2 =
kTRUE; option5 =
kTRUE;}
2471 xline =
new Double_t[2*theNpoints];
2472 yline =
new Double_t[2*theNpoints];
2473 if (!xline || !yline) {
2474 Error(
"Paint",
"too many points, out of memory");
2481 theGraph->TAttLine::Modify();
2496 sbase = symbolsize*kBASEMARKER;
2509 tx =
gPad->PixeltoX(dxend) -
gPad->PixeltoX(0);
2510 ty =-
gPad->PixeltoY(dxend) +
gPad->PixeltoY(0);
2511 Float_t asize = 0.6*symbolsize*kBASEMARKER/
gPad->GetWh();
2514 for (
Int_t i=0;i<theNpoints;i++) {
2515 x =
gPad->XtoPad(theX[i]);
2516 y =
gPad->YtoPad(theY[i]);
2519 if (x < gPad->GetUxmin())
x =
gPad->GetUxmin();
2520 if (
x >
gPad->GetUxmax())
x =
gPad->GetUxmax();
2521 if (y < gPad->GetUymin())
y =
gPad->GetUymin();
2522 if (
y >
gPad->GetUymax())
y =
gPad->GetUymax();
2524 if (x < gPad->GetUxmin())
continue;
2525 if (
x >
gPad->GetUxmax())
continue;
2526 if (y < gPad->GetUymin())
continue;
2527 if (
y >
gPad->GetUymax())
continue;
2531 xl2 =
gPad->XtoPad(theX[i] - theEXlow[i]);
2535 x1b =
gPad->XtoPad(theX[i] - theEXlow[i]);
2536 y1b =
gPad->YtoPad(theY[i] - theEYlow[i]);
2537 x2b =
gPad->XtoPad(theX[i] + theEXhigh[i]);
2538 y2b =
gPad->YtoPad(theY[i] + theEYhigh[i]);
2539 if (x1b < gPad->GetUxmin()) x1b =
gPad->GetUxmin();
2540 if (x1b >
gPad->GetUxmax()) x1b =
gPad->GetUxmax();
2541 if (y1b < gPad->GetUymin()) y1b =
gPad->GetUymin();
2542 if (y1b >
gPad->GetUymax()) y1b =
gPad->GetUymax();
2543 if (x2b < gPad->GetUxmin()) x2b =
gPad->GetUxmin();
2544 if (x2b >
gPad->GetUxmax()) x2b =
gPad->GetUxmax();
2545 if (y2b < gPad->GetUymin()) y2b =
gPad->GetUymin();
2546 if (y2b >
gPad->GetUymax()) y2b =
gPad->GetUymax();
2547 if (option5)
box.PaintBox(x1b, y1b, x2b, y2b,
"l");
2548 else box.PaintBox(x1b, y1b, x2b, y2b);
2556 yline[if1-1] =
gPad->YtoPad(theY[i] + theEYhigh[i]);
2557 yline[if2-1] =
gPad->YtoPad(theY[i] - theEYlow[i]);
2565 arrow.PaintArrow(xl1,
y,xl2,
y,asize,arrowOpt);
2567 if (!brackets)
gPad->PaintLine(xl1,
y,xl2,
y);
2570 xb[0] = xl2+tx; yb[0] =
y-ty;
2571 xb[1] = xl2; yb[1] =
y-ty;
2572 xb[2] = xl2; yb[2] =
y+ty;
2573 xb[3] = xl2+tx; yb[3] =
y+ty;
2574 gPad->PaintPolyLine(4, xb, yb);
2576 gPad->PaintLine(xl2,
y-ty,xl2,
y+ty);
2582 xr2 =
gPad->XtoPad(theX[i] + theEXhigh[i]);
2585 arrow.PaintArrow(xr1,
y,xr2,
y,asize,arrowOpt);
2587 if (!brackets)
gPad->PaintLine(xr1,
y,xr2,
y);
2590 xb[0] = xr2-tx; yb[0] =
y-ty;
2591 xb[1] = xr2; yb[1] =
y-ty;
2592 xb[2] = xr2; yb[2] =
y+ty;
2593 xb[3] = xr2-tx; yb[3] =
y+ty;
2594 gPad->PaintPolyLine(4, xb, yb);
2596 gPad->PaintLine(xr2,
y-ty,xr2,
y+ty);
2602 yup2 =
gPad->YtoPad(theY[i] + theEYhigh[i]);
2603 if (yup2 >
gPad->GetUymax()) yup2 =
gPad->GetUymax();
2606 arrow.PaintArrow(
x,yup1,
x,yup2,asize,arrowOpt);
2608 if (!brackets)
gPad->PaintLine(
x,yup1,
x,yup2);
2611 xb[0] =
x-tx; yb[0] = yup2-ty;
2612 xb[1] =
x-tx; yb[1] = yup2;
2613 xb[2] =
x+tx; yb[2] = yup2;
2614 xb[3] =
x+tx; yb[3] = yup2-ty;
2615 gPad->PaintPolyLine(4, xb, yb);
2617 gPad->PaintLine(
x-tx,yup2,
x+tx,yup2);
2623 ylow2 =
gPad->YtoPad(theY[i] - theEYlow[i]);
2624 if (ylow2 < gPad->GetUymin()) ylow2 =
gPad->GetUymin();
2625 if (ylow2 < ylow1) {
2627 arrow.PaintArrow(
x,ylow1,
x,ylow2,asize,arrowOpt);
2629 if (!brackets)
gPad->PaintLine(
x,ylow1,
x,ylow2);
2632 xb[0] =
x-tx; yb[0] = ylow2+ty;
2633 xb[1] =
x-tx; yb[1] = ylow2;
2634 xb[2] =
x+tx; yb[2] = ylow2;
2635 xb[3] =
x+tx; yb[3] = ylow2+ty;
2636 gPad->PaintPolyLine(4, xb, yb);
2638 gPad->PaintLine(
x-tx,ylow2,
x+tx,ylow2);
2652 if (option4)
PaintGraph(theGraph, 2*theNpoints, xline, yline,
"FC");
2653 else PaintGraph(theGraph, 2*theNpoints, xline, yline,
"F");
2654 gPad->SetLogx(logx);
2655 gPad->SetLogy(logy);
2666 if (!theGraph->
InheritsFrom(TGraphMultiErrors::Class())) {
2673 Int_t NYErrors = tg->GetNYErrors();
2674 if (NYErrors <= 0) {
2682 std::vector<TString> options(NYErrors + 1);
2691 while ((firstSemicolon = tsOpt.
First(
';')) !=
kNPOS && filled <= NYErrors) {
2692 options[filled] = tsOpt(0, firstSemicolon);
2693 tsOpt = tsOpt(firstSemicolon + 1, tsOpt.
Length());
2697 if (filled <= NYErrors) {
2698 options[filled] = tsOpt.
Copy();
2702 for (
Int_t i = filled; i <= NYErrors; i++)
2706 std::vector<Double_t *> yline(NYErrors);
2711 const Int_t kBASEMARKER = 8;
2712 Double_t s2x, s2y, symbolsize, sbase;
2713 Double_t x,
y, xl1, xl2, xr1, xr2, yup1, yup2, ylow1, ylow2, tx, ty;
2714 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};
2715 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};
2716 Int_t theNpoints = tg->GetN();
2720 Double_t *theExH = tg->GetEXhigh();
2721 std::vector<Double_t *> theEyL(NYErrors);
2722 std::vector<Double_t *> theEyH(NYErrors);
2725 for (
Int_t j = 0; j < NYErrors; j++) {
2726 theEyL[j] = tg->GetEYlow(j);
2727 theEyH[j] = tg->GetEYhigh(j);
2728 theEyExists &= (theEyL[j] && theEyH[j]);
2731 if (!theX || !theY || !theExL || !theExH || !theEyExists)
2734 std::vector<Bool_t> DrawErrors(NYErrors);
2739 std::vector<Bool_t> Braticks(NYErrors);
2740 std::vector<Bool_t> Brackets(NYErrors);
2741 std::vector<Bool_t> EndLines(NYErrors);
2742 std::vector<Char_t *> ArrowOpt(NYErrors);
2743 std::vector<Bool_t> Option5(NYErrors);
2744 std::vector<Bool_t> Option4(NYErrors);
2745 std::vector<Bool_t> Option3(NYErrors);
2747 std::vector<Bool_t> Option2(NYErrors);
2748 std::vector<Bool_t> Option0(NYErrors);
2750 std::vector<Double_t> Scale(NYErrors);
2752 const TRegexp ScaleRegExp(
"s=*[0-9]\\.*[0-9]");
2754 for (
Int_t j = 0; j < NYErrors; j++) {
2755 if (options[j + 1].Contains(
"s=")) {
2756 sscanf(strstr(options[j + 1].Data(),
"s="),
"s=%lf", &Scale[j]);
2757 options[j + 1].ReplaceAll(options[j + 1](ScaleRegExp),
"");
2761 DrawErrors[j] = !options[j + 1].Contains(
"x");
2762 AnyErrors |= DrawErrors[j];
2763 Braticks[j] = options[j + 1].Contains(
"[]");
2764 Brackets[j] = options[j + 1].Contains(
"||") || Braticks[j];
2765 EndLines[j] = !options[j + 1].Contains(
"z");
2767 if (options[j + 1].Contains(
"|>"))
2768 ArrowOpt[j] = (
Char_t *)
"|>";
2769 else if (options[j + 1].Contains(
">"))
2770 ArrowOpt[j] = (
Char_t *)
">";
2772 ArrowOpt[j] =
nullptr;
2774 Option5[j] = options[j + 1].Contains(
"5");
2775 Option4[j] = options[j + 1].Contains(
"4");
2776 Option3[j] = options[j + 1].Contains(
"3") || Option4[j];
2777 AnyOption3 |= Option3[j];
2778 Option2[j] = options[j + 1].Contains(
"2") || Option5[j];
2779 Option0[j] = options[j + 1].Contains(
"0");
2780 AnyOption0 |= Option0[j];
2782 NoErrorsX &= (Option3[j] || Option2[j]);
2783 Option0X |= !(Option3[j] || Option2[j]) && Option0[j];
2784 DrawMarker |= !(Brackets[j] || Option3[j] || Option2[j]);
2787 Bool_t Draw0PointsX = !options[0].Contains(
"x0") && (
gPad->GetLogx() == 0);
2788 Bool_t Draw0PointsY = !options[0].Contains(
"y0") && (
gPad->GetLogy() == 0);
2789 options[0].ReplaceAll(
"x0",
"");
2790 options[0].ReplaceAll(
"y0",
"");
2792 Bool_t DrawErrorsX = !options[0].Contains(
"x");
2793 Bool_t BraticksX = options[0].Contains(
"[]");
2794 Bool_t BracketsX = options[0].Contains(
"||") || BraticksX;
2795 Bool_t EndLinesX = !options[0].Contains(
"z");
2797 Char_t *ArrowOptX =
nullptr;
2798 if (options[0].Contains(
"|>"))
2799 ArrowOptX = (
Char_t *)
"|>";
2800 else if (options[0].Contains(
">"))
2801 ArrowOptX = (
Char_t *)
">";
2804 if (options[0].Contains(
"s=")) {
2805 sscanf(strstr(options[0].Data(),
"s="),
"s=%lf", &ScaleX);
2806 options[0].ReplaceAll(options[0](ScaleRegExp),
"");
2809 if (!AnyErrors && !DrawErrorsX) {
2814 Bool_t DrawAxis = options[0].Contains(
"a");
2815 Bool_t IndividualStyles = options[0].Contains(
"s");
2820 Int_t NPointsInside = AnyOption0 ? theNpoints : 0;
2822 for (
Int_t i = 0; i < theNpoints && !AnyOption0; i++) {
2823 x =
gPad->XtoPad(theX[i]);
2824 y =
gPad->YtoPad(theY[i]);
2826 if ((
x >=
gPad->GetUxmin()) && (x <= gPad->GetUxmax()) && (
y >=
gPad->GetUymin()) && (y <= gPad->GetUymax()) &&
2827 (Draw0PointsX || theX[i] != 0.) && (Draw0PointsY || theY[i] != 0.))
2832 xline =
new Double_t[2 * NPointsInside];
2835 Error(
"Paint",
"too many points, out of memory");
2840 if2 = 2 * NPointsInside;
2843 for (
Int_t j = 0; j < NYErrors; j++) {
2844 if (Option3[j] && DrawErrors[j]) {
2845 yline[j] =
new Double_t[2 * NPointsInside];
2848 Error(
"Paint",
"too many points, out of memory");
2850 for (
Int_t k = 0; k < j; k++)
2858 tg->TAttLine::Modify();
2861 arrow.SetLineWidth(tg->GetLineWidth());
2862 arrow.SetLineColor(tg->GetLineColor());
2863 arrow.SetFillColor(tg->GetFillColor());
2868 box.SetLineColor(tg->GetLineColor());
2869 box.SetFillColor(tg->GetFillColor());
2870 box.SetFillStyle(tg->GetFillStyle());
2872 symbolsize = tg->GetMarkerSize();
2873 sbase = symbolsize * kBASEMARKER;
2879 cx = cxx[
mark - 20];
2880 cy = cyy[
mark - 20];
2884 s2x =
gPad->PixeltoX(
Int_t(0.5 * sbase)) -
gPad->PixeltoX(0);
2885 s2y = -
gPad->PixeltoY(
Int_t(0.5 * sbase)) +
gPad->PixeltoY(0);
2887 tx =
gPad->PixeltoX(dxend) -
gPad->PixeltoX(0);
2888 ty = -
gPad->PixeltoY(dxend) +
gPad->PixeltoY(0);
2889 Float_t asize = 0.6 * symbolsize * kBASEMARKER /
gPad->GetWh();
2893 for (
Int_t i = 0; i < theNpoints; i++) {
2894 x =
gPad->XtoPad(theX[i]);
2895 y =
gPad->YtoPad(theY[i]);
2898 (
x <
gPad->GetUxmin()) || (
x >
gPad->GetUxmax()) || (y < gPad->GetUymin()) || (
y >
gPad->GetUymax());
2900 if ((isOutside && !AnyOption0) || (!Draw0PointsX && theX[i] == 0.) || (!Draw0PointsY && theY[i] == 0.))
2905 if (x < gPad->GetUxmin())
2906 x =
gPad->GetUxmin();
2907 if (
x >
gPad->GetUxmax())
2908 x =
gPad->GetUxmax();
2909 if (y < gPad->GetUymin())
2910 y =
gPad->GetUymin();
2911 if (
y >
gPad->GetUymax())
2912 y =
gPad->GetUymax();
2922 for (
Int_t j = 0; j < NYErrors; j++) {
2927 if (Option2[j] && (!isOutside || Option0[j])) {
2928 if (IndividualStyles) {
2929 box.SetLineWidth(tg->GetLineWidth(j));
2930 box.SetLineColor(tg->GetLineColor(j));
2931 box.SetFillColor(tg->GetFillColor(j));
2932 box.SetFillStyle(tg->GetFillStyle(j));
2935 x1b =
gPad->XtoPad(theX[i] - Scale[j] * theExL[i]);
2936 y1b =
gPad->YtoPad(theY[i] - theEyL[j][i]);
2937 x2b =
gPad->XtoPad(theX[i] + Scale[j] * theExH[i]);
2938 y2b =
gPad->YtoPad(theY[i] + theEyH[j][i]);
2939 if (x1b < gPad->GetUxmin())
2940 x1b =
gPad->GetUxmin();
2941 if (x1b >
gPad->GetUxmax())
2942 x1b =
gPad->GetUxmax();
2943 if (y1b < gPad->GetUymin())
2944 y1b =
gPad->GetUymin();
2945 if (y1b >
gPad->GetUymax())
2946 y1b =
gPad->GetUymax();
2947 if (x2b < gPad->GetUxmin())
2948 x2b =
gPad->GetUxmin();
2949 if (x2b >
gPad->GetUxmax())
2950 x2b =
gPad->GetUxmax();
2951 if (y2b < gPad->GetUymin())
2952 y2b =
gPad->GetUymin();
2953 if (y2b >
gPad->GetUymax())
2954 y2b =
gPad->GetUymax();
2956 box.PaintBox(x1b, y1b, x2b, y2b,
"l");
2958 box.PaintBox(x1b, y1b, x2b, y2b);
2963 if (!isOutside || Option0[j]) {
2964 yline[j][if1 - 2] =
gPad->YtoPad(theY[i] + theEyH[j][i]);
2965 yline[j][if2] =
gPad->YtoPad(theY[i] - theEyL[j][i]);
2967 yline[j][if1 - 2] =
gPad->GetUymin();
2968 yline[j][if2] =
gPad->GetUymin();
2972 if (IndividualStyles) {
2973 tg->GetAttLine(j)->Modify();
2975 arrow.SetLineWidth(tg->GetLineWidth(j));
2976 arrow.SetLineColor(tg->GetLineColor(j));
2977 arrow.SetFillColor(tg->GetFillColor(j));
2980 ylow1 =
y - s2y * cy;
2981 ylow2 =
gPad->YtoPad(theY[i] - theEyL[j][i]);
2982 if (ylow2 < gPad->GetUymin())
2983 ylow2 =
gPad->GetUymin();
2984 if (ylow2 < ylow1 && DrawErrors[j] && !Option2[j] && !Option3[j] && (!isOutside || Option0[j])) {
2986 arrow.PaintArrow(
x, ylow1,
x, ylow2, asize, ArrowOpt[j]);
2989 gPad->PaintLine(
x, ylow1,
x, ylow2);
3000 gPad->PaintPolyLine(4, xb, yb);
3002 gPad->PaintLine(
x - tx, ylow2,
x + tx, ylow2);
3007 yup1 =
y + s2y * cy;
3008 yup2 =
gPad->YtoPad(theY[i] + theEyH[j][i]);
3009 if (yup2 >
gPad->GetUymax())
3010 yup2 =
gPad->GetUymax();
3011 if (yup2 > yup1 && DrawErrors[j] && !Option2[j] && !Option3[j] && (!isOutside || Option0[j])) {
3013 arrow.PaintArrow(
x, yup1,
x, yup2, asize, ArrowOpt[j]);
3016 gPad->PaintLine(
x, yup1,
x, yup2);
3027 gPad->PaintPolyLine(4, xb, yb);
3029 gPad->PaintLine(
x - tx, yup2,
x + tx, yup2);
3036 if (IndividualStyles) {
3037 tg->TAttLine::Modify();
3039 arrow.SetLineWidth(tg->GetLineWidth());
3040 arrow.SetLineColor(tg->GetLineColor());
3041 arrow.SetFillColor(tg->GetFillColor());
3045 xl2 =
gPad->XtoPad(theX[i] - ScaleX * theExL[i]);
3046 if (xl1 > xl2 && !NoErrorsX && (!isOutside || Option0X)) {
3048 arrow.PaintArrow(xl1,
y, xl2,
y, asize, ArrowOptX);
3051 gPad->PaintLine(xl1,
y, xl2,
y);
3062 gPad->PaintPolyLine(4, xb, yb);
3064 gPad->PaintLine(xl2,
y - ty, xl2,
y + ty);
3070 xr2 =
gPad->XtoPad(theX[i] + ScaleX * theExH[i]);
3071 if (xr1 < xr2 && !NoErrorsX && (!isOutside || Option0X)) {
3073 arrow.PaintArrow(xr1,
y, xr2,
y, asize, ArrowOptX);
3076 gPad->PaintLine(xr1,
y, xr2,
y);
3087 gPad->PaintPolyLine(4, xb, yb);
3089 gPad->PaintLine(xr2,
y - ty, xr2,
y + ty);
3100 auto tgDummy =
new TGraph();
3101 tg->TAttFill::Copy(*tgDummy);
3102 tg->TAttLine::Copy(*tgDummy);
3103 tg->TAttMarker::Copy(*tgDummy);
3105 for (
Int_t j = 0; j < NYErrors; j++) {
3106 if (Option3[j] && DrawErrors[j]) {
3107 if (IndividualStyles) {
3108 tg->GetAttFill(j)->Copy(*tgDummy);
3109 tg->GetAttLine(j)->Copy(*tgDummy);
3117 PaintGraph(tgDummy, 2 * NPointsInside, xline, yline[j],
"FC");
3119 PaintGraph(tgDummy, 2 * NPointsInside, xline, yline[j],
"F");
3120 gPad->SetLogx(logx);
3121 gPad->SetLogy(logy);
3144 const Int_t kBASEMARKER=8;
3145 Double_t s2x, s2y, symbolsize, sbase;
3146 Double_t x,
y, xl1, xl2, xr1, xr2, yup1, yup2, ylow1, ylow2, tx, ty;
3148 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};
3149 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};
3162 if (strchr(option,
'X') || strchr(option,
'x')) {
PaintGraphSimple(theGraph, option);
return;}
3165 if (strstr(option,
"||") || strstr(option,
"[]")) {
3167 if (strstr(option,
"[]")) braticks =
kTRUE;
3170 if (strchr(option,
'z')) endLines =
kFALSE;
3171 if (strchr(option,
'Z')) endLines =
kFALSE;
3172 const char *arrowOpt = 0;
3173 if (strchr(option,
'>')) arrowOpt =
">";
3174 if (strstr(option,
"|>")) arrowOpt =
"|>";
3177 if (strchr(option,
'a')) axis =
kTRUE;
3178 if (strchr(option,
'A')) axis =
kTRUE;
3186 if (strchr(option,
'0')) option0 =
kTRUE;
3187 if (strchr(option,
'2')) option2 =
kTRUE;
3188 if (strchr(option,
'3')) option3 =
kTRUE;
3189 if (strchr(option,
'4')) {option3 =
kTRUE; option4 =
kTRUE;}
3190 if (strchr(option,
'5')) {option2 =
kTRUE; option5 =
kTRUE;}
3193 xline =
new Double_t[2*theNpoints];
3194 yline =
new Double_t[2*theNpoints];
3195 if (!xline || !yline) {
3196 Error(
"Paint",
"too many points, out of memory");
3203 theGraph->TAttLine::Modify();
3218 sbase = symbolsize*kBASEMARKER;
3231 tx =
gPad->PixeltoX(dxend) -
gPad->PixeltoX(0);
3232 ty =-
gPad->PixeltoY(dxend) +
gPad->PixeltoY(0);
3233 Float_t asize = 0.6*symbolsize*kBASEMARKER/
gPad->GetWh();
3236 for (
Int_t i=0;i<theNpoints;i++) {
3237 x =
gPad->XtoPad(theX[i]);
3238 y =
gPad->YtoPad(theY[i]);
3239 bxl =
gPad->YtoPad(theY[i]+theEXlowd[i]);
3240 bxh =
gPad->YtoPad(theY[i]+theEXhighd[i]);
3241 byl =
gPad->XtoPad(theX[i]+theEYlowd[i]);
3242 byh =
gPad->XtoPad(theX[i]+theEYhighd[i]);
3245 if (x < gPad->GetUxmin())
x =
gPad->GetUxmin();
3246 if (
x >
gPad->GetUxmax())
x =
gPad->GetUxmax();
3247 if (y < gPad->GetUymin())
y =
gPad->GetUymin();
3248 if (
y >
gPad->GetUymax())
y =
gPad->GetUymax();
3250 if (x < gPad->GetUxmin())
continue;
3251 if (
x >
gPad->GetUxmax())
continue;
3252 if (y < gPad->GetUymin())
continue;
3253 if (
y >
gPad->GetUymax())
continue;
3259 x1b =
gPad->XtoPad(theX[i] - theEXlow[i]);
3260 y1b =
gPad->YtoPad(theY[i] - theEYlow[i]);
3261 x2b =
gPad->XtoPad(theX[i] + theEXhigh[i]);
3262 y2b =
gPad->YtoPad(theY[i] + theEYhigh[i]);
3263 if (x1b < gPad->GetUxmin()) x1b =
gPad->GetUxmin();
3264 if (x1b >
gPad->GetUxmax()) x1b =
gPad->GetUxmax();
3265 if (y1b < gPad->GetUymin()) y1b =
gPad->GetUymin();
3266 if (y1b >
gPad->GetUymax()) y1b =
gPad->GetUymax();
3267 if (x2b < gPad->GetUxmin()) x2b =
gPad->GetUxmin();
3268 if (x2b >
gPad->GetUxmax()) x2b =
gPad->GetUxmax();
3269 if (y2b < gPad->GetUymin()) y2b =
gPad->GetUymin();
3270 if (y2b >
gPad->GetUymax()) y2b =
gPad->GetUymax();
3271 if (option5)
box.PaintBox(x1b, y1b, x2b, y2b,
"l");
3272 else box.PaintBox(x1b, y1b, x2b, y2b);
3280 yline[if1-1] =
gPad->YtoPad(theY[i] + theEYhigh[i]);
3281 yline[if2-1] =
gPad->YtoPad(theY[i] - theEYlow[i]);
3288 xl2 =
gPad->XtoPad(theX[i] - theEXlow[i]);
3291 arrow.PaintArrow(xl1,
y,xl2,bxl,asize,arrowOpt);
3293 if (!brackets)
gPad->PaintLine(xl1,
y,xl2,bxl);
3296 xb[0] = xl2+tx; yb[0] = bxl-ty;
3297 xb[1] = xl2; yb[1] = bxl-ty;
3298 xb[2] = xl2; yb[2] = bxl+ty;
3299 xb[3] = xl2+tx; yb[3] = bxl+ty;
3300 gPad->PaintPolyLine(4, xb, yb);
3302 gPad->PaintLine(xl2,bxl-ty,xl2,bxl+ty);
3308 xr2 =
gPad->XtoPad(theX[i] + theEXhigh[i]);
3311 arrow.PaintArrow(xr1,
y,xr2,bxh,asize,arrowOpt);
3313 if (!brackets)
gPad->PaintLine(xr1,
y,xr2,bxh);
3316 xb[0] = xr2-tx; yb[0] = bxh-ty;
3317 xb[1] = xr2; yb[1] = bxh-ty;
3318 xb[2] = xr2; yb[2] = bxh+ty;
3319 xb[3] = xr2-tx; yb[3] = bxh+ty;
3320 gPad->PaintPolyLine(4, xb, yb);
3322 gPad->PaintLine(xr2,bxh-ty,xr2,bxh+ty);
3328 yup2 =
gPad->YtoPad(theY[i] + theEYhigh[i]);
3329 if (yup2 >
gPad->GetUymax()) yup2 =
gPad->GetUymax();
3332 arrow.PaintArrow(
x,yup1,byh,yup2,asize,arrowOpt);
3334 if (!brackets)
gPad->PaintLine(
x,yup1,byh,yup2);
3337 xb[0] = byh-tx; yb[0] = yup2-ty;
3338 xb[1] = byh-tx; yb[1] = yup2;
3339 xb[2] = byh+tx; yb[2] = yup2;
3340 xb[3] = byh+tx; yb[3] = yup2-ty;
3341 gPad->PaintPolyLine(4, xb, yb);
3343 gPad->PaintLine(byh-tx,yup2,byh+tx,yup2);
3349 ylow2 =
gPad->YtoPad(theY[i] - theEYlow[i]);
3350 if (ylow2 < gPad->GetUymin()) ylow2 =
gPad->GetUymin();
3351 if (ylow2 < ylow1) {
3353 arrow.PaintArrow(
x,ylow1,byl,ylow2,asize,arrowOpt);
3355 if (!brackets)
gPad->PaintLine(
x,ylow1,byl,ylow2);
3358 xb[0] = byl-tx; yb[0] = ylow2+ty;
3359 xb[1] = byl-tx; yb[1] = ylow2;
3360 xb[2] = byl+tx; yb[2] = ylow2;
3361 xb[3] = byl+tx; yb[3] = ylow2+ty;
3362 gPad->PaintPolyLine(4, xb, yb);
3364 gPad->PaintLine(byl-tx,ylow2,byl+tx,ylow2);
3378 if (option4)
PaintGraph(theGraph, 2*theNpoints, xline, yline,
"FC");
3379 else PaintGraph(theGraph, 2*theNpoints, xline, yline,
"F");
3380 gPad->SetLogx(logx);
3381 gPad->SetLogy(logy);
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};
3411 if (strchr(option,
'X') || strchr(option,
'x')) {
PaintGraphSimple(theGraph, option);
return;}
3414 if (strstr(option,
"||") || strstr(option,
"[]")) {
3416 if (strstr(option,
"[]")) braticks =
kTRUE;
3419 if (strchr(option,
'z')) endLines =
kFALSE;
3420 if (strchr(option,
'Z')) endLines =
kFALSE;
3421 const char *arrowOpt = 0;
3422 if (strchr(option,
'>')) arrowOpt =
">";
3423 if (strstr(option,
"|>")) arrowOpt =
"|>";
3426 if (strchr(option,
'a')) axis =
kTRUE;
3427 if (strchr(option,
'A')) axis =
kTRUE;
3435 if (strchr(option,
'0')) option0 =
kTRUE;
3436 if (strchr(option,
'2')) option2 =
kTRUE;
3437 if (strchr(option,
'3')) option3 =
kTRUE;
3438 if (strchr(option,
'4')) {option3 =
kTRUE; option4 =
kTRUE;}
3439 if (strchr(option,
'5')) {option2 =
kTRUE; option5 =
kTRUE;}
3442 xline =
new Double_t[2*theNpoints];
3443 yline =
new Double_t[2*theNpoints];
3444 if (!xline || !yline) {
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, yline,
"FC");
3626 else PaintGraph(theGraph, 2*theNpoints, xline, yline,
"F");
3627 gPad->SetLogx(logx);
3628 gPad->SetLogy(logy);
3642 Double_t rwrmin, rwrmax, rwtmin, rwtmax;
3646 Int_t theNpoints = theGraphPolar->
GetN();
3652 if (theNpoints<1)
return;
3667 if (thePolargram)
if (!
gPad->FindObject(thePolargram->
GetName())) thePolargram=0;
3668 if (!thePolargram) {
3681 if (!thePolargram) {
3683 rwrmin = theY[0]; rwrmax = theY[theNpoints-1];
3684 rwtmin = theX[0]; rwtmax = theX[theNpoints-1];
3686 for (ipt = 0; ipt < theNpoints; ipt++) {
3689 if (theX[ipt] -theEX[ipt] < rwtmin) rwtmin = theX[ipt]-theEX[ipt];
3690 if (theX[ipt] +theEX[ipt] > rwtmax) rwtmax = theX[ipt]+theEX[ipt];
3692 if (theX[ipt] < rwtmin) rwtmin=theX[ipt];
3693 if (theX[ipt] > rwtmax) rwtmax=theX[ipt];
3696 if (theY[ipt] -theEY[ipt] < rwrmin) rwrmin = theY[ipt]-theEY[ipt];
3697 if (theY[ipt] +theEY[ipt] > rwrmax) rwrmax = theY[ipt]+theEY[ipt];
3699 if (theY[ipt] < rwrmin) rwrmin=theY[ipt];
3700 if (theY[ipt] > rwrmax) rwrmax=theY[ipt];
3704 if (rwrmin == rwrmax) rwrmax += 1.;
3705 if (rwtmin == rwtmax) rwtmax += 1.;
3712 rwtmax += dt/theNpoints;
3714 rwrmin = thePolargram->
GetRMin();
3715 rwrmax = thePolargram->
GetRMax();
3716 rwtmin = thePolargram->
GetTMin();
3717 rwtmax = thePolargram->
GetTMax();
3722 thePolargram =
new TGraphPolargram(
"Polargram",rwrmin,rwrmax,rwtmin,rwtmax);
3726 if (nolabel) thePolargram->
Draw(
"N");
3727 else thePolargram->
Draw(
"");
3736 Double_t radiusNDC = rwrmax-rwrmin;
3746 for (i=0; i<theNpoints; i++) {
3747 Double_t eymin, eymax, exmin,exmax;
3748 exmin = (theY[i]-theEY[i]-rwrmin)/radiusNDC*
3750 eymin = (theY[i]-theEY[i]-rwrmin)/radiusNDC*
3752 exmax = (theY[i]+theEY[i]-rwrmin)/radiusNDC*
3754 eymax = (theY[i]+theEY[i]-rwrmin)/radiusNDC*
3756 theGraphPolar->TAttLine::Modify();
3757 if (exmin != exmax || eymin != eymax)
gPad->PaintLine(exmin,eymin,exmax,eymax);
3761 for (i=0; i<theNpoints; i++) {
3762 Double_t rad = (theY[i]-rwrmin)/radiusNDC;
3765 theGraphPolar->TAttLine::Modify();
3766 if (phimin != phimax) thePolargram->
PaintCircle(0,0,rad,phimin,phimax,0);
3772 if (!(
gPad->GetLogx()) && !(
gPad->GetLogy())) {
3773 Double_t a,
b,
c=1,
x1,
x2, y1, y2, discr, norm1, norm2, xts, yts;
3781 for (i=0; i<theNpoints; i++) {
3784 xt = (theY[i]-rwrmin)/radiusNDC*
TMath::Cos(
c*(theX[i]-rwtmin)/thetaNDC);
3785 yt = (theY[i]-rwrmin)/radiusNDC*
TMath::Sin(
c*(theX[i]-rwtmin)/thetaNDC);
3786 norm = sqrt(xt*xt+yt*yt);
3791 if (!previouspointin) {
3796 a = (yt-yts)/(xt-xts);
3798 discr = 4*(
a*
a-
b*
b+1);
3799 x1 = (-2*
a*
b+sqrt(discr))/(2*(
a*
a+1));
3800 x2 = (-2*
a*
b-sqrt(discr))/(2*(
a*
a+1));
3803 norm1 = sqrt((
x1-xt)*(
x1-xt)+(y1-yt)*(y1-yt));
3804 norm2 = sqrt((
x2-xt)*(
x2-xt)+(y2-yt)*(y2-yt));
3805 previouspointin =
kFALSE;
3807 if (norm1 < norm2) {
3817 PaintGraph(theGraphPolar, j+1, theXpol, theYpol, opt);
3822 if (j>=1 && !previouspointin) {
3823 a = (yt-theYpol[j])/(xt-theXpol[j]);
3824 b = theYpol[j]-
a*theXpol[j];
3825 previouspointin =
kTRUE;
3826 discr = 4*(
a*
a-
b*
b+1);
3827 x1 = (-2*
a*
b+sqrt(discr))/(2*(
a*
a+1));
3828 x2 = (-2*
a*
b-sqrt(discr))/(2*(
a*
a+1));
3831 norm1 = sqrt((
x1-xt)*(
x1-xt)+(y1-yt)*(y1-yt));
3832 norm2 = sqrt((
x2-xt)*(
x2-xt)+(y2-yt)*(y2-yt));
3834 if (norm1 < norm2) {
3841 PaintGraph(theGraphPolar, j+1, theXpol, theYpol, opt);
3848 PaintGraph(theGraphPolar, j+1, theXpol, theYpol, opt);
3851 for (i=0; i<theNpoints; i++) {
3855 PaintGraph(theGraphPolar, theNpoints, theXpol, theYpol,opt);
3864 TIter next(
gPad->GetListOfPrimitives());
3865 while ((obj = next())) {
3869 if (strcmp(title->
GetName(),
"title")) {title = 0;
continue;}
3873 if (title)
delete title;
3879 if (ht <= 0) ht = 0.05;
3900 if (talh < 1) talh = 1;
else if (talh > 3) talh = 3;
3902 if (talv < 1) talv = 1;
else if (talv > 3) talv = 3;
3908 if (talh == 2) xpos = xpos-wt/2.;
3909 if (talh == 3) xpos = xpos-wt;
3910 if (talv == 2) ypos = ypos+ht/2.;
3911 if (talv == 1) ypos = ypos+ht;
3944 TF1 *theF = theGraphQQ->
GetF();
3947 Error(
"TGraphQQ::Paint",
"2nd dataset or theoretical function not specified");
3962 Double_t yxmin, xymin, yxmax, xymax;
3968 TLine line1, line2, line3;
3971 yxmin = (theYq2-theYq1)*(
xmin-theXq1)/(theXq2-theXq1) + theYq1;
3973 xymin = (theXq2-theXq1)*(
ymin-theYq1)/(theYq2-theYq1) + theXq1;
3979 line2.
PaintLine(xqmin, yqmin, xqmax, yqmax);
3981 yxmax = (theYq2-theYq1)*(
xmax-theXq1)/(theXq2-theXq1) + theYq1;
3983 xymax = (theXq2-theXq1)*(
ymax-theYq1)/(theYq2-theYq1) + theXq1;
4026 if (lxp) opth.
Append(
"x+");
4027 if (lyp) opth.
Append(
"y+");
4041 XA1 =
gPad->GetUxmin();
4042 XA2 =
gPad->GetUxmax();
4043 YA1 =
gPad->GetUymin();
4044 YA2 =
gPad->GetUymax();
4049 std::vector<Double_t> newX(
N);
4050 std::vector<Double_t> newY(
N);
4062 if (
gPad->GetGridx()) {
4063 GL = (YA2 - YA1) / (
gPad->GetY2() -
gPad->GetY1());
4067 if (lxp) ypos =
gPad->GetUymax();
4068 else ypos =
gPad->GetUymin();
4069 auto *theNewAxis =
new TGaxis(
gPad->GetUxmax(),
4080 theNewAxis->SetTickLength(TLX);
4082 theNewAxis->Paint();
4085 for (
Int_t i=0; i<
N; i++) newX[i] = dX-X[i];
4087 for (
Int_t i=0; i<
N; i++) newX[i] = X[i];
4098 if (
gPad->GetGridy()) {
4099 GL = (XA2 - XA1) / (
gPad->GetX2() -
gPad->GetX1());
4103 if (lyp) xpos =
gPad->GetUxmax();
4104 else xpos =
gPad->GetUxmin();
4105 auto *theNewAxis =
new TGaxis(xpos,
4116 theNewAxis->SetTickLength(-TLY);
4117 theNewAxis->SetLabelOffset(LOY-TLY);
4118 theNewAxis->Paint();
4121 for (
Int_t i=0; i<
N; i++) newY[i] = dY-Y[i];
4123 for (
Int_t i=0; i<
N; i++) newY[i] = Y[i];
4128 for (
Int_t i=0; i<
N; i++) theNewGraph->
SetPoint(i, newX[i], newY[i]);
4151 if (strstr(option,
"H") || strstr(option,
"h")) {
4162 if (!functions)
return;
4198 Double_t x1,
x2, y1, y2,
x3, y3, xm, ym,
a, a1, a2, a3;
4201 Int_t ix1,iy1,ix2,iy2;
4205 gPad->GetPadPar(x1p,y1p,x2p,y2p);
4206 ix1 = (
Int_t)(iw*x1p);
4207 iy1 = (
Int_t)(ih*y1p);
4208 ix2 = (
Int_t)(iw*x2p);
4209 iy2 = (
Int_t)(ih*y2p);
4221 gPad->GetRange(rx1,ry1,rx2,ry2);
4222 Double_t rx = (x2ndc-x1ndc)/(rx2-rx1);
4223 Double_t ry = (y2ndc-y1ndc)/(ry2-ry1);
4227 xf[0] = rx*(
x[0]-rx1)+x1ndc;
4228 yf[0] = ry*(
y[0]-ry1)+y1ndc;
4230 for (i=1; i<
n; i++) {
4231 if (
x[i]==
x[i-1] &&
y[i]==
y[i-1])
continue;
4233 xf[nf] = rx*(
x[i]-rx1)+x1ndc;
4234 if (xf[i]==xf[i-1]) xf[i] += 0.000001;
4235 yf[nf] = ry*(
y[i]-ry1)+y1ndc;
4254 if (xf[nf]==xf[nf-1]) {
4259 if (xf[nf]>=xf[nf-1]) {
4268 for (i=1; i<nf; i++) {
4280 if (xi1<xi0) a1 = a1+3.14159;
4286 if (xi0<xi2) a2 = a2+3.14159;
4301 if ((xm-xi0)*(
x3-xi0)<0 && (ym-yi0)*(y3-yi0)<0) {
4305 if ((xm==
x1) && (ym==y1)) {
4314 if (xf[nf]==xf[0] && yf[nf]==yf[0]) {
4315 xm = (xt[nf]+xt[0])*0.5;
4316 ym = (yt[nf]+yt[0])*0.5;
4324 if ((xm-xf[0])*(
x3-xf[0])<0 && (ym-yf[0])*(y3-yf[0])<0) {
4338 for (i=nf2; i>0; i--) {
4339 for (j=i-1; j>0; j--) {
4340 if (xt[i-1]==xt[i] || xt[j-1]==xt[j])
continue;
4341 c1 = (yt[i-1]-yt[i])/(xt[i-1]-xt[i]);
4342 b1 = yt[i]-
c1*xt[i];
4343 c2 = (yt[j-1]-yt[j])/(xt[j-1]-xt[j]);
4344 b2 = yt[j]-
c2*xt[j];
4346 xc = (b2-b1)/(
c1-
c2);
4352 nf++; xf[nf] = xt[i]; yf[nf] = yt[i];
4353 nf++; xf[nf] = xc ; yf[nf] = yc;
4371 nf++; xf[nf] = xt[0]; yf[nf] = yt[0];
4374 for (i=0; i<nf+1; i++) {
4375 xf[i] = (1/rx)*(xf[i]-x1ndc)+rx1;
4376 yf[i] = (1/ry)*(yf[i]-y1ndc)+ry1;
4380 gPad->PaintFillArea(nf+1,xf,yf);
4381 theGraph->TAttLine::Modify();
4399 TIter next(functions);
4401 while ((obj = next())) {
4411 if (!dofit) fit = 0;
4413 if (dofit == 1) dofit = 111;
4415 Int_t print_fval = dofit%10;
4416 Int_t print_ferrors = (dofit/10)%10;
4417 Int_t print_fchi2 = (dofit/100)%10;
4418 Int_t print_fprob = (dofit/1000)%10;
4419 Int_t nlinesf = print_fval + print_fchi2 + print_fprob;
4421 if (print_fval < 2) nlinesf += fit->GetNumberFreeParameters();
4422 else nlinesf += fit->GetNpar();
4458 Int_t ndf = fit->GetNDF();
4461 if (print_fchi2) stats->
AddText(t);
4467 if (print_fval || print_ferrors) {
4469 for (
Int_t ipar=0;ipar<fit->GetNpar();ipar++) {
4470 fit->GetParLimits(ipar,parmin,parmax);
4471 if (print_fval < 2 && parmin*parmax != 0 && parmin >= parmax)
continue;
4472 if (print_ferrors) {
4475 ,(
Float_t)fit->GetParError(ipar));
4485 if (!done) functions->
Add(stats);
4515 Int_t i, k, kp, km, npointsMax, banksize, n2, npt;
4516 Int_t maxiterations, finished;
4517 Int_t jtype, ktype, closed;
4518 Double_t sxmin, sxmax, symin, symax;
4521 Double_t ratio_signs, xratio, yratio;
4527 Double_t co, so, ct, st, ctu, stu, xnt;
4528 Double_t dx1, dy1, dx2, dy2, dk1, dk2;
4535 c = t = co = so = ct = st = ctu = stu = dx1 = dy1 = dx2 = dy2 = 0;
4536 xt = yt = xa = xb = ya = yb = u1 = u2 = u3 = tj = sb = 0;
4538 npointsMax = npoints*10;
4545 Error(
"Smooth",
"not enough space in memory");
4552 jtype = (drawtype%1000)-10;
4553 if (jtype > 0) { ktype = jtype; loptx =
kTRUE; }
4554 else ktype = drawtype%1000;
4583 for (i=1;i<npoints;i++) {
4585 if ((
x[i]-
x[i-1])*(
x[i-1]-
x[i-2]) < 0) six++;
4586 if ((
y[i]-
y[i-1])*(
y[i-1]-
y[i-2]) < 0) siy++;
4588 if (
x[i] < sxmin) sxmin =
x[i];
4589 if (
x[i] > sxmax) sxmax =
x[i];
4590 if (
y[i] < symin) symin =
y[i];
4591 if (
y[i] > symax) symax =
y[i];
4596 if (dx1n < 0.01*(sxmax-sxmin) && dy1n < 0.01*(symax-symin)) closed = 1;
4597 if (sxmin == sxmax) {
4600 if (six > 1) ratio_signs = siy/six;
4601 else ratio_signs = 20;
4602 xratio = ratio_signs/(sxmax-sxmin);
4604 if (symin == symax) yratio = 1;
4605 else yratio = 1/(symax-symin);
4609 for (i=0;i<npoints;i++) {
4610 x[i] = (
x[i]-sxmin)*xratio;
4611 y[i] = (
y[i]-symin)*yratio;
4630 if (
x[0] !=
x[npoints-1] ||
y[0] !=
y[npoints-1])
goto L40;
4631 if (
x[npoints-2] ==
x[npoints-1] &&
y[npoints-2] ==
y[npoints-1])
goto L40;
4632 if (
x[0] ==
x[1] &&
y[0] ==
y[1])
goto L40;
4655 if (npt > 1)
goto L310;
4659 if (
x[k-1] ==
x[k-2] &&
y[k-1] ==
y[k-2])
goto L50;
4664 if (npt > 1)
goto L310;
4667 if (k < npoints)
goto L90;
4668 if (!flgic) { kp = 2;
goto L130;}
4671 if (flgis)
goto L150;
4681 if (
x[k-1] ==
x[k] &&
y[k-1] ==
y[k])
goto L80;
4689 if (!flgis)
goto L50;
4704 dx1 =
x[k-1] -
x[km-1];
4705 dy1 =
y[k-1] -
y[km-1];
4706 dk1 = dx1*dx1 + dy1*dy1;
4707 dx2 =
x[kp-1] -
x[k-1];
4708 dy2 =
y[kp-1] -
y[k-1];
4709 dk2 = dx2*dx2 + dy2*dy2;
4710 ctu = dx1*dk2 + dx2*dk1;
4711 stu = dy1*dk2 + dy2*dk1;
4712 xnt = ctu*ctu + stu*stu;
4726 if (flgis)
goto L160;
4730 w3 = 2*(dx1*dy2-dx2*dy1);
4742 w3 = 2*(dx1*dy2-dx2*dy1);
4751 if (k <= 1)
goto L120;
4781 xa = (
a*t-2*dx)/tcube;
4782 xb = (3*dx-(co+
a)*t)/tsquare;
4783 ya = (
b*t-2*dy)/tcube;
4784 yb = (3*dy-(so+
b)*t)/tsquare;
4815 p2 = (u1*tj-u3)*3*tj+u2;
4845 z = s*sth*(s-s*sth)*(w1*sth+w1+w2);
4846 z = z*z/((
a*
a+
b*
b)*(delta*delta));
4847 z = (z+2.642937)*z/((.3715652*z+3.063444)*z+.2441889)-cc;
4851 if (iw > 0)
goto L250;
4852 if (z > err)
goto L240;
4857 if (iw+2 == 0)
goto L190;
4858 if (iw+2 > 0)
goto L290;
4876 theGraph->
Zero(kp,0,sb,err,s,z,maxiterations);
4877 if (kp == 2)
goto L210;
4879 Error(
"Smooth",
"Attempt to plot outside plot limits");
4882 if (iw > 0)
goto L200;
4908 qlx[npt] = sxmin + xt/xratio;
4909 qly[npt] = symin + yt/yratio;
4916 if (npt < banksize)
goto L320;
4917 if (drawtype >= 1000 || ktype > 1) {
4918 Int_t newsize = banksize + n2;
4920 for (i=0;i<banksize;i++) qtemp[i] = qlx[i];
4923 for (i=0;i<banksize;i++) qlx[i] = qtemp[i];
4924 for (i=0;i<banksize;i++) qtemp[i] = qly[i];
4927 for (i=0;i<banksize;i++) qly[i] = qtemp[i];
4936 if (drawtype >= 1000) {
4937 gPad->PaintFillArea(npt,qlx,qly,
"B");
4941 qlx[npt] = qlx[npt-1];
4942 qlx[npt+1] = qlx[0];
4948 qly[npt] = qly[npt-1];
4949 qly[npt+1] = qly[0];
4951 gPad->PaintFillArea(npt+2,qlx,qly);
4954 gPad->PaintPolyLine(npt,qlx,qly);
4957 qlx[0] = sxmin + xt/xratio;
4958 qly[0] = symin + yt/yratio;
4960 if (finished > 0)
goto L390;
4961 if (finished < 0) { finished = 0;
goto L110;}
4962 if (s > 0)
goto L180;
4968 for (i=0;i<npoints;i++) {
4969 x[i] = sxmin +
x[i]/xratio;
4970 y[i] = symin +
y[i]/yratio;
const Int_t kMaxPixel
Max value for an int.
static const double x2[5]
static const double x1[5]
static const double x3[11]
static TMarker * gHighlightMarker
static Int_t gHighlightPoint
static TGraph * gHighlightGraph
char * Form(const char *fmt,...)
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 SetLineWidth(Width_t lwidth)
Set 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.
virtual void SetMarkerSize(Size_t msize=1)
Set the marker size.
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)
TGraph with asymmetric error bars and multiple y error dimensions.
void PaintGraphPolar(TGraph *theGraph, Option_t *option)
Paint this TGraphPolar with its current attributes.
virtual char * GetObjectInfoHelper(TGraph *theGraph, Int_t px, Int_t py) const
virtual ~TGraphPainter()
Destructor.
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.
virtual void PaintGrapHist(TGraph *theGraph, Int_t npoints, const Double_t *x, const Double_t *y, Option_t *chopt)
This is a service method used by THistPainter to paint 1D histograms.
virtual void SetHighlight(TGraph *theGraph)
Set highlight (enable/disable) mode for theGraph.
void PaintStats(TGraph *theGraph, TF1 *fit)
Paint the statistics box with the fit info.
void PaintHelper(TGraph *theGraph, Option_t *option)
Paint a any kind of TGraph.
static Int_t fgMaxPointsPerLine
virtual void PaintGraph(TGraph *theGraph, Int_t npoints, const Double_t *x, const Double_t *y, Option_t *chopt)
Control function to draw a graph.
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.
virtual void DrawPanelHelper(TGraph *theGraph)
Display a panel with all histogram drawing options.
virtual void HighlightPoint(TGraph *theGraph, Int_t hpoint, Int_t distance)
Check on highlight point.
virtual Int_t DistancetoPrimitiveHelper(TGraph *theGraph, Int_t px, Int_t py)
Compute distance from point px,py to a graph.
void ComputeLogs(Int_t npoints, Int_t opt)
Compute the logarithm of global variables gxwork and gywork according to the value of Options and put...
virtual void ExecuteEventHelper(TGraph *theGraph, Int_t event, Int_t px, Int_t py)
Execute action corresponding to one event.
void Smooth(TGraph *theGraph, Int_t npoints, Double_t *x, Double_t *y, Int_t drawtype)
Smooth a curve given by N points.
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.
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.
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="")
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 ...
virtual Double_t GetMinimumStored() const
@ kNoTitle
Don't draw the histogram title.
@ kNoStats
Don't draw stats box.
TAxis * GetXaxis()
Get the behaviour adopted by the object about the statoverflows. See EStatOverflows for more informat...
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)
virtual Double_t GetMaximumStored() const
virtual void Paint(Option_t *option="")
Control routine to paint any kind of histograms.
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.
virtual Int_t DistancetoPrimitive(Int_t px, Int_t py)
Compute distance from point px,py to a line.
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()
Return next object in the list. Returns 0 when no more objects in list.
virtual void Add(TObject *obj)
virtual TObjLink * FirstLink() const
virtual TObject * First() const
Return the first object in the list. Returns 0 when list is empty.
virtual void SetX(Double_t x)
virtual void Paint(Option_t *option="")
Paint this marker with its current attributes.
virtual void SetY(Double_t y)
virtual void SetTitle(const char *title="")
Set the title of the TNamed.
virtual const char * GetTitle() const
Returns title of object.
virtual TObject * Clone(const char *newname="") const
Make a clone of an object using the Streamer facility.
virtual const char * GetName() const
Returns name of object.
TObject * GetObject() const
Option_t * GetOption() 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.
virtual void Delete(Option_t *option="")
Delete 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.
virtual void Paint(Option_t *option="")
This method must be overridden if a class wants to paint itself.
@ 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 void SetParent(TObject *obj)
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.
virtual void Paint(Option_t *option="")
Paint the pave stat.
void SetOptFit(Int_t fit=1)
Set the fit option.
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.
virtual void Draw(Option_t *option="")
Draw this pavetext with its current attributes.
virtual void Paint(Option_t *option="")
Paint this pavetext with its current attributes.
virtual TText * GetLine(Int_t number) const
Get Pointer to line number in this pavetext.
virtual void Clear(Option_t *option="")
Clear all lines in this pavetext.
virtual void SetName(const char *name="")
Option_t * GetName() const
Returns name of object.
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.
TVirtualPad is an abstract base class for the Pad and Canvas classes.
virtual TVirtualPad * cd(Int_t subpadnumber=0)=0
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)
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...
constexpr Double_t PiOver2()
Double_t Sqrt(Double_t x)
LongDouble_t Power(LongDouble_t x, LongDouble_t y)
Short_t Min(Short_t a, Short_t b)
Double_t Log10(Double_t x)