566 if (
gPad->GetLogx()) {
567 for (i=0;i<npoints;i++) {
572 if (!opt &&
gPad->GetLogy()) {
573 for (i=0;i<npoints;i++) {
594 if (distance <= 5)
return distance;
598 const Int_t big = 9999;
599 const Int_t kMaxDiff = 10;
606 if (px <= puxmin)
return big;
607 if (py >= puymin)
return big;
608 if (px >= puxmax)
return big;
609 if (py <= puymax)
return big;
612 Int_t i, pxp, pyp, d;
619 theX = theGraphPolar->
GetXpol();
620 theY = theGraphPolar->
GetYpol();
622 theX = theGraph->
GetX();
623 theY = theGraph->
GetY();
626 for (i=0;i<theNpoints;i++) {
627 pxp =
gPad->XtoAbsPixel(
gPad->XtoPad(theX[i]));
628 pyp =
gPad->YtoAbsPixel(
gPad->YtoPad(theY[i]));
630 if (d < distance) distance = d;
632 if (distance < kMaxDiff)
return distance;
634 for (i=0;i<theNpoints-1;i++) {
637 if (d < distance) distance = d;
652 TIter next(functions);
653 while ((f = (
TObject*) next())) {
657 if (dist < kMaxDiff) {
658 gPad->SetSelected(f);
674 Error(
"DrawPanel",
"need to draw graph first");
679 gROOT->ProcessLine(
Form(
"((TCanvas*)0x%lx)->Selected((TVirtualPad*)0x%lx,(TObject*)0x%lx,1)",
702 const Int_t kMaxDiff = 10;
703 static Bool_t middle, badcase;
704 static Int_t ipoint, pxp, pyp;
705 static Int_t px1,px2,py1,py2;
706 static Int_t pxold, pyold, px1old, py1old, px2old, py2old;
707 static Int_t dpx, dpy;
715 if (!
gPad->IsEditable())
return;
725 theGraph->TAttLine::Modify();
726 px1 =
gPad->XtoAbsPixel(
gPad->GetX1());
727 py1 =
gPad->YtoAbsPixel(
gPad->GetY1());
728 px2 =
gPad->XtoAbsPixel(
gPad->GetX2());
729 py2 =
gPad->YtoAbsPixel(
gPad->GetY2());
734 x =
new Int_t[theNpoints+1];
735 y =
new Int_t[theNpoints+1];
736 for (i=0;i<theNpoints;i++) {
737 pxp =
gPad->XtoAbsPixel(
gPad->XtoPad(theX[i]));
738 pyp =
gPad->YtoAbsPixel(
gPad->YtoPad(theY[i]));
739 if (pxp < -kMaxPixel || pxp >=
kMaxPixel ||
745 gVirtualX->DrawLine(pxp-4, pyp-4, pxp+4, pyp-4);
746 gVirtualX->DrawLine(pxp+4, pyp-4, pxp+4, pyp+4);
747 gVirtualX->DrawLine(pxp+4, pyp+4, pxp-4, pyp+4);
748 gVirtualX->DrawLine(pxp-4, pyp+4, pxp-4, pyp-4);
753 if (d < kMaxDiff) ipoint =i;
759 if (ipoint < 0)
return;
763 px2old =
gPad->XtoAbsPixel(theX[1]);
764 py2old =
gPad->YtoAbsPixel(theY[1]);
765 }
else if (ipoint == theNpoints-1) {
766 px1old =
gPad->XtoAbsPixel(
gPad->XtoPad(theX[theNpoints-2]));
767 py1old =
gPad->YtoAbsPixel(
gPad->YtoPad(theY[theNpoints-2]));
771 px1old =
gPad->XtoAbsPixel(
gPad->XtoPad(theX[ipoint-1]));
772 py1old =
gPad->YtoAbsPixel(
gPad->YtoPad(theY[ipoint-1]));
773 px2old =
gPad->XtoAbsPixel(
gPad->XtoPad(theX[ipoint+1]));
774 py2old =
gPad->YtoAbsPixel(
gPad->YtoPad(theY[ipoint+1]));
776 pxold =
gPad->XtoAbsPixel(
gPad->XtoPad(theX[ipoint]));
777 pyold =
gPad->YtoAbsPixel(
gPad->YtoPad(theY[ipoint]));
785 for (i=0;i<theNpoints;i++) {
786 pxp =
gPad->XtoAbsPixel(
gPad->XtoPad(theX[i]));
787 pyp =
gPad->YtoAbsPixel(
gPad->YtoPad(theY[i]));
789 if (d < kMaxDiff) middle =
kFALSE;
801 for(i=0;i<theNpoints-1;i++) {
802 gVirtualX->DrawLine(x[i]+dpx,
y[i]+dpy, x[i+1]+dpx,
y[i+1]+dpy);
805 if (pxp < -kMaxPixel || pxp >=
kMaxPixel ||
806 pyp < -kMaxPixel || pyp >=
kMaxPixel)
continue;
807 gVirtualX->DrawLine(pxp-4, pyp-4, pxp+4, pyp-4);
808 gVirtualX->DrawLine(pxp+4, pyp-4, pxp+4, pyp+4);
809 gVirtualX->DrawLine(pxp+4, pyp+4, pxp-4, pyp+4);
810 gVirtualX->DrawLine(pxp-4, pyp+4, pxp-4, pyp-4);
812 pxp = x[theNpoints-1]+dpx;
813 pyp =
y[theNpoints-1]+dpy;
814 gVirtualX->DrawLine(pxp-4, pyp-4, pxp+4, pyp-4);
815 gVirtualX->DrawLine(pxp+4, pyp-4, pxp+4, pyp+4);
816 gVirtualX->DrawLine(pxp+4, pyp+4, pxp-4, pyp+4);
817 gVirtualX->DrawLine(pxp-4, pyp+4, pxp-4, pyp-4);
822 for(i=0;i<theNpoints-1;i++) {
823 gVirtualX->DrawLine(x[i]+dpx,
y[i]+dpy, x[i+1]+dpx,
y[i+1]+dpy);
826 if (pxp < -kMaxPixel || pxp >=
kMaxPixel ||
827 pyp < -kMaxPixel || pyp >=
kMaxPixel)
continue;
828 gVirtualX->DrawLine(pxp-4, pyp-4, pxp+4, pyp-4);
829 gVirtualX->DrawLine(pxp+4, pyp-4, pxp+4, pyp+4);
830 gVirtualX->DrawLine(pxp+4, pyp+4, pxp-4, pyp+4);
831 gVirtualX->DrawLine(pxp-4, pyp+4, pxp-4, pyp-4);
833 pxp = x[theNpoints-1]+dpx;
834 pyp =
y[theNpoints-1]+dpy;
835 gVirtualX->DrawLine(pxp-4, pyp-4, pxp+4, pyp-4);
836 gVirtualX->DrawLine(pxp+4, pyp-4, pxp+4, pyp+4);
837 gVirtualX->DrawLine(pxp+4, pyp+4, pxp-4, pyp+4);
838 gVirtualX->DrawLine(pxp-4, pyp+4, pxp-4, pyp-4);
840 if (px1old)
gVirtualX->DrawLine(px1old, py1old, pxold, pyold);
841 if (px2old)
gVirtualX->DrawLine(pxold, pyold, px2old, py2old);
842 gVirtualX->DrawLine(pxold-4, pyold-4, pxold+4, pyold-4);
843 gVirtualX->DrawLine(pxold+4, pyold-4, pxold+4, pyold+4);
844 gVirtualX->DrawLine(pxold+4, pyold+4, pxold-4, pyold+4);
845 gVirtualX->DrawLine(pxold-4, pyold+4, pxold-4, pyold-4);
852 if (px1old)
gVirtualX->DrawLine(px1old, py1old, pxold, pyold);
853 if (px2old)
gVirtualX->DrawLine(pxold, pyold, px2old, py2old);
854 gVirtualX->DrawLine(pxold-4, pyold-4, pxold+4, pyold-4);
855 gVirtualX->DrawLine(pxold+4, pyold-4, pxold+4, pyold+4);
856 gVirtualX->DrawLine(pxold+4, pyold+4, pxold-4, pyold+4);
857 gVirtualX->DrawLine(pxold-4, pyold+4, pxold-4, pyold-4);
860 xmin =
gPad->GetUxmin();
861 xmax =
gPad->GetUxmax();
862 ymin =
gPad->GetUymin();
863 ymax =
gPad->GetUymax();
866 dxr = dx/(1 -
gPad->GetLeftMargin() -
gPad->GetRightMargin());
867 dyr = dy/(1 -
gPad->GetBottomMargin() -
gPad->GetTopMargin());
872 gPad->Range(xmin - dxr*
gPad->GetLeftMargin(),
873 ymin - dyr*
gPad->GetBottomMargin(),
874 xmax + dxr*
gPad->GetRightMargin(),
875 ymax + dyr*
gPad->GetTopMargin());
876 gPad->RangeAxis(xmin, ymin, xmax, ymax);
883 for(i=0;i<theNpoints;i++) {
884 if (badcase)
continue;
885 if (x) theX[i] =
gPad->PadtoX(
gPad->AbsPixeltoX(x[i]+dpx));
886 if (
y) theY[i] =
gPad->PadtoY(
gPad->AbsPixeltoY(
y[i]+dpy));
895 theX[ipoint] =
gPad->PadtoX(
gPad->AbsPixeltoX(pxold));
896 theY[ipoint] =
gPad->PadtoY(
gPad->AbsPixeltoY(pyold));
900 theX[theNpoints-1] = theX[0];
901 theY[theNpoints-1] = theY[0];
903 if (ipoint == theNpoints-1) {
904 theX[0] = theX[theNpoints-1];
905 theY[0] = theY[theNpoints-1];
917 if (
gROOT->IsEscaped()) {
925 xmin =
gPad->GetUxmin();
926 xmax =
gPad->GetUxmax();
927 ymin =
gPad->GetUymin();
928 ymax =
gPad->GetUymax();
931 dxr = dx/(1 -
gPad->GetLeftMargin() -
gPad->GetRightMargin());
932 dyr = dy/(1 -
gPad->GetBottomMargin() -
gPad->GetTopMargin());
937 gPad->Range(xmin - dxr*
gPad->GetLeftMargin(),
938 ymin - dyr*
gPad->GetBottomMargin(),
939 xmax + dxr*
gPad->GetRightMargin(),
940 ymax + dyr*
gPad->GetTopMargin());
941 gPad->RangeAxis(xmin, ymin, xmax, ymax);
944 for(i=0;i<theNpoints;i++) {
945 if (badcase)
continue;
946 if (x) theX[i] =
gPad->PadtoX(
gPad->AbsPixeltoX(x[i]+dpx));
947 if (
y) theY[i] =
gPad->PadtoY(
gPad->AbsPixeltoY(
y[i]+dpy));
950 theX[ipoint] =
gPad->PadtoX(
gPad->AbsPixeltoX(pxold));
951 theY[ipoint] =
gPad->PadtoY(
gPad->AbsPixeltoY(pyold));
955 theX[theNpoints-1] = theX[0];
956 theY[theNpoints-1] = theY[0];
958 if (ipoint == theNpoints-1) {
959 theX[0] = theX[theNpoints-1];
960 theY[0] = theY[theNpoints-1];
988 strlcpy(chopt,option,80);
991 char *l1 = strstr(chopt,
"pfc");
992 char *l2 = strstr(chopt,
"plc");
993 char *l3 = strstr(chopt,
"pmc");
994 if (l1 || l2 || l3) {
1003 char *l4 = strstr(chopt,
"rx");
1004 char *l5 = strstr(chopt,
"ry");
1037 gPad->PushSelectableObject(theGraph);
1039 Int_t optionLine , optionAxis , optionCurve , optionStar , optionMark;
1040 Int_t optionBar , optionR , optionOne , optionE;
1041 Int_t optionFill , optionZ , optionCurveFill, optionIAxis;
1042 Int_t i, npt, nloop;
1045 Double_t barxmin, barxmax, barymin, barymax;
1052 Error(
"PaintGraph",
"illegal number of points (%d)", npoints);
1059 if (opt.
Contains(
"L")) optionLine = 1;
else optionLine = 0;
1060 if (opt.
Contains(
"A")) optionAxis = 1;
else optionAxis = 0;
1061 if (opt.
Contains(
"C")) optionCurve = 1;
else optionCurve = 0;
1062 if (opt.
Contains(
"*")) optionStar = 1;
else optionStar = 0;
1063 if (opt.
Contains(
"P")) optionMark = 1;
else optionMark = 0;
1064 if (opt.
Contains(
"B")) optionBar = 1;
else optionBar = 0;
1065 if (opt.
Contains(
"R")) optionR = 1;
else optionR = 0;
1066 if (opt.
Contains(
"1")) optionOne = 1;
else optionOne = 0;
1067 if (opt.
Contains(
"F")) optionFill = 1;
else optionFill = 0;
1068 if (opt.
Contains(
"I")) optionIAxis = 1;
else optionIAxis = 0;
1074 if (optionLine+optionFill+optionCurve+optionStar+optionMark+optionBar+optionE == 0) {
1075 if (!chopt[0]) optionLine=1;
1081 optionCurveFill = 0;
1082 if (optionCurve && optionFill) {
1083 optionCurveFill = 1;
1088 Double_t rwxmin,rwxmax, rwymin, rwymax, maximum, minimum, dx, dy;
1091 rwxmin =
gPad->GetUxmin();
1092 rwxmax =
gPad->GetUxmax();
1093 rwymin =
gPad->GetUymin();
1094 rwymax =
gPad->GetUymax();
1097 if (minimum == -1111) {
1101 if (maximum == -1111) {
1105 uxmin =
gPad->PadtoX(rwxmin);
1106 uxmax =
gPad->PadtoX(rwxmax);
1109 theGraph->
ComputeRange(rwxmin, rwymin, rwxmax, rwymax);
1111 if (rwxmin == rwxmax) rwxmax += 1.;
1112 if (rwymin == rwymax) rwymax += 1.;
1113 dx = 0.1*(rwxmax-rwxmin);
1114 dy = 0.1*(rwymax-rwymin);
1115 uxmin = rwxmin - dx;
1116 uxmax = rwxmax + dx;
1117 minimum = rwymin - dy;
1118 maximum = rwymax + dy;
1122 if (uxmin < 0 && rwxmin >= 0) uxmin = 0.9*rwxmin;
1123 if (uxmax > 0 && rwxmax <= 0) {
1124 if (
gPad->GetLogx()) uxmax = 1.1*rwxmax;
1127 if (minimum < 0 && rwymin >= 0) minimum = 0.9*rwymin;
1128 if (maximum > 0 && rwymax <= 0) {
1132 if (minimum <= 0 && gPad->GetLogy()) minimum = 0.001*maximum;
1133 if (uxmin <= 0 && gPad->GetLogx()) {
1134 if (uxmax > 1000) uxmin = 1;
1135 else uxmin = 0.001*uxmax;
1142 char chopth[8] =
" ";
1143 if (strstr(chopt,
"x+")) strncat(chopth,
"x+",2);
1144 if (strstr(chopt,
"y+")) strncat(chopth,
"y+",2);
1145 if (optionIAxis) strncat(chopth,
"A",1);
1152 if (theNpoints > npt) npt = theNpoints;
1163 if (
gPad->GetLogy()) {
1183 TIter next(functions);
1184 while ((f = (
TObject*) next())) {
1193 rwxmin =
gPad->GetUxmin();
1194 rwxmax =
gPad->GetUxmax();
1195 rwymin =
gPad->GetUymin();
1196 rwymax =
gPad->GetUymax();
1197 uxmin =
gPad->PadtoX(rwxmin);
1198 uxmax =
gPad->PadtoX(rwxmax);
1203 maximum =
gPad->PadtoY(rwymax);
1204 minimum =
gPad->PadtoY(rwymin);
1208 theGraph->TAttLine::Modify();
1209 theGraph->TAttFill::Modify();
1210 theGraph->TAttMarker::Modify();
1218 if (optionLine || optionFill) {
1224 if (optionFill && (xn != x1 || yn != y1)) nloop++;
1226 for (i=1;i<=nloop;i++) {
1269 if (optionCurveFill) {
1271 if (xn != x1 || yn != y1) nloop++;
1275 for (i=1;i<=nloop;i++) {
1300 for (i=1;i<=nloop;i++) {
1304 if (y[i-1] < minimum || y[i-1] > maximum)
continue;
1305 if (x[i-1] < uxmin || x[i-1] > uxmax)
continue;
1331 for (i=1;i<=npoints;i++) {
1346 for (i=1;i<=npoints;i++) {
1363 for (i=1;i<npoints;i++) {
1364 if (x[i] < barxmin) barxmin = x[i];
1365 if (x[i] > barxmax) barxmax = x[i];
1367 bdelta = (barxmax-barxmin)/
Double_t(npoints);
1371 for (i=1;i<npoints;i++) {
1372 if (y[i] < barymin) barymin = y[i];
1373 if (y[i] > barymax) barymax = y[i];
1375 bdelta = (barymax-barymin)/
Double_t(npoints);
1379 for (i=1;i<=npoints;i++) {
1380 xlow = x[i-1] - dbar;
1381 xhigh = x[i-1] + dbar;
1383 if (xlow < uxmin) xlow = uxmin;
1384 if (xhigh > uxmax) xhigh = uxmax;
1386 else ylow =
gPad->GetUymin();
1400 for (i=1;i<=npoints;i++) {
1402 ylow = y[i-1] - dbar;
1403 yhigh = y[i-1] + dbar;
1456 const char *where =
"PaintGrapHist";
1458 Int_t optionLine , optionAxis , optionCurve, optionStar, optionMark;
1459 Int_t optionBar , optionRot , optionOne , optionOff ;
1460 Int_t optionFill , optionZ;
1461 Int_t optionHist , optionBins , optionMarker;
1463 Int_t drawtype=0, drawborder, drawbordersav;
1469 Double_t xi, xi1, xj, xj1, yi1, yi, yj, yj1, xwmin, ywmin;
1473 char choptaxis[10] =
" ";
1476 Error(where,
"illegal number of points (%d)", npoints);
1481 if (opt.
Contains(
"H")) optionHist = 1;
else optionHist = 0;
1482 if (opt.
Contains(
"F")) optionFill = 1;
else optionFill = 0;
1483 if (opt.
Contains(
"C")) optionCurve= 1;
else optionCurve= 0;
1484 if (opt.
Contains(
"*")) optionStar = 1;
else optionStar = 0;
1485 if (opt.
Contains(
"R")) optionRot = 1;
else optionRot = 0;
1486 if (opt.
Contains(
"1")) optionOne = 1;
else optionOne = 0;
1487 if (opt.
Contains(
"B")) optionBar = 1;
else optionBar = 0;
1488 if (opt.
Contains(
"N")) optionBins = 1;
else optionBins = 0;
1489 if (opt.
Contains(
"L")) optionLine = 1;
else optionLine = 0;
1490 if (opt.
Contains(
"P")) optionMark = 1;
else optionMark = 0;
1491 if (opt.
Contains(
"A")) optionAxis = 1;
else optionAxis = 0;
1492 if (opt.
Contains(
"][")) optionOff = 1;
else optionOff = 0;
1493 if (opt.
Contains(
"P0")) optionMark = 10;
1495 Int_t optionFill2 = 0;
1497 optionFill = 0; optionFill2 = 1;
1512 nbins = last - first + 1;
1524 Double_t rounding = (uxmax-uxmin)*1.
e-5;
1527 Int_t nx1, nx2, ndivx, ndivy, ndiv;
1540 if (ndivx < 0) strlcat(choptaxis,
"N",10);
1541 if (
gPad->GetGridx()) {
1543 strlcat(choptaxis,
"W",10);
1545 if (
gPad->GetLogx()) {
1549 strlcat(choptaxis,
"G",10);
1559 axis->
PaintAxis(rwxmin,rwymin,rwxmax,rwymin,rwmin,rwmax,ndiv,choptaxis);
1569 strlcat(choptaxis,
"N",10);
1572 if (
gPad->GetGridy()) {
1574 strlcat(choptaxis,
"W",10);
1576 if (
gPad->GetLogy()) {
1580 strlcat(choptaxis,
"G",10);
1589 axis->
PaintAxis(rwxmin,rwymin,rwxmin,rwymax,rwmin,rwmax,ndiv,choptaxis);
1595 theGraph->TAttLine::Modify();
1596 theGraph->TAttFill::Modify();
1597 theGraph->TAttMarker::Modify();
1601 if (!optionRot) {wmin = x[0]; wmax = x[1];}
1602 else {wmin = y[0]; wmax = y[1];}
1604 if (!optionBins) delta = (wmax - wmin)/
Double_t(nbins);
1606 Int_t fwidth =
gPad->GetFrameLineWidth();
1609 if (optionOff) fwidth = 1;
1625 if (optionFill && !optionCurve) {
1633 for (j=first; j<=last;j++) {
1636 gxwork[npt] = wmin+((j-first+1)*delta);
1640 xj1 = x[j]; xj = x[j-1];
1642 if (j != last)
Error(where,
"X must be in increasing order");
1643 else Error(where,
"X must have N+1 values with option N");
1648 gywork[npt-1] = y[j-1];
1649 gywork[npt] = y[j-1];
1650 if (gywork[npt] < vymin) {gywork[npt] = vymin; gywork[npt-1] = vymin;}
1651 if ((
gxwork[npt-1] >= uxmin-rounding &&
gxwork[npt-1] <= uxmax+rounding) ||
1652 (
gxwork[npt] >= uxmin-rounding &&
gxwork[npt] <= uxmax+rounding)) npt += 2;
1655 gywork[npt-1] = gywork[0];
1659 if (gywork[0] < vymin) {gywork[0] = vymin; gywork[npt-1] = vymin;}
1665 if (!fillarea)
gyworkl[0] = ylast;
1676 for (j=first; j<=last;j++) {
1679 gywork[npt] = wmin+((j-first+1)*delta);
1681 yj1 = y[j]; yj = y[j-1];
1683 if (j != last)
Error(where,
"Y must be in increasing order");
1684 else Error(where,
"Y must have N+1 values with option N");
1689 gxwork[npt-1] = x[j-1]; gxwork[npt] = x[j-1];
1690 if ((gxwork[npt-1] >= uxmin-rounding && gxwork[npt-1] <= uxmax+rounding) ||
1691 (gxwork[npt] >= uxmin-rounding && gxwork[npt] <= uxmax+rounding)) npt += 2;
1694 gxwork[npt-1] = gxwork[0];
1698 if (!fillarea)
gyworkl[0] = ylast;
1705 theGraph->TAttLine::Modify();
1706 theGraph->TAttFill::Modify();
1711 if ((optionHist) || !chopt[0]) {
1717 for (i=first; i<=last;i++) {
1720 gxwork[npt] = wmin+((i-first+1)*delta);
1722 xi1 = x[i]; xi = x[i-1];
1724 if (i != last)
Error(where,
"X must be in increasing order");
1725 else Error(where,
"X must have N+1 values with option N");
1733 if ((
gxwork[npt-1] >= uxmin-rounding &&
gxwork[npt-1] <= uxmax+rounding) ||
1734 (
gxwork[npt] >= uxmin-rounding &&
gxwork[npt] <= uxmax+rounding)) npt += 2;
1746 Int_t nbpoints = npt-2;
1752 for (ip=point1; ip<=nbpoints; ip++) {
1759 Int_t point2 = nbpoints;
1760 for (ip=point2; ip>=point1; ip--) {
1766 nbpoints = point2-point1+1;
1770 if (
gxwork[0] >
gPad->GetUxmin()) { nbpoints++; point1 = 0; }
1771 if (
gxwork[nbpoints] <
gPad->GetUxmax()) nbpoints++;
1783 for (i=first; i<=last;i++) {
1786 gywork[npt] = wmin+((i-first+1)*delta);
1788 yi1 = y[i]; yi = y[i-1];
1790 if (i != last)
Error(where,
"Y must be in increasing order");
1791 else Error(where,
"Y must have N+1 values with option N");
1797 if ((
gxwork[npt-1] >= uxmin-rounding &&
gxwork[npt-1] <= uxmax+rounding) ||
1798 (
gxwork[npt] >= uxmin-rounding &&
gxwork[npt] <= uxmax+rounding)) npt += 2;
1817 if (!optionOne) drawtype = 2;
1822 for (i=first; i<=last;i++) {
1825 gxwork[npt-1] = wmin+(i-first)*delta+0.5*delta;
1827 xi1 = x[i]; xi = x[i-1];
1829 if (i != last)
Error(where,
"X must be in increasing order");
1830 else Error(where,
"X must have N+1 values with option N");
1833 gxwork[npt-1] = x[i-1] + 0.5*(x[i]-x[i-1]);
1864 drawtype = drawtype+10;
1866 for (i=first; i<=last;i++) {
1869 gywork[npt-1] = wmin+(i-first)*delta+0.5*delta;
1871 yi1 = y[i]; yi = y[i-1];
1873 if (i != last)
Error(where,
"Y must be in increasing order");
1874 else Error(where,
"Y must have N+1 values with option N");
1877 gywork[npt-1] = y[i-1] + 0.5*(y[i]-y[i-1]);
1909 wminstep = wmin + 0.5*delta;
1911 gPad->GetRangeAxis(ax1,ay1,ax2,ay2);
1915 for (i=first; i<=last;i++) {
1918 gxwork[npt-1] = wmin+(i-first)*delta+0.5*delta;
1920 xi1 = x[i]; xi = x[i-1];
1922 if (i != last)
Error(where,
"X must be in increasing order");
1923 else Error(where,
"X must have N+1 values with option N");
1926 gxwork[npt-1] = x[i-1] + 0.5*(x[i]-x[i-1]);
1928 if (
gxwork[npt-1] < uxmin ||
gxwork[npt-1] > uxmax) { npt--;
continue;}
1931 if ((
gywork[npt-1] < rwymin) || ((
gywork[npt-1] > rwymax) && !optionFill2)) {
1970 for (i=first; i<=last;i++) {
1973 gywork[npt-1] = wminstep+(i-first)*delta+0.5*delta;
1975 yi1 = y[i]; yi = y[i-1];
1977 if (i != last)
Error(where,
"Y must be in increasing order");
1978 else Error(where,
"Y must have N+1 values with option N");
1981 gywork[npt-1] = y[i-1] + 0.5*(y[i]-y[i-1]);
1984 if ((
gxwork[npt-1] < uxmin) || (
gxwork[npt-1] > uxmax)) {
2006 if (optionLine != 0 && npt > 1) {
2017 offset = delta*baroffset; dbar = delta*barwidth;
2020 offset = (x[1]-x[0])*baroffset;
2021 dbar = (x[1]-x[0])*barwidth;
2023 offset = (y[1]-y[0])*baroffset;
2024 dbar = (y[1]-y[0])*barwidth;
2027 drawbordersav = drawborder;
2031 xhigh = wmin+offset+dbar;
2034 else ylow =
gPad->GetUymin();
2036 for (i=first; i<=last;i++) {
2043 if (xlow < rwxmax && xhigh > rwxmin)
2047 xhigh = xhigh+delta;
2050 xi1 = x[i]; xi = x[i-1];
2052 Error(where,
"X must be in increasing order");
2055 offset = (x[i+1]-x[i])*baroffset;
2056 dbar = (x[i+1]-x[i])*barwidth;
2057 xlow = x[i] + offset;
2058 xhigh = x[i] + offset + dbar;
2063 ylow = wmin + offset;
2064 yhigh = wmin + offset + dbar;
2066 else xlow =
gPad->GetUxmin();
2067 for (i=first; i<=last;i++) {
2075 gPad->PaintBox(xlow,ylow,xhigh,yhigh);
2077 ylow = ylow + delta;
2078 yhigh = yhigh + delta;
2081 yi1 = y[i]; yi = y[i-1];
2083 Error(where,
"Y must be in increasing order");
2086 offset = (y[i+1]-y[i])*baroffset;
2087 dbar = (y[i+1]-y[i])*barwidth;
2088 ylow = y[i] + offset;
2089 yhigh = y[i] + offset + dbar;
2100 if ((optionStar) || (optionMark)) optionMarker=1;
2106 for (i=first; i<=last;i++) {
2107 if (!optionBins) xm = wmin+(i-first)*delta+0.5*delta;
2108 else xm = x[i-1] + 0.5*(x[i]-x[i-1]);
2110 if (optionMark != 10) {
2111 if (ym<rwymax && ym > rwymin) {
2117 if (ym<rwymax && ym >= rwymin) {
2134 wminstep = wmin + 0.5*delta;
2135 for (i=first; i<=last;i++) {
2136 if (!optionBins) ym = wminstep+(i-first)*delta+0.5*delta;
2137 else ym = y[i-1] + 0.5*(y[i]-y[i-1]);
2139 if (optionMark != 10) {
2140 if (xm<rwxmax && xm > rwxmin) {
2146 if (xm<rwxmax && xm >= rwxmin) {
2186 const Int_t kBASEMARKER=8;
2187 Double_t s2x, s2y, symbolsize, sbase;
2188 Double_t x,
y, xl1, xl2, xr1, xr2, yup1, yup2, ylow1, ylow2, tx, ty;
2189 static Float_t cxx[15] = {1,1,0.6,0.6,1,1,0.6,0.5,1,0.6,0.6,1,0.6,1,1};
2190 static Float_t cyy[15] = {1,1,1,1,1,1,1,1,1,0.5,0.6,1,1,1,1};
2199 if (strchr(option,
'X') || strchr(option,
'x')) {
PaintGraphSimple(theGraph, option);
return;}
2202 if (strstr(option,
"||") || strstr(option,
"[]")) {
2204 if (strstr(option,
"[]")) braticks =
kTRUE;
2207 if (strchr(option,
'z')) endLines =
kFALSE;
2208 if (strchr(option,
'Z')) endLines =
kFALSE;
2209 const char *arrowOpt = 0;
2210 if (strchr(option,
'>')) arrowOpt =
">";
2211 if (strstr(option,
"|>")) arrowOpt =
"|>";
2214 if (strchr(option,
'a')) axis =
kTRUE;
2215 if (strchr(option,
'A')) axis =
kTRUE;
2223 if (strchr(option,
'0')) option0 =
kTRUE;
2224 if (strchr(option,
'2')) option2 =
kTRUE;
2225 if (strchr(option,
'3')) option3 =
kTRUE;
2226 if (strchr(option,
'4')) {option3 =
kTRUE; option4 =
kTRUE;}
2227 if (strchr(option,
'5')) {option2 =
kTRUE; option5 =
kTRUE;}
2230 xline =
new Double_t[2*theNpoints];
2231 yline =
new Double_t[2*theNpoints];
2232 if (!xline || !yline) {
2233 Error(
"Paint",
"too many points, out of memory");
2240 theGraph->TAttLine::Modify();
2255 sbase = symbolsize*kBASEMARKER;
2259 if (mark >= 20 && mark <= 34) {
2268 tx =
gPad->PixeltoX(dxend) -
gPad->PixeltoX(0);
2269 ty =-
gPad->PixeltoY(dxend) +
gPad->PixeltoY(0);
2270 Float_t asize = 0.6*symbolsize*kBASEMARKER/
gPad->GetWh();
2273 for (
Int_t i=0;i<theNpoints;i++) {
2274 x =
gPad->XtoPad(theX[i]);
2275 y =
gPad->YtoPad(theY[i]);
2278 if (x < gPad->GetUxmin()) x =
gPad->GetUxmin();
2279 if (x >
gPad->GetUxmax()) x =
gPad->GetUxmax();
2280 if (y < gPad->GetUymin()) y =
gPad->GetUymin();
2281 if (y >
gPad->GetUymax()) y =
gPad->GetUymax();
2283 if (x < gPad->GetUxmin())
continue;
2284 if (x >
gPad->GetUxmax())
continue;
2285 if (y < gPad->GetUymin())
continue;
2286 if (y >
gPad->GetUymax())
continue;
2290 xl2 =
gPad->XtoPad(theX[i] - theEXlow[i]);
2294 x1b =
gPad->XtoPad(theX[i] - theEXlow[i]);
2295 y1b =
gPad->YtoPad(theY[i] - theEYlow[i]);
2296 x2b =
gPad->XtoPad(theX[i] + theEXhigh[i]);
2297 y2b =
gPad->YtoPad(theY[i] + theEYhigh[i]);
2298 if (x1b < gPad->GetUxmin()) x1b =
gPad->GetUxmin();
2299 if (x1b >
gPad->GetUxmax()) x1b =
gPad->GetUxmax();
2300 if (y1b < gPad->GetUymin()) y1b =
gPad->GetUymin();
2301 if (y1b >
gPad->GetUymax()) y1b =
gPad->GetUymax();
2302 if (x2b < gPad->GetUxmin()) x2b =
gPad->GetUxmin();
2303 if (x2b >
gPad->GetUxmax()) x2b =
gPad->GetUxmax();
2304 if (y2b < gPad->GetUymin()) y2b =
gPad->GetUymin();
2305 if (y2b >
gPad->GetUymax()) y2b =
gPad->GetUymax();
2306 if (option5) box.
PaintBox(x1b, y1b, x2b, y2b,
"l");
2307 else box.
PaintBox(x1b, y1b, x2b, y2b);
2315 yline[if1-1] =
gPad->YtoPad(theY[i] + theEYhigh[i]);
2316 yline[if2-1] =
gPad->YtoPad(theY[i] - theEYlow[i]);
2324 arrow.
PaintArrow(xl1,y,xl2,y,asize,arrowOpt);
2326 if (!brackets)
gPad->PaintLine(xl1,y,xl2,y);
2329 xb[0] = xl2+tx; yb[0] = y-ty;
2330 xb[1] = xl2; yb[1] = y-ty;
2331 xb[2] = xl2; yb[2] = y+ty;
2332 xb[3] = xl2+tx; yb[3] = y+ty;
2333 gPad->PaintPolyLine(4, xb, yb);
2335 gPad->PaintLine(xl2,y-ty,xl2,y+ty);
2341 xr2 =
gPad->XtoPad(theX[i] + theEXhigh[i]);
2344 arrow.
PaintArrow(xr1,y,xr2,y,asize,arrowOpt);
2346 if (!brackets)
gPad->PaintLine(xr1,y,xr2,y);
2349 xb[0] = xr2-tx; yb[0] = y-ty;
2350 xb[1] = xr2; yb[1] = y-ty;
2351 xb[2] = xr2; yb[2] = y+ty;
2352 xb[3] = xr2-tx; yb[3] = y+ty;
2353 gPad->PaintPolyLine(4, xb, yb);
2355 gPad->PaintLine(xr2,y-ty,xr2,y+ty);
2361 yup2 =
gPad->YtoPad(theY[i] + theEYhigh[i]);
2362 if (yup2 >
gPad->GetUymax()) yup2 =
gPad->GetUymax();
2365 arrow.
PaintArrow(x,yup1,x,yup2,asize,arrowOpt);
2367 if (!brackets)
gPad->PaintLine(x,yup1,x,yup2);
2370 xb[0] = x-tx; yb[0] = yup2-ty;
2371 xb[1] = x-tx; yb[1] = yup2;
2372 xb[2] = x+tx; yb[2] = yup2;
2373 xb[3] = x+tx; yb[3] = yup2-ty;
2374 gPad->PaintPolyLine(4, xb, yb);
2376 gPad->PaintLine(x-tx,yup2,x+tx,yup2);
2382 ylow2 =
gPad->YtoPad(theY[i] - theEYlow[i]);
2383 if (ylow2 < gPad->GetUymin()) ylow2 =
gPad->GetUymin();
2384 if (ylow2 < ylow1) {
2386 arrow.
PaintArrow(x,ylow1,x,ylow2,asize,arrowOpt);
2388 if (!brackets)
gPad->PaintLine(x,ylow1,x,ylow2);
2391 xb[0] = x-tx; yb[0] = ylow2+ty;
2392 xb[1] = x-tx; yb[1] = ylow2;
2393 xb[2] = x+tx; yb[2] = ylow2;
2394 xb[3] = x+tx; yb[3] = ylow2+ty;
2395 gPad->PaintPolyLine(4, xb, yb);
2397 gPad->PaintLine(x-tx,ylow2,x+tx,ylow2);
2411 if (option4)
PaintGraph(theGraph, 2*theNpoints, xline, yline,
"FC");
2412 else PaintGraph(theGraph, 2*theNpoints, xline, yline,
"F");
2413 gPad->SetLogx(logx);
2414 gPad->SetLogy(logy);
2433 const Int_t kBASEMARKER=8;
2434 Double_t s2x, s2y, symbolsize, sbase;
2435 Double_t x,
y, xl1, xl2, xr1, xr2, yup1, yup2, ylow1, ylow2, tx, ty;
2437 static Float_t cxx[15] = {1,1,0.6,0.6,1,1,0.6,0.5,1,0.6,0.6,1,0.6,1,1};
2438 static Float_t cyy[15] = {1,1,1,1,1,1,1,1,1,0.5,0.6,1,1,1,1};
2451 if (strchr(option,
'X') || strchr(option,
'x')) {
PaintGraphSimple(theGraph, option);
return;}
2454 if (strstr(option,
"||") || strstr(option,
"[]")) {
2456 if (strstr(option,
"[]")) braticks =
kTRUE;
2459 if (strchr(option,
'z')) endLines =
kFALSE;
2460 if (strchr(option,
'Z')) endLines =
kFALSE;
2461 const char *arrowOpt = 0;
2462 if (strchr(option,
'>')) arrowOpt =
">";
2463 if (strstr(option,
"|>")) arrowOpt =
"|>";
2466 if (strchr(option,
'a')) axis =
kTRUE;
2467 if (strchr(option,
'A')) axis =
kTRUE;
2475 if (strchr(option,
'0')) option0 =
kTRUE;
2476 if (strchr(option,
'2')) option2 =
kTRUE;
2477 if (strchr(option,
'3')) option3 =
kTRUE;
2478 if (strchr(option,
'4')) {option3 =
kTRUE; option4 =
kTRUE;}
2479 if (strchr(option,
'5')) {option2 =
kTRUE; option5 =
kTRUE;}
2482 xline =
new Double_t[2*theNpoints];
2483 yline =
new Double_t[2*theNpoints];
2484 if (!xline || !yline) {
2485 Error(
"Paint",
"too many points, out of memory");
2492 theGraph->TAttLine::Modify();
2507 sbase = symbolsize*kBASEMARKER;
2511 if (mark >= 20 && mark <= 34) {
2520 tx =
gPad->PixeltoX(dxend) -
gPad->PixeltoX(0);
2521 ty =-
gPad->PixeltoY(dxend) +
gPad->PixeltoY(0);
2522 Float_t asize = 0.6*symbolsize*kBASEMARKER/
gPad->GetWh();
2525 for (
Int_t i=0;i<theNpoints;i++) {
2526 x =
gPad->XtoPad(theX[i]);
2527 y =
gPad->YtoPad(theY[i]);
2528 bxl =
gPad->YtoPad(theY[i]+theEXlowd[i]);
2529 bxh =
gPad->YtoPad(theY[i]+theEXhighd[i]);
2530 byl =
gPad->XtoPad(theX[i]+theEYlowd[i]);
2531 byh =
gPad->XtoPad(theX[i]+theEYhighd[i]);
2534 if (x < gPad->GetUxmin()) x =
gPad->GetUxmin();
2535 if (x >
gPad->GetUxmax()) x =
gPad->GetUxmax();
2536 if (y < gPad->GetUymin()) y =
gPad->GetUymin();
2537 if (y >
gPad->GetUymax()) y =
gPad->GetUymax();
2539 if (x < gPad->GetUxmin())
continue;
2540 if (x >
gPad->GetUxmax())
continue;
2541 if (y < gPad->GetUymin())
continue;
2542 if (y >
gPad->GetUymax())
continue;
2548 x1b =
gPad->XtoPad(theX[i] - theEXlow[i]);
2549 y1b =
gPad->YtoPad(theY[i] - theEYlow[i]);
2550 x2b =
gPad->XtoPad(theX[i] + theEXhigh[i]);
2551 y2b =
gPad->YtoPad(theY[i] + theEYhigh[i]);
2552 if (x1b < gPad->GetUxmin()) x1b =
gPad->GetUxmin();
2553 if (x1b >
gPad->GetUxmax()) x1b =
gPad->GetUxmax();
2554 if (y1b < gPad->GetUymin()) y1b =
gPad->GetUymin();
2555 if (y1b >
gPad->GetUymax()) y1b =
gPad->GetUymax();
2556 if (x2b < gPad->GetUxmin()) x2b =
gPad->GetUxmin();
2557 if (x2b >
gPad->GetUxmax()) x2b =
gPad->GetUxmax();
2558 if (y2b < gPad->GetUymin()) y2b =
gPad->GetUymin();
2559 if (y2b >
gPad->GetUymax()) y2b =
gPad->GetUymax();
2560 if (option5) box.
PaintBox(x1b, y1b, x2b, y2b,
"l");
2561 else box.
PaintBox(x1b, y1b, x2b, y2b);
2569 yline[if1-1] =
gPad->YtoPad(theY[i] + theEYhigh[i]);
2570 yline[if2-1] =
gPad->YtoPad(theY[i] - theEYlow[i]);
2577 xl2 =
gPad->XtoPad(theX[i] - theEXlow[i]);
2580 arrow.
PaintArrow(xl1,y,xl2,bxl,asize,arrowOpt);
2582 if (!brackets)
gPad->PaintLine(xl1,y,xl2,bxl);
2585 xb[0] = xl2+tx; yb[0] = bxl-ty;
2586 xb[1] = xl2; yb[1] = bxl-ty;
2587 xb[2] = xl2; yb[2] = bxl+ty;
2588 xb[3] = xl2+tx; yb[3] = bxl+ty;
2589 gPad->PaintPolyLine(4, xb, yb);
2591 gPad->PaintLine(xl2,bxl-ty,xl2,bxl+ty);
2597 xr2 =
gPad->XtoPad(theX[i] + theEXhigh[i]);
2600 arrow.
PaintArrow(xr1,y,xr2,bxh,asize,arrowOpt);
2602 if (!brackets)
gPad->PaintLine(xr1,y,xr2,bxh);
2605 xb[0] = xr2-tx; yb[0] = bxh-ty;
2606 xb[1] = xr2; yb[1] = bxh-ty;
2607 xb[2] = xr2; yb[2] = bxh+ty;
2608 xb[3] = xr2-tx; yb[3] = bxh+ty;
2609 gPad->PaintPolyLine(4, xb, yb);
2611 gPad->PaintLine(xr2,bxh-ty,xr2,bxh+ty);
2617 yup2 =
gPad->YtoPad(theY[i] + theEYhigh[i]);
2618 if (yup2 >
gPad->GetUymax()) yup2 =
gPad->GetUymax();
2621 arrow.
PaintArrow(x,yup1,byh,yup2,asize,arrowOpt);
2623 if (!brackets)
gPad->PaintLine(x,yup1,byh,yup2);
2626 xb[0] = byh-tx; yb[0] = yup2-ty;
2627 xb[1] = byh-tx; yb[1] = yup2;
2628 xb[2] = byh+tx; yb[2] = yup2;
2629 xb[3] = byh+tx; yb[3] = yup2-ty;
2630 gPad->PaintPolyLine(4, xb, yb);
2632 gPad->PaintLine(byh-tx,yup2,byh+tx,yup2);
2638 ylow2 =
gPad->YtoPad(theY[i] - theEYlow[i]);
2639 if (ylow2 < gPad->GetUymin()) ylow2 =
gPad->GetUymin();
2640 if (ylow2 < ylow1) {
2642 arrow.
PaintArrow(x,ylow1,byl,ylow2,asize,arrowOpt);
2644 if (!brackets)
gPad->PaintLine(x,ylow1,byl,ylow2);
2647 xb[0] = byl-tx; yb[0] = ylow2+ty;
2648 xb[1] = byl-tx; yb[1] = ylow2;
2649 xb[2] = byl+tx; yb[2] = ylow2;
2650 xb[3] = byl+tx; yb[3] = ylow2+ty;
2651 gPad->PaintPolyLine(4, xb, yb);
2653 gPad->PaintLine(byl-tx,ylow2,byl+tx,ylow2);
2667 if (option4)
PaintGraph(theGraph, 2*theNpoints, xline, yline,
"FC");
2668 else PaintGraph(theGraph, 2*theNpoints, xline, yline,
"F");
2669 gPad->SetLogx(logx);
2670 gPad->SetLogy(logy);
2689 const Int_t kBASEMARKER=8;
2690 Double_t s2x, s2y, symbolsize, sbase;
2691 Double_t x,
y,
ex,
ey, xl1, xl2, xr1, xr2, yup1, yup2, ylow1, ylow2, tx, ty;
2692 static Float_t cxx[15] = {1,1,0.6,0.6,1,1,0.6,0.5,1,0.6,0.6,1,0.6,1,1};
2693 static Float_t cyy[15] = {1,1,1,1,1,1,1,1,1,0.5,0.6,1,1,1,1};
2700 if (strchr(option,
'X') || strchr(option,
'x')) {
PaintGraphSimple(theGraph, option);
return;}
2703 if (strstr(option,
"||") || strstr(option,
"[]")) {
2705 if (strstr(option,
"[]")) braticks =
kTRUE;
2708 if (strchr(option,
'z')) endLines =
kFALSE;
2709 if (strchr(option,
'Z')) endLines =
kFALSE;
2710 const char *arrowOpt = 0;
2711 if (strchr(option,
'>')) arrowOpt =
">";
2712 if (strstr(option,
"|>")) arrowOpt =
"|>";
2715 if (strchr(option,
'a')) axis =
kTRUE;
2716 if (strchr(option,
'A')) axis =
kTRUE;
2724 if (strchr(option,
'0')) option0 =
kTRUE;
2725 if (strchr(option,
'2')) option2 =
kTRUE;
2726 if (strchr(option,
'3')) option3 =
kTRUE;
2727 if (strchr(option,
'4')) {option3 =
kTRUE; option4 =
kTRUE;}
2728 if (strchr(option,
'5')) {option2 =
kTRUE; option5 =
kTRUE;}
2731 xline =
new Double_t[2*theNpoints];
2732 yline =
new Double_t[2*theNpoints];
2733 if (!xline || !yline) {
2734 Error(
"Paint",
"too many points, out of memory");
2741 theGraph->TAttLine::Modify();
2756 sbase = symbolsize*kBASEMARKER;
2760 if (mark >= 20 && mark <= 34) {
2769 tx =
gPad->PixeltoX(dxend) -
gPad->PixeltoX(0);
2770 ty =-
gPad->PixeltoY(dxend) +
gPad->PixeltoY(0);
2771 Float_t asize = 0.6*symbolsize*kBASEMARKER/
gPad->GetWh();
2774 for (
Int_t i=0;i<theNpoints;i++) {
2775 x =
gPad->XtoPad(theX[i]);
2776 y =
gPad->YtoPad(theY[i]);
2779 if (x < gPad->GetUxmin()) x =
gPad->GetUxmin();
2780 if (x >
gPad->GetUxmax()) x =
gPad->GetUxmax();
2781 if (y < gPad->GetUymin()) y =
gPad->GetUymin();
2782 if (y >
gPad->GetUymax()) y =
gPad->GetUymax();
2784 if (x < gPad->GetUxmin())
continue;
2785 if (x >
gPad->GetUxmax())
continue;
2786 if (y < gPad->GetUymin())
continue;
2787 if (y >
gPad->GetUymax())
continue;
2795 x1b =
gPad->XtoPad(theX[i] - ex);
2796 y1b =
gPad->YtoPad(theY[i] - ey);
2797 x2b =
gPad->XtoPad(theX[i] + ex);
2798 y2b =
gPad->YtoPad(theY[i] + ey);
2799 if (x1b < gPad->GetUxmin()) x1b =
gPad->GetUxmin();
2800 if (x1b >
gPad->GetUxmax()) x1b =
gPad->GetUxmax();
2801 if (y1b < gPad->GetUymin()) y1b =
gPad->GetUymin();
2802 if (y1b >
gPad->GetUymax()) y1b =
gPad->GetUymax();
2803 if (x2b < gPad->GetUxmin()) x2b =
gPad->GetUxmin();
2804 if (x2b >
gPad->GetUxmax()) x2b =
gPad->GetUxmax();
2805 if (y2b < gPad->GetUymin()) y2b =
gPad->GetUymin();
2806 if (y2b >
gPad->GetUymax()) y2b =
gPad->GetUymax();
2807 if (option5) box.
PaintBox(x1b, y1b, x2b, y2b,
"l");
2808 else box.
PaintBox(x1b, y1b, x2b, y2b);
2816 yline[if1-1] =
gPad->YtoPad(theY[i] + ey);
2817 yline[if2-1] =
gPad->YtoPad(theY[i] - ey);
2824 xl2 =
gPad->XtoPad(theX[i] - ex);
2827 arrow.
PaintArrow(xl1,y,xl2,y,asize,arrowOpt);
2829 if (!brackets)
gPad->PaintLine(xl1,y,xl2,y);
2832 xb[0] = xl2+tx; yb[0] = y-ty;
2833 xb[1] = xl2; yb[1] = y-ty;
2834 xb[2] = xl2; yb[2] = y+ty;
2835 xb[3] = xl2+tx; yb[3] = y+ty;
2836 gPad->PaintPolyLine(4, xb, yb);
2838 gPad->PaintLine(xl2,y-ty,xl2,y+ty);
2844 xr2 =
gPad->XtoPad(theX[i] + ex);
2847 arrow.
PaintArrow(xr1,y,xr2,y,asize,arrowOpt);
2849 if (!brackets)
gPad->PaintLine(xr1,y,xr2,y);
2852 xb[0] = xr2-tx; yb[0] = y-ty;
2853 xb[1] = xr2; yb[1] = y-ty;
2854 xb[2] = xr2; yb[2] = y+ty;
2855 xb[3] = xr2-tx; yb[3] = y+ty;
2856 gPad->PaintPolyLine(4, xb, yb);
2858 gPad->PaintLine(xr2,y-ty,xr2,y+ty);
2864 yup2 =
gPad->YtoPad(theY[i] + ey);
2865 if (yup2 >
gPad->GetUymax()) yup2 =
gPad->GetUymax();
2868 arrow.
PaintArrow(x,yup1,x,yup2,asize,arrowOpt);
2870 if (!brackets)
gPad->PaintLine(x,yup1,x,yup2);
2873 xb[0] = x-tx; yb[0] = yup2-ty;
2874 xb[1] = x-tx; yb[1] = yup2;
2875 xb[2] = x+tx; yb[2] = yup2;
2876 xb[3] = x+tx; yb[3] = yup2-ty;
2877 gPad->PaintPolyLine(4, xb, yb);
2879 gPad->PaintLine(x-tx,yup2,x+tx,yup2);
2885 ylow2 =
gPad->YtoPad(theY[i] - ey);
2886 if (ylow2 < gPad->GetUymin()) ylow2 =
gPad->GetUymin();
2887 if (ylow2 < ylow1) {
2889 arrow.
PaintArrow(x,ylow1,x,ylow2,asize,arrowOpt);
2891 if (!brackets)
gPad->PaintLine(x,ylow1,x,ylow2);
2894 xb[0] = x-tx; yb[0] = ylow2+ty;
2895 xb[1] = x-tx; yb[1] = ylow2;
2896 xb[2] = x+tx; yb[2] = ylow2;
2897 xb[3] = x+tx; yb[3] = ylow2+ty;
2898 gPad->PaintPolyLine(4, xb, yb);
2900 gPad->PaintLine(x-tx,ylow2,x+tx,ylow2);
2914 if (option4)
PaintGraph(theGraph, 2*theNpoints, xline, yline,
"FC");
2915 else PaintGraph(theGraph, 2*theNpoints, xline, yline,
"F");
2916 gPad->SetLogx(logx);
2917 gPad->SetLogy(logy);
2931 Double_t rwrmin, rwrmax, rwtmin, rwtmax;
2935 Int_t theNpoints = theGraphPolar->
GetN();
2941 if (theNpoints<1)
return;
2956 if (thePolargram)
if (!
gPad->FindObject(thePolargram->
GetName())) thePolargram=0;
2957 if (!thePolargram) {
2960 while (
TObject* AnyObj = padObjIter.Next()) {
2961 if (
TString(AnyObj->ClassName()).CompareTo(
"TGraphPolargram",
2970 if (!thePolargram) {
2972 rwrmin = theY[0]; rwrmax = theY[theNpoints-1];
2973 rwtmin = theX[0]; rwtmax = theX[theNpoints-1];
2975 for (ipt = 0; ipt < theNpoints; ipt++) {
2978 if (theX[ipt] -theEX[ipt] < rwtmin) rwtmin = theX[ipt]-theEX[ipt];
2979 if (theX[ipt] +theEX[ipt] > rwtmax) rwtmax = theX[ipt]+theEX[ipt];
2981 if (theX[ipt] < rwtmin) rwtmin=theX[ipt];
2982 if (theX[ipt] > rwtmax) rwtmax=theX[ipt];
2985 if (theY[ipt] -theEY[ipt] < rwrmin) rwrmin = theY[ipt]-theEY[ipt];
2986 if (theY[ipt] +theEY[ipt] > rwrmax) rwrmax = theY[ipt]+theEY[ipt];
2988 if (theY[ipt] < rwrmin) rwrmin=theY[ipt];
2989 if (theY[ipt] > rwrmax) rwrmax=theY[ipt];
2993 if (rwrmin == rwrmax) rwrmax += 1.;
2994 if (rwtmin == rwtmax) rwtmax += 1.;
3001 rwtmax += dt/theNpoints;
3003 rwrmin = thePolargram->
GetRMin();
3004 rwrmax = thePolargram->
GetRMax();
3005 rwtmin = thePolargram->
GetTMin();
3006 rwtmax = thePolargram->
GetTMax();
3011 thePolargram =
new TGraphPolargram(
"Polargram",rwrmin,rwrmax,rwtmin,rwtmax);
3015 if (nolabel) thePolargram->
Draw(
"N");
3016 else thePolargram->
Draw(
"");
3025 Double_t radiusNDC = rwrmax-rwrmin;
3035 for (i=0; i<theNpoints; i++) {
3036 Double_t eymin, eymax, exmin,exmax;
3037 exmin = (theY[i]-theEY[i]-rwrmin)/radiusNDC*
3039 eymin = (theY[i]-theEY[i]-rwrmin)/radiusNDC*
3041 exmax = (theY[i]+theEY[i]-rwrmin)/radiusNDC*
3043 eymax = (theY[i]+theEY[i]-rwrmin)/radiusNDC*
3045 theGraphPolar->TAttLine::Modify();
3046 if (exmin != exmax || eymin != eymax)
gPad->PaintLine(exmin,eymin,exmax,eymax);
3050 for (i=0; i<theNpoints; i++) {
3054 theGraphPolar->TAttLine::Modify();
3055 if (phimin != phimax) thePolargram->
PaintCircle(0,0,rad,phimin,phimax,0);
3061 if (!(
gPad->GetLogx()) && !(
gPad->GetLogy())) {
3062 Double_t a,
b, c=1,
x1,
x2, y1, y2, discr, norm1, norm2, xts, yts;
3070 for (i=0; i<theNpoints; i++) {
3073 xt = (theY[i]-rwrmin)/radiusNDC*
TMath::Cos(c*(theX[i]-rwtmin)/thetaNDC);
3074 yt = (theY[i]-rwrmin)/radiusNDC*
TMath::Sin(c*(theX[i]-rwtmin)/thetaNDC);
3075 norm =
sqrt(xt*xt+yt*yt);
3080 if (!previouspointin) {
3085 a = (yt-yts)/(xt-xts);
3087 discr = 4*(a*a-b*b+1);
3088 x1 = (-2*a*b+
sqrt(discr))/(2*(a*a+1));
3089 x2 = (-2*a*b-
sqrt(discr))/(2*(a*a+1));
3092 norm1 =
sqrt((x1-xt)*(x1-xt)+(y1-yt)*(y1-yt));
3093 norm2 =
sqrt((x2-xt)*(x2-xt)+(y2-yt)*(y2-yt));
3094 previouspointin =
kFALSE;
3096 if (norm1 < norm2) {
3106 PaintGraph(theGraphPolar, j+1, theXpol, theYpol, opt);
3111 if (j>=1 && !previouspointin) {
3112 a = (yt-theYpol[j])/(xt-theXpol[j]);
3113 b = theYpol[j]-a*theXpol[j];
3114 previouspointin =
kTRUE;
3115 discr = 4*(a*a-b*b+1);
3116 x1 = (-2*a*b+
sqrt(discr))/(2*(a*a+1));
3117 x2 = (-2*a*b-
sqrt(discr))/(2*(a*a+1));
3120 norm1 =
sqrt((x1-xt)*(x1-xt)+(y1-yt)*(y1-yt));
3121 norm2 =
sqrt((x2-xt)*(x2-xt)+(y2-yt)*(y2-yt));
3123 if (norm1 < norm2) {
3130 PaintGraph(theGraphPolar, j+1, theXpol, theYpol, opt);
3137 PaintGraph(theGraphPolar, j+1, theXpol, theYpol, opt);
3140 for (i=0; i<theNpoints; i++) {
3144 PaintGraph(theGraphPolar, theNpoints, theXpol, theYpol,opt);
3153 TIter next(
gPad->GetListOfPrimitives());
3154 while ((obj = next())) {
3157 if (title->GetName())
3158 if (strcmp(title->GetName(),
"title")) {title = 0;
continue;}
3162 if (title)
delete title;
3168 if (ht <= 0) ht = 0.05;
3183 if (wt > 0) title->SetX2NDC(title->GetX1NDC()+wt);
3189 if (talh < 1) talh = 1;
else if (talh > 3) talh = 3;
3191 if (talv < 1) talv = 1;
else if (talv > 3) talv = 3;
3197 if (talh == 2) xpos = xpos-wt/2.;
3198 if (talh == 3) xpos = xpos-wt;
3199 if (talv == 2) ypos = ypos+ht/2.;
3200 if (talv == 1) ypos = ypos+ht;
3233 TF1 *theF = theGraphQQ->
GetF();
3236 Error(
"TGraphQQ::Paint",
"2nd dataset or theoretical function not specified");
3251 Double_t yxmin, xymin, yxmax, xymax;
3257 TLine line1, line2, line3;
3260 yxmin = (theYq2-theYq1)*(xmin-theXq1)/(theXq2-theXq1) + theYq1;
3262 xymin = (theXq2-theXq1)*(ymin-theYq1)/(theYq2-theYq1) + theXq1;
3263 line1.
PaintLine(xymin, ymin, xqmin, yqmin);
3266 line1.
PaintLine(xmin, yxmin, xqmin, yqmin);
3268 line2.
PaintLine(xqmin, yqmin, xqmax, yqmax);
3270 yxmax = (theYq2-theYq1)*(xmax-theXq1)/(theXq2-theXq1) + theYq1;
3272 xymax = (theXq2-theXq1)*(ymax-theYq1)/(theYq2-theYq1) + theXq1;
3273 line3.
PaintLine(xqmax, yqmax, xymax, ymax);
3276 line3.
PaintLine(xqmax, yqmax, xmax, yxmax);
3310 theHist->
Paint(
"0");
3323 std::vector<Double_t> newX(N);
3324 std::vector<Double_t> newY(N);
3336 if (
gPad->GetGridx()) {
3337 GL = (YA2-YA1)/(
gPad->GetY2() -
gPad->GetY1());
3353 theNewAxis->
Paint();
3356 for (
Int_t i=0; i<
N; i++) newX[i] = dX-X[i];
3358 for (
Int_t i=0; i<
N; i++) newX[i] = X[i];
3369 if (
gPad->GetGridy()) {
3370 GL = (XA2-XA1)/(
gPad->GetX2() -
gPad->GetX1());
3386 theNewAxis->
Paint();
3389 for (
Int_t i=0; i<
N; i++) newY[i] = dY-Y[i];
3391 for (
Int_t i=0; i<
N; i++) newY[i] = Y[i];
3396 for (
Int_t i=0; i<
N; i++) theNewGraph->
SetPoint(i, newX[i], newY[i]);
3419 if (strstr(option,
"H") || strstr(option,
"h")) {
3428 if (!functions)
return;
3464 Double_t x1,
x2, y1, y2,
x3, y3, xm, ym,
a, a1, a2, a3;
3467 Int_t ix1,iy1,ix2,iy2;
3471 gPad->GetPadPar(x1p,y1p,x2p,y2p);
3472 ix1 = (
Int_t)(iw*x1p);
3473 iy1 = (
Int_t)(ih*y1p);
3474 ix2 = (
Int_t)(iw*x2p);
3475 iy2 = (
Int_t)(ih*y2p);
3487 gPad->GetRange(rx1,ry1,rx2,ry2);
3488 Double_t rx = (x2ndc-x1ndc)/(rx2-rx1);
3489 Double_t ry = (y2ndc-y1ndc)/(ry2-ry1);
3493 xf[0] = rx*(x[0]-rx1)+x1ndc;
3494 yf[0] = ry*(y[0]-ry1)+y1ndc;
3496 for (i=1; i<
n; i++) {
3497 if (x[i]==x[i-1] && y[i]==y[i-1])
continue;
3499 xf[nf] = rx*(x[i]-rx1)+x1ndc;
3500 if (xf[i]==xf[i-1]) xf[i] += 0.000001;
3501 yf[nf] = ry*(y[i]-ry1)+y1ndc;
3520 if (xf[nf]==xf[nf-1]) {
3523 a =
TMath::ATan((yf[nf]-yf[nf-1])/(xf[nf]-xf[nf-1]));
3525 if (xf[nf]>=xf[nf-1]) {
3534 for (i=1; i<nf; i++) {
3546 if (xi1<xi0) a1 = a1+3.14159;
3552 if (xi0<xi2) a2 = a2+3.14159;
3567 if ((xm-xi0)*(x3-xi0)<0 && (ym-yi0)*(y3-yi0)<0) {
3571 if ((xm==x1) && (ym==y1)) {
3580 if (xf[nf]==xf[0] && yf[nf]==yf[0]) {
3581 xm = (xt[nf]+xt[0])*0.5;
3582 ym = (yt[nf]+yt[0])*0.5;
3590 if ((xm-xf[0])*(x3-xf[0])<0 && (ym-yf[0])*(y3-yf[0])<0) {
3604 for (i=nf2; i>0; i--) {
3605 for (j=i-1; j>0; j--) {
3606 if (xt[i-1]==xt[i] || xt[j-1]==xt[j])
continue;
3607 c1 = (yt[i-1]-yt[i])/(xt[i-1]-xt[i]);
3608 b1 = yt[i]-c1*xt[i];
3609 c2 = (yt[j-1]-yt[j])/(xt[j-1]-xt[j]);
3610 b2 = yt[j]-c2*xt[j];
3612 xc = (b2-b1)/(c1-c2);
3618 nf++; xf[nf] = xt[i]; yf[nf] = yt[i];
3619 nf++; xf[nf] = xc ; yf[nf] = yc;
3637 nf++; xf[nf] = xt[0]; yf[nf] = yt[0];
3640 for (i=0; i<nf+1; i++) {
3641 xf[i] = (1/rx)*(xf[i]-x1ndc)+rx1;
3642 yf[i] = (1/ry)*(yf[i]-y1ndc)+ry1;
3646 gPad->PaintFillArea(nf+1,xf,yf);
3647 theGraph->TAttLine::Modify();
3665 TIter next(functions);
3667 while ((obj = next())) {
3677 if (!dofit) fit = 0;
3679 if (dofit == 1) dofit = 111;
3681 Int_t print_fval = dofit%10;
3682 Int_t print_ferrors = (dofit/10)%10;
3683 Int_t print_fchi2 = (dofit/100)%10;
3684 Int_t print_fprob = (dofit/1000)%10;
3685 Int_t nlinesf = print_fval + print_fchi2 + print_fprob;
3686 if (fit) nlinesf += fit->
GetNpar();
3724 if (print_fchi2) stats->
AddText(t);
3730 if (print_fval || print_ferrors) {
3732 if (print_ferrors) {
3745 if (!done) functions->
Add(stats);
3775 Int_t i, k, kp,
km, npointsMax, banksize, n2, npt;
3776 Int_t maxiterations, finished;
3777 Int_t jtype, ktype, closed;
3778 Double_t sxmin, sxmax, symin, symax;
3781 Double_t ratio_signs, xratio, yratio;
3787 Double_t co, so, ct, st, ctu, stu, xnt;
3788 Double_t dx1, dy1, dx2, dy2, dk1, dk2;
3795 c = t = co = so = ct = st = ctu = stu = dx1 = dy1 = dx2 = dy2 = 0;
3796 xt = yt = xa = xb = ya = yb = u1 = u2 = u3 = tj = sb = 0;
3798 npointsMax = npoints*10;
3805 Error(
"Smooth",
"not enough space in memory");
3812 jtype = (drawtype%1000)-10;
3813 if (jtype > 0) { ktype = jtype; loptx =
kTRUE; }
3814 else ktype = drawtype%1000;
3843 for (i=1;i<npoints;i++) {
3845 if ((x[i]-x[i-1])*(x[i-1]-x[i-2]) < 0) six++;
3846 if ((y[i]-y[i-1])*(y[i-1]-y[i-2]) < 0) siy++;
3848 if (x[i] < sxmin) sxmin = x[i];
3849 if (x[i] > sxmax) sxmax = x[i];
3850 if (y[i] < symin) symin = y[i];
3851 if (y[i] > symax) symax = y[i];
3856 if (dx1n < 0.01*(sxmax-sxmin) && dy1n < 0.01*(symax-symin)) closed = 1;
3857 if (sxmin == sxmax) {
3860 if (six > 1) ratio_signs = siy/six;
3861 else ratio_signs = 20;
3862 xratio = ratio_signs/(sxmax-sxmin);
3864 if (symin == symax) yratio = 1;
3865 else yratio = 1/(symax-symin);
3869 for (i=0;i<npoints;i++) {
3870 x[i] = (x[i]-sxmin)*xratio;
3871 y[i] = (y[i]-symin)*yratio;
3890 if (x[0] != x[npoints-1] || y[0] != y[npoints-1])
goto L40;
3891 if (x[npoints-2] == x[npoints-1] && y[npoints-2] == y[npoints-1])
goto L40;
3892 if (x[0] == x[1] && y[0] == y[1])
goto L40;
3915 if (npt > 1)
goto L310;
3919 if (x[k-1] == x[k-2] && y[k-1] == y[k-2])
goto L50;
3924 if (npt > 1)
goto L310;
3927 if (k < npoints)
goto L90;
3928 if (!flgic) { kp = 2;
goto L130;}
3931 if (flgis)
goto L150;
3941 if (x[k-1] == x[k] && y[k-1] == y[k])
goto L80;
3949 if (!flgis)
goto L50;
3964 dx1 = x[k-1] - x[km-1];
3965 dy1 = y[k-1] - y[km-1];
3966 dk1 = dx1*dx1 + dy1*dy1;
3967 dx2 = x[kp-1] - x[k-1];
3968 dy2 = y[kp-1] - y[k-1];
3969 dk2 = dx2*dx2 + dy2*dy2;
3970 ctu = dx1*dk2 + dx2*dk1;
3971 stu = dy1*dk2 + dy2*dk1;
3972 xnt = ctu*ctu + stu*stu;
3986 if (flgis)
goto L160;
3990 w3 = 2*(dx1*dy2-dx2*dy1);
4002 w3 = 2*(dx1*dy2-dx2*dy1);
4011 if (k <= 1)
goto L120;
4041 xa = (a*t-2*dx)/tcube;
4042 xb = (3*dx-(co+
a)*t)/tsquare;
4043 ya = (b*t-2*dy)/tcube;
4044 yb = (3*dy-(so+
b)*t)/tsquare;
4075 p2 = (u1*tj-u3)*3*tj+u2;
4105 z = s*sth*(s-s*sth)*(w1*sth+w1+w2);
4106 z = z*z/((a*a+b*
b)*(delta*delta));
4107 z = (z+2.642937)*z/((.3715652*z+3.063444)*z+.2441889)-cc;
4111 if (iw > 0)
goto L250;
4112 if (z > err)
goto L240;
4117 if (iw+2 == 0)
goto L190;
4118 if (iw+2 > 0)
goto L290;
4136 theGraph->
Zero(kp,0,sb,err,s,z,maxiterations);
4137 if (kp == 2)
goto L210;
4139 Error(
"Smooth",
"Attempt to plot outside plot limits");
4142 if (iw > 0)
goto L200;
4168 qlx[npt] = sxmin + xt/xratio;
4169 qly[npt] = symin + yt/yratio;
4176 if (npt < banksize)
goto L320;
4177 if (drawtype >= 1000 || ktype > 1) {
4178 Int_t newsize = banksize + n2;
4180 for (i=0;i<banksize;i++) qtemp[i] = qlx[i];
4183 for (i=0;i<banksize;i++) qlx[i] = qtemp[i];
4184 for (i=0;i<banksize;i++) qtemp[i] = qly[i];
4187 for (i=0;i<banksize;i++) qly[i] = qtemp[i];
4196 if (drawtype >= 1000) {
4197 gPad->PaintFillArea(npt,qlx,qly,
"B");
4201 qlx[npt] = qlx[npt-1];
4202 qlx[npt+1] = qlx[0];
4208 qly[npt] = qly[npt-1];
4209 qly[npt+1] = qly[0];
4211 gPad->PaintFillArea(npt+2,qlx,qly);
4214 gPad->PaintPolyLine(npt,qlx,qly);
4217 qlx[0] = sxmin + xt/xratio;
4218 qly[0] = symin + yt/yratio;
4220 if (finished > 0)
goto L390;
4221 if (finished < 0) { finished = 0;
goto L110;}
4222 if (s > 0)
goto L180;
4228 for (i=0;i<npoints;i++) {
4229 x[i] = sxmin + x[i]/xratio;
4230 y[i] = symin + y[i]/yratio;
virtual Bool_t IsEditable() const
virtual const char * GetName() const
Returns name of object.
virtual Double_t GetMaximumStored() const
void SetTickLength(Float_t ticklength)
virtual void SetLineWidth(Width_t lwidth)
Set the line width.
virtual Float_t GetTickLength() const
Color_t GetStatColor() const
double dist(Rotation3D const &r1, Rotation3D const &r2)
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...
Style_t GetTitleFont(Option_t *axis="X") const
Return title font.
virtual void Paint(Option_t *option="")
Control routine to paint any kind of histograms.
Color_t GetLabelColor(Option_t *axis="X") const
Return the label color number in the axis.
void SetOptFit(Int_t fit=1)
Set the fit option.
virtual void SetName(const char *name="")
virtual void Draw(Option_t *option="")
Draw this pavetext with its current attributes.
virtual Double_t * GetEX() const
virtual void SetMaximum(Double_t maximum=-1111)
Float_t GetLabelSize(Option_t *axis="X") const
Return label size.
static double p3(double t, double a, double b, double c, double d)
virtual Int_t DistancetoPrimitiveHelper(TGraph *theGraph, Int_t px, Int_t py)
Compute distance from point px,py to a graph.
virtual void SetLimits(Double_t xmin, Double_t xmax)
virtual void ExecuteEventHelper(TGraph *theGraph, Int_t event, Int_t px, Int_t py)
Execute action corresponding to one event.
Color_t GetTitleTextColor() const
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 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 DistancetoPrimitive(Int_t px, Int_t py)
Computes distance from point (px,py) to the object.
virtual void SetDirectory(TDirectory *dir)
By default when an histogram is created, it is added to the list of histogram objects in the current ...
virtual Float_t GetLabelOffset() const
static Int_t fgMaxPointsPerLine
Color_t GetAxisColor(Option_t *axis="X") const
Return the axis color number in the axis.
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.
virtual Double_t * GetEYlow() const
virtual Double_t GetMinimumStored() const
TString & ReplaceAll(const TString &s1, const TString &s2)
R__EXTERN TStyle * gStyle
THist< 1, float, THistStatContent, THistStatUncertainty > TH1F
virtual Color_t GetAxisColor() const
static constexpr double km
virtual Double_t * GetEXhighd() const
void Draw(Option_t *options="")
Draw Polargram.
TList * GetListOfFunctions() const
TAxis * GetYaxis() const
Get y axis of the graph.
virtual TText * AddText(Double_t x1, Double_t y1, const char *label)
Add a new Text line to this pavetext at given coordinates.
void ToUpper()
Change string to upper case.
virtual Double_t * GetEY() const
virtual void SetMinimum(Double_t minimum=-1111)
Float_t GetEndErrorSize() const
R__ALWAYS_INLINE Bool_t TestBit(UInt_t f) const
Option_t * GetOption() const
1-D histogram with a float per channel (see TH1 documentation)}
void PaintStats(TGraph *theGraph, TF1 *fit)
Paint the statistics box with the fit info.
Short_t Min(Short_t a, Short_t b)
void ToLower()
Change string to lower-case.
virtual void SetFillStyle(Style_t fstyle)
Set the fill area style.
void SetOptionAxis(Bool_t opt)
The histogram statistics painter class.
virtual Int_t GetNdivisions(Option_t *axis="X") const
Return the number of divisions for "axis".
virtual Double_t GetParError(Int_t ipar) const
Return value of parameter number ipar.
void PaintGraphPolar(TGraph *theGraph, Option_t *option)
[Paint this TGraphPolar with its current attributes.]($GP04)
virtual Float_t GetLabelSize() const
Float_t GetTitleY() const
static void SetMaxPointsPerLine(Int_t maxp=50)
Static function to set fgMaxPointsPerLine for graph painting.
virtual ~TGraphPainter()
Destructor.
void box(Int_t pat, Double_t x1, Double_t y1, Double_t x2, Double_t y2)
static constexpr double rad
don't draw the histogram title
const char * GetFitFormat() const
virtual void SetLabelOffset(Float_t offset=0.005)
Set distance between the axis and the labels The distance is expressed in per cent of the pad width...
virtual TVirtualPad * cd(Int_t subpadnumber=0)=0
virtual Width_t GetLineWidth() const
Return the line width.
Style_t GetLabelFont(Option_t *axis="X") const
Return label font.
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...
LongDouble_t Power(LongDouble_t x, LongDouble_t y)
void SetBit(UInt_t f, Bool_t set)
Set or unset the user status bits as specified in f.
Int_t GetOptFit() const
Return the fit option.
if object in a list can be deleted
This class allows to draw quantile-quantile plots.
TGraphPainter()
Default constructor.
virtual Style_t GetMarkerStyle() const
Return the marker style.
virtual void SetTextFont(Font_t tfont=62)
Set the text font.
virtual Style_t GetLineStyle() const
Return the line style.
virtual Int_t GetNDF() const
Return the number of degrees of freedom in the fit the fNDF parameter has been previously computed du...
static const double x2[5]
Double_t GetYsize()
Return size of the formula along Y in pad coordinates.
void PaintGraphAsymmErrors(TGraph *theGraph, Option_t *option)
Paint this TGraphAsymmErrors with its current attributes.
virtual void DrawPanelHelper(TGraph *theGraph)
Display a panel with all histogram drawing options.
Float_t GetTitleFontSize() const
static TVirtualPadEditor * GetPadEditor(Bool_t load=kTRUE)
Returns the pad editor dialog. Static method.
virtual void Paint(Option_t *option="")
Paint this pavetext with its current attributes.
virtual void SetStatFormat(const char *format="6.4g")
Change (i.e. set) the format for printing statistics.
To draw Mathematical Formula.
Double_t Log10(Double_t x)
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.
static double p2(double t, double a, double b, double c)
virtual void SetMarkerColor(Color_t mcolor=1)
Set the marker color.
TString & Append(const char *cs)
TGraphPolargram * GetPolargram()
virtual Size_t GetMarkerSize() const
Return the marker size.
virtual void Clear(Option_t *option="")
Clear all lines in this pavetext.
Base class for several text objects.
Float_t GetTitleX() const
Bool_t IsInside(T xp, T yp, Int_t np, T *x, T *y)
Float_t GetBarWidth() const
TVirtualPad is an abstract base class for the Pad and Canvas classes.
Style_t GetStatStyle() const
virtual Color_t GetLabelColor() const
void SetLabelSize(Float_t labelsize)
virtual void SetTextAlign(Short_t align=11)
Set the text alignment.
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 Option_t * GetDrawOption() const
Get option used by the graphics system to draw this object.
virtual char * GetObjectInfoHelper(TGraph *theGraph, Int_t px, Int_t py) const
virtual void PaintLine(Double_t x1, Double_t y1, Double_t x2, Double_t y2)
Draw this line with new coordinates.
virtual const char * GetParName(Int_t ipar) const
void PaintHelper(TGraph *theGraph, Option_t *option)
Paint a any kind of TGraph.
virtual Int_t DistancetoPrimitive(Int_t px, Int_t py)
Compute distance from point px,py to a line.
virtual Double_t * GetEYhighd() const
virtual void SetLineColor(Color_t lcolor)
Set the line color.
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 PaintGraphErrors(TGraph *theGraph, Option_t *option)
[Paint this TGraphErrors with its current attributes.]($GP03)
virtual TObject * First() const
Return the first object in the list. Returns 0 when list is empty.
Double_t GetXsize()
Return size of the formula along X in pad coordinates.
Float_t GetTitleH() const
void PaintGraphQQ(TGraph *theGraph, Option_t *option)
Paint this graphQQ. No options for the time being.
Style_t GetStatFont() const
virtual void SetFillColor(Color_t fcolor)
Set the fill area color.
virtual Bool_t InheritsFrom(const char *classname) const
Returns kTRUE if object inherits from class "classname".
void PaintGraphBentErrors(TGraph *theGraph, Option_t *option)
[Paint this TGraphBentErrors with its current attributes.]($GP03)
virtual void PaintArrow(Double_t x1, Double_t y1, Double_t x2, Double_t y2, Float_t arrowsize=0.05, Option_t *option=">")
Draw this arrow.
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
char * Form(const char *fmt,...)
virtual void SetMarkerStyle(Style_t mstyle=1)
Set the marker style.
static double p1(double t, double a, double b)
virtual void SetFitFormat(const char *format="5.4g")
Change (i.e. set) the format for printing fit parameters in statistics box.
virtual const char * GetFitFormat() const
virtual void SetAxisColor(Color_t color=1, Float_t alpha=1.)
Set color of the line axis and tick marks.
if object destructor must call RecursiveRemove()
virtual void PaintBox(Double_t x1, Double_t y1, Double_t x2, Double_t y2, Option_t *option="")
Draw this box with new coordinates.
Double_t GetMaximum() const
Color_t GetTitleFillColor() 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...
TAxis * GetXaxis() const
Get x axis of the graph.
virtual Color_t GetLineColor() const
Return the line color.
virtual Double_t * GetEXlowd() const
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...
Width_t GetTitleBorderSize() const
Float_t GetTitleW() const
Double_t GetChisquare() const
virtual void Paint(Option_t *option="")
This method must be overridden if a class wants to paint itself.
virtual Double_t * GetEYlowd() const
void SetLabelOffset(Float_t labeloffset)
static const double x1[5]
A Pave (see TPave) with text, lines or/and boxes inside.
TH1F * GetHistogram() const
Returns a pointer to the histogram used to draw the axis Takes into account the two following cases...
void SetDrawBorder(Int_t drawborder=1)
virtual Double_t * GetEXlow() const
Int_t GetDrawBorder() const
virtual Color_t GetFillColor() const
Return the fill area color.
void SetLabelFont(Int_t labelfont)
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.
Bool_t Contains(const char *pat, ECaseCompare cmp=kExact) const
static constexpr double s
you should not use this method at all Int_t Int_t Double_t Double_t Double_t e
Abstract base class used by ROOT graphics editor.
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.]($GP01)
Width_t GetStatBorderSize() const
virtual void SetLineStyle(Style_t lstyle)
Set the line style.
virtual TObject * Clone(const char *newname="") const
Make a clone of an object using the Streamer facility.
Mother of all ROOT objects.
you should not use this method at all Int_t Int_t z
TObject * GetObject() const
Float_t GetStatFontSize() const
virtual const char * GetTitle() const
Returns title of object.
virtual Int_t GetNpar() const
virtual void SetPoint(Int_t i, Double_t x, Double_t y)
Set x and y values for point number i.
virtual void Paint(Option_t *chopt="")
Draw this axis with its current attributes.
Float_t GetTickLength(Option_t *axis="X") const
Return tick length.
virtual void Add(TObject *obj)
virtual Double_t GetParameter(Int_t ipar) const
Short_t Max(Short_t a, Short_t b)
A Graph is a graphics object made of two arrays X and Y with npoints each.
you should not use this method at all Int_t Int_t Double_t Double_t Double_t Int_t Double_t Double_t Double_t Double_t b
void SetTickSize(Float_t ticksize)
Float_t GetLabelOffset(Option_t *axis="X") const
Return label offset.
Double_t * GetXpol()
Return points in polar coordinates.
void SetLabelColor(Int_t labelcolor)
virtual void SetTickLength(Float_t length=0.03)
Set tick mark length The length is expressed in per cent of the pad width.
virtual void SetTextColor(Color_t tcolor=1)
Set the text color.
virtual void SetHistogram(TH1F *h)
virtual void Paint(Option_t *option="")
Paint the pave stat.
Float_t GetBarOffset() const
Style_t GetTitleStyle() const
virtual Color_t GetMarkerColor() const
Return the marker color.
Double_t Sqrt(Double_t x)
virtual Style_t GetFillStyle() const
Return the fill area style.
virtual void SetTextSize(Float_t tsize=1)
Set the text size.
Color_t GetStatTextColor() const
virtual Double_t * GetEYhigh() 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.
Int_t GetNdivisions(Option_t *axis="X") const
Return number of divisions.
Draw all kinds of Arrows.
virtual const char * GetName() const
Returns name of object.
Double_t * GetYpol()
Return points in polar coordinates.
virtual void SetTitle(const char *title="")
Set the title of the TNamed.
Double_t GetMinimum() const
clip to the frame boundary
constexpr Double_t PiOver2()
virtual Double_t * GetEXhigh() const
void PaintGraphSimple(TGraph *theGraph, Option_t *option)
Paint a simple graph, without errors bars.
virtual void SetBorderSize(Int_t bordersize=4)
TAxis * GetXaxis()
Get the behaviour adopted by the object about the statoverflows. See EStatOverflows for more informat...
virtual Style_t GetLabelFont() const
const char * GetStatFormat() const
virtual const char * GetTitle() const
Returns title of object.
void PaintGraphReverse(TGraph *theGraph, Option_t *option)
Paint theGraph reverting values along X and/or Y axis. a new graph is created.
void SetParent(TObject *obj)
void SetOptStat(Int_t stat=1)
Set the stat option.
Int_t GetOptTitle() const
static const double x3[11]
const char * Data() const
void SetPolargram(TGraphPolargram *p)