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;
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");
1036 TIter next(functions);
1037 while ((f = (
TObject*) next())) {
1057 gPad->PushSelectableObject(theGraph);
1059 Int_t optionLine , optionAxis , optionCurve , optionStar , optionMark;
1060 Int_t optionBar , optionR , optionOne , optionE;
1061 Int_t optionFill , optionZ , optionCurveFill, optionIAxis;
1062 Int_t i, npt, nloop;
1065 Double_t barxmin, barxmax, barymin, barymax;
1072 Error(
"PaintGraph",
"illegal number of points (%d)", npoints);
1079 if (opt.
Contains(
"L")) optionLine = 1;
else optionLine = 0;
1080 if (opt.
Contains(
"A")) optionAxis = 1;
else optionAxis = 0;
1081 if (opt.
Contains(
"C")) optionCurve = 1;
else optionCurve = 0;
1082 if (opt.
Contains(
"*")) optionStar = 1;
else optionStar = 0;
1083 if (opt.
Contains(
"P")) optionMark = 1;
else optionMark = 0;
1084 if (opt.
Contains(
"B")) optionBar = 1;
else optionBar = 0;
1085 if (opt.
Contains(
"R")) optionR = 1;
else optionR = 0;
1086 if (opt.
Contains(
"1")) optionOne = 1;
else optionOne = 0;
1087 if (opt.
Contains(
"F")) optionFill = 1;
else optionFill = 0;
1088 if (opt.
Contains(
"I")) optionIAxis = 1;
else optionIAxis = 0;
1094 if (optionLine+optionFill+optionCurve+optionStar+optionMark+optionBar+optionE == 0) {
1095 if (!chopt[0]) optionLine=1;
1101 optionCurveFill = 0;
1102 if (optionCurve && optionFill) {
1103 optionCurveFill = 1;
1108 Double_t rwxmin,rwxmax, rwymin, rwymax, maximum, minimum, dx, dy;
1111 rwxmin =
gPad->GetUxmin();
1112 rwxmax =
gPad->GetUxmax();
1113 rwymin =
gPad->GetUymin();
1114 rwymax =
gPad->GetUymax();
1117 if (minimum == -1111) {
1121 if (maximum == -1111) {
1125 uxmin =
gPad->PadtoX(rwxmin);
1126 uxmax =
gPad->PadtoX(rwxmax);
1129 theGraph->
ComputeRange(rwxmin, rwymin, rwxmax, rwymax);
1131 if (rwxmin == rwxmax) rwxmax += 1.;
1132 if (rwymin == rwymax) rwymax += 1.;
1133 dx = 0.1*(rwxmax-rwxmin);
1134 dy = 0.1*(rwymax-rwymin);
1135 uxmin = rwxmin - dx;
1136 uxmax = rwxmax + dx;
1137 minimum = rwymin - dy;
1138 maximum = rwymax + dy;
1142 if (uxmin < 0 && rwxmin >= 0) uxmin = 0.9*rwxmin;
1143 if (uxmax > 0 && rwxmax <= 0) {
1144 if (
gPad->GetLogx()) uxmax = 1.1*rwxmax;
1147 if (minimum < 0 && rwymin >= 0) minimum = 0.9*rwymin;
1148 if (maximum > 0 && rwymax <= 0) {
1152 if (minimum <= 0 && gPad->GetLogy()) minimum = 0.001*maximum;
1153 if (uxmin <= 0 && gPad->GetLogx()) {
1154 if (uxmax > 1000) uxmin = 1;
1155 else uxmin = 0.001*uxmax;
1162 char chopth[8] =
" ";
1163 if (strstr(chopt,
"x+")) strncat(chopth,
"x+",2);
1164 if (strstr(chopt,
"y+")) strncat(chopth,
"y+",2);
1165 if (optionIAxis) strncat(chopth,
"A",1);
1172 if (theNpoints > npt) npt = theNpoints;
1183 if (
gPad->GetLogy()) {
1195 rwxmin =
gPad->GetUxmin();
1196 rwxmax =
gPad->GetUxmax();
1197 rwymin =
gPad->GetUymin();
1198 rwymax =
gPad->GetUymax();
1199 uxmin =
gPad->PadtoX(rwxmin);
1200 uxmax =
gPad->PadtoX(rwxmax);
1205 maximum =
gPad->PadtoY(rwymax);
1206 minimum =
gPad->PadtoY(rwymin);
1210 theGraph->TAttLine::Modify();
1211 theGraph->TAttFill::Modify();
1212 theGraph->TAttMarker::Modify();
1220 if (optionLine || optionFill) {
1226 if (optionFill && (xn != x1 || yn != y1)) nloop++;
1228 for (i=1;i<=nloop;i++) {
1271 if (optionCurveFill) {
1273 if (xn != x1 || yn != y1) nloop++;
1277 for (i=1;i<=nloop;i++) {
1302 for (i=1;i<=nloop;i++) {
1306 if (y[i-1] < minimum || y[i-1] > maximum)
continue;
1307 if (x[i-1] < uxmin || x[i-1] > uxmax)
continue;
1333 for (i=1;i<=npoints;i++) {
1348 for (i=1;i<=npoints;i++) {
1365 for (i=1;i<npoints;i++) {
1366 if (x[i] < barxmin) barxmin = x[i];
1367 if (x[i] > barxmax) barxmax = x[i];
1369 bdelta = (barxmax-barxmin)/
Double_t(npoints);
1373 for (i=1;i<npoints;i++) {
1374 if (y[i] < barymin) barymin = y[i];
1375 if (y[i] > barymax) barymax = y[i];
1377 bdelta = (barymax-barymin)/
Double_t(npoints);
1381 for (i=1;i<=npoints;i++) {
1382 xlow = x[i-1] - dbar;
1383 xhigh = x[i-1] + dbar;
1385 if (xlow < uxmin && xhigh < uxmin)
continue;
1386 if (xhigh > uxmax && xlow > uxmax)
continue;
1387 if (xlow < uxmin) xlow = uxmin;
1388 if (xhigh > uxmax) xhigh = uxmax;
1390 else ylow =
gPad->GetUymin();
1404 for (i=1;i<=npoints;i++) {
1406 ylow = y[i-1] - dbar;
1407 yhigh = y[i-1] + dbar;
1460 const char *where =
"PaintGrapHist";
1462 Int_t optionLine , optionAxis , optionCurve, optionStar, optionMark;
1463 Int_t optionBar , optionRot , optionOne , optionOff ;
1464 Int_t optionFill , optionZ;
1465 Int_t optionHist , optionBins , optionMarker;
1467 Int_t drawtype=0, drawborder, drawbordersav;
1473 Double_t xi, xi1, xj, xj1, yi1, yi, yj, yj1, xwmin, ywmin;
1477 char choptaxis[10] =
" ";
1480 Error(where,
"illegal number of points (%d)", npoints);
1485 if (opt.
Contains(
"H")) optionHist = 1;
else optionHist = 0;
1486 if (opt.
Contains(
"F")) optionFill = 1;
else optionFill = 0;
1487 if (opt.
Contains(
"C")) optionCurve= 1;
else optionCurve= 0;
1488 if (opt.
Contains(
"*")) optionStar = 1;
else optionStar = 0;
1489 if (opt.
Contains(
"R")) optionRot = 1;
else optionRot = 0;
1490 if (opt.
Contains(
"1")) optionOne = 1;
else optionOne = 0;
1491 if (opt.
Contains(
"B")) optionBar = 1;
else optionBar = 0;
1492 if (opt.
Contains(
"N")) optionBins = 1;
else optionBins = 0;
1493 if (opt.
Contains(
"L")) optionLine = 1;
else optionLine = 0;
1494 if (opt.
Contains(
"P")) optionMark = 1;
else optionMark = 0;
1495 if (opt.
Contains(
"A")) optionAxis = 1;
else optionAxis = 0;
1496 if (opt.
Contains(
"][")) optionOff = 1;
else optionOff = 0;
1497 if (opt.
Contains(
"P0")) optionMark = 10;
1499 Int_t optionFill2 = 0;
1501 optionFill = 0; optionFill2 = 1;
1516 nbins = last - first + 1;
1528 Double_t rounding = (uxmax-uxmin)*1.
e-5;
1531 Int_t nx1, nx2, ndivx, ndivy, ndiv;
1544 if (ndivx < 0) strlcat(choptaxis,
"N",10);
1545 if (
gPad->GetGridx()) {
1547 strlcat(choptaxis,
"W",10);
1549 if (
gPad->GetLogx()) {
1553 strlcat(choptaxis,
"G",10);
1563 axis->
PaintAxis(rwxmin,rwymin,rwxmax,rwymin,rwmin,rwmax,ndiv,choptaxis);
1573 strlcat(choptaxis,
"N",10);
1576 if (
gPad->GetGridy()) {
1578 strlcat(choptaxis,
"W",10);
1580 if (
gPad->GetLogy()) {
1584 strlcat(choptaxis,
"G",10);
1593 axis->
PaintAxis(rwxmin,rwymin,rwxmin,rwymax,rwmin,rwmax,ndiv,choptaxis);
1599 theGraph->TAttLine::Modify();
1600 theGraph->TAttFill::Modify();
1601 theGraph->TAttMarker::Modify();
1605 if (!optionRot) {wmin = x[0]; wmax = x[1];}
1606 else {wmin = y[0]; wmax = y[1];}
1608 if (!optionBins) delta = (wmax - wmin)/
Double_t(nbins);
1610 Int_t fwidth =
gPad->GetFrameLineWidth();
1613 if (optionOff) fwidth = 1;
1629 if (optionFill && !optionCurve) {
1637 for (j=first; j<=last;j++) {
1640 gxwork[npt] = wmin+((j-first+1)*delta);
1644 xj1 = x[j]; xj = x[j-1];
1646 if (j != last)
Error(where,
"X must be in increasing order");
1647 else Error(where,
"X must have N+1 values with option N");
1652 gywork[npt-1] = y[j-1];
1653 gywork[npt] = y[j-1];
1654 if (gywork[npt] < vymin) {gywork[npt] = vymin; gywork[npt-1] = vymin;}
1655 if ((
gxwork[npt-1] >= uxmin-rounding &&
gxwork[npt-1] <= uxmax+rounding) ||
1656 (
gxwork[npt] >= uxmin-rounding &&
gxwork[npt] <= uxmax+rounding)) npt += 2;
1659 gywork[npt-1] = gywork[0];
1663 if (gywork[0] < vymin) {gywork[0] = vymin; gywork[npt-1] = vymin;}
1669 if (!fillarea)
gyworkl[0] = ylast;
1680 for (j=first; j<=last;j++) {
1683 gywork[npt] = wmin+((j-first+1)*delta);
1685 yj1 = y[j]; yj = y[j-1];
1687 if (j != last)
Error(where,
"Y must be in increasing order");
1688 else Error(where,
"Y must have N+1 values with option N");
1693 gxwork[npt-1] = x[j-1]; gxwork[npt] = x[j-1];
1694 if ((gxwork[npt-1] >= uxmin-rounding && gxwork[npt-1] <= uxmax+rounding) ||
1695 (gxwork[npt] >= uxmin-rounding && gxwork[npt] <= uxmax+rounding)) npt += 2;
1698 gxwork[npt-1] = gxwork[0];
1702 if (!fillarea)
gyworkl[0] = ylast;
1709 theGraph->TAttLine::Modify();
1710 theGraph->TAttFill::Modify();
1715 if ((optionHist) || !chopt[0]) {
1721 for (i=first; i<=last;i++) {
1724 gxwork[npt] = wmin+((i-first+1)*delta);
1726 xi1 = x[i]; xi = x[i-1];
1728 if (i != last)
Error(where,
"X must be in increasing order");
1729 else Error(where,
"X must have N+1 values with option N");
1737 if ((
gxwork[npt-1] >= uxmin-rounding &&
gxwork[npt-1] <= uxmax+rounding) ||
1738 (
gxwork[npt] >= uxmin-rounding &&
gxwork[npt] <= uxmax+rounding)) npt += 2;
1750 Int_t nbpoints = npt-2;
1756 for (ip=point1; ip<=nbpoints; ip++) {
1763 Int_t point2 = nbpoints;
1764 for (ip=point2; ip>=point1; ip--) {
1770 nbpoints = point2-point1+1;
1774 if (
gxwork[0] >
gPad->GetUxmin()) { nbpoints++; point1 = 0; }
1775 if (
gxwork[nbpoints] <
gPad->GetUxmax()) nbpoints++;
1787 for (i=first; i<=last;i++) {
1790 gywork[npt] = wmin+((i-first+1)*delta);
1792 yi1 = y[i]; yi = y[i-1];
1794 if (i != last)
Error(where,
"Y must be in increasing order");
1795 else Error(where,
"Y must have N+1 values with option N");
1801 if ((
gxwork[npt-1] >= uxmin-rounding &&
gxwork[npt-1] <= uxmax+rounding) ||
1802 (
gxwork[npt] >= uxmin-rounding &&
gxwork[npt] <= uxmax+rounding)) npt += 2;
1821 if (!optionOne) drawtype = 2;
1826 for (i=first; i<=last;i++) {
1829 gxwork[npt-1] = wmin+(i-first)*delta+0.5*delta;
1831 xi1 = x[i]; xi = x[i-1];
1833 if (i != last)
Error(where,
"X must be in increasing order");
1834 else Error(where,
"X must have N+1 values with option N");
1837 gxwork[npt-1] = x[i-1] + 0.5*(x[i]-x[i-1]);
1868 drawtype = drawtype+10;
1870 for (i=first; i<=last;i++) {
1873 gywork[npt-1] = wmin+(i-first)*delta+0.5*delta;
1875 yi1 = y[i]; yi = y[i-1];
1877 if (i != last)
Error(where,
"Y must be in increasing order");
1878 else Error(where,
"Y must have N+1 values with option N");
1881 gywork[npt-1] = y[i-1] + 0.5*(y[i]-y[i-1]);
1913 wminstep = wmin + 0.5*delta;
1915 gPad->GetRangeAxis(ax1,ay1,ax2,ay2);
1919 for (i=first; i<=last;i++) {
1922 gxwork[npt-1] = wmin+(i-first)*delta+0.5*delta;
1924 xi1 = x[i]; xi = x[i-1];
1926 if (i != last)
Error(where,
"X must be in increasing order");
1927 else Error(where,
"X must have N+1 values with option N");
1930 gxwork[npt-1] = x[i-1] + 0.5*(x[i]-x[i-1]);
1932 if (
gxwork[npt-1] < uxmin ||
gxwork[npt-1] > uxmax) { npt--;
continue;}
1935 if ((
gywork[npt-1] < rwymin) || ((
gywork[npt-1] > rwymax) && !optionFill2)) {
1974 for (i=first; i<=last;i++) {
1977 gywork[npt-1] = wminstep+(i-first)*delta+0.5*delta;
1979 yi1 = y[i]; yi = y[i-1];
1981 if (i != last)
Error(where,
"Y must be in increasing order");
1982 else Error(where,
"Y must have N+1 values with option N");
1985 gywork[npt-1] = y[i-1] + 0.5*(y[i]-y[i-1]);
1988 if ((
gxwork[npt-1] < uxmin) || (
gxwork[npt-1] > uxmax)) {
2010 if (optionLine != 0 && npt > 1) {
2021 offset = delta*baroffset; dbar = delta*barwidth;
2024 offset = (x[1]-x[0])*baroffset;
2025 dbar = (x[1]-x[0])*barwidth;
2027 offset = (y[1]-y[0])*baroffset;
2028 dbar = (y[1]-y[0])*barwidth;
2031 drawbordersav = drawborder;
2035 xhigh = wmin+offset+dbar;
2038 else ylow =
gPad->GetUymin();
2040 for (i=first; i<=last;i++) {
2047 if (xlow < rwxmax && xhigh > rwxmin)
2051 xhigh = xhigh+delta;
2054 xi1 = x[i]; xi = x[i-1];
2056 Error(where,
"X must be in increasing order");
2059 offset = (x[i+1]-x[i])*baroffset;
2060 dbar = (x[i+1]-x[i])*barwidth;
2061 xlow = x[i] + offset;
2062 xhigh = x[i] + offset + dbar;
2067 ylow = wmin + offset;
2068 yhigh = wmin + offset + dbar;
2070 else xlow =
gPad->GetUxmin();
2071 for (i=first; i<=last;i++) {
2079 gPad->PaintBox(xlow,ylow,xhigh,yhigh);
2081 ylow = ylow + delta;
2082 yhigh = yhigh + delta;
2085 yi1 = y[i]; yi = y[i-1];
2087 Error(where,
"Y must be in increasing order");
2090 offset = (y[i+1]-y[i])*baroffset;
2091 dbar = (y[i+1]-y[i])*barwidth;
2092 ylow = y[i] + offset;
2093 yhigh = y[i] + offset + dbar;
2104 if ((optionStar) || (optionMark)) optionMarker=1;
2110 for (i=first; i<=last;i++) {
2111 if (!optionBins) xm = wmin+(i-first)*delta+0.5*delta;
2112 else xm = x[i-1] + 0.5*(x[i]-x[i-1]);
2114 if (optionMark != 10) {
2115 if (ym<rwymax && ym > rwymin) {
2121 if (ym<rwymax && ym >= rwymin) {
2138 wminstep = wmin + 0.5*delta;
2139 for (i=first; i<=last;i++) {
2140 if (!optionBins) ym = wminstep+(i-first)*delta+0.5*delta;
2141 else ym = y[i-1] + 0.5*(y[i]-y[i-1]);
2143 if (optionMark != 10) {
2144 if (xm<rwxmax && xm > rwxmin) {
2150 if (xm<rwxmax && xm >= rwxmin) {
2190 const Int_t kBASEMARKER=8;
2191 Double_t s2x, s2y, symbolsize, sbase;
2192 Double_t x,
y, xl1, xl2, xr1, xr2, yup1, yup2, ylow1, ylow2, tx, ty;
2193 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};
2194 static Float_t cyy[15] = {1,1,1,1,1,1,1,1,1,0.5,0.6,1,1,1,1};
2203 if (strchr(option,
'X') || strchr(option,
'x')) {
PaintGraphSimple(theGraph, option);
return;}
2206 if (strstr(option,
"||") || strstr(option,
"[]")) {
2208 if (strstr(option,
"[]")) braticks =
kTRUE;
2211 if (strchr(option,
'z')) endLines =
kFALSE;
2212 if (strchr(option,
'Z')) endLines =
kFALSE;
2213 const char *arrowOpt = 0;
2214 if (strchr(option,
'>')) arrowOpt =
">";
2215 if (strstr(option,
"|>")) arrowOpt =
"|>";
2218 if (strchr(option,
'a')) axis =
kTRUE;
2219 if (strchr(option,
'A')) axis =
kTRUE;
2227 if (strchr(option,
'0')) option0 =
kTRUE;
2228 if (strchr(option,
'2')) option2 =
kTRUE;
2229 if (strchr(option,
'3')) option3 =
kTRUE;
2230 if (strchr(option,
'4')) {option3 =
kTRUE; option4 =
kTRUE;}
2231 if (strchr(option,
'5')) {option2 =
kTRUE; option5 =
kTRUE;}
2234 xline =
new Double_t[2*theNpoints];
2235 yline =
new Double_t[2*theNpoints];
2236 if (!xline || !yline) {
2237 Error(
"Paint",
"too many points, out of memory");
2244 theGraph->TAttLine::Modify();
2259 sbase = symbolsize*kBASEMARKER;
2263 if (mark >= 20 && mark <= 34) {
2272 tx =
gPad->PixeltoX(dxend) -
gPad->PixeltoX(0);
2273 ty =-
gPad->PixeltoY(dxend) +
gPad->PixeltoY(0);
2274 Float_t asize = 0.6*symbolsize*kBASEMARKER/
gPad->GetWh();
2277 for (
Int_t i=0;i<theNpoints;i++) {
2278 x =
gPad->XtoPad(theX[i]);
2279 y =
gPad->YtoPad(theY[i]);
2282 if (x < gPad->GetUxmin()) x =
gPad->GetUxmin();
2283 if (x >
gPad->GetUxmax()) x =
gPad->GetUxmax();
2284 if (y < gPad->GetUymin()) y =
gPad->GetUymin();
2285 if (y >
gPad->GetUymax()) y =
gPad->GetUymax();
2287 if (x < gPad->GetUxmin())
continue;
2288 if (x >
gPad->GetUxmax())
continue;
2289 if (y < gPad->GetUymin())
continue;
2290 if (y >
gPad->GetUymax())
continue;
2294 xl2 =
gPad->XtoPad(theX[i] - theEXlow[i]);
2298 x1b =
gPad->XtoPad(theX[i] - theEXlow[i]);
2299 y1b =
gPad->YtoPad(theY[i] - theEYlow[i]);
2300 x2b =
gPad->XtoPad(theX[i] + theEXhigh[i]);
2301 y2b =
gPad->YtoPad(theY[i] + theEYhigh[i]);
2302 if (x1b < gPad->GetUxmin()) x1b =
gPad->GetUxmin();
2303 if (x1b >
gPad->GetUxmax()) x1b =
gPad->GetUxmax();
2304 if (y1b < gPad->GetUymin()) y1b =
gPad->GetUymin();
2305 if (y1b >
gPad->GetUymax()) y1b =
gPad->GetUymax();
2306 if (x2b < gPad->GetUxmin()) x2b =
gPad->GetUxmin();
2307 if (x2b >
gPad->GetUxmax()) x2b =
gPad->GetUxmax();
2308 if (y2b < gPad->GetUymin()) y2b =
gPad->GetUymin();
2309 if (y2b >
gPad->GetUymax()) y2b =
gPad->GetUymax();
2310 if (option5) box.
PaintBox(x1b, y1b, x2b, y2b,
"l");
2311 else box.
PaintBox(x1b, y1b, x2b, y2b);
2319 yline[if1-1] =
gPad->YtoPad(theY[i] + theEYhigh[i]);
2320 yline[if2-1] =
gPad->YtoPad(theY[i] - theEYlow[i]);
2328 arrow.
PaintArrow(xl1,y,xl2,y,asize,arrowOpt);
2330 if (!brackets)
gPad->PaintLine(xl1,y,xl2,y);
2333 xb[0] = xl2+tx; yb[0] = y-ty;
2334 xb[1] = xl2; yb[1] = y-ty;
2335 xb[2] = xl2; yb[2] = y+ty;
2336 xb[3] = xl2+tx; yb[3] = y+ty;
2337 gPad->PaintPolyLine(4, xb, yb);
2339 gPad->PaintLine(xl2,y-ty,xl2,y+ty);
2345 xr2 =
gPad->XtoPad(theX[i] + theEXhigh[i]);
2348 arrow.
PaintArrow(xr1,y,xr2,y,asize,arrowOpt);
2350 if (!brackets)
gPad->PaintLine(xr1,y,xr2,y);
2353 xb[0] = xr2-tx; yb[0] = y-ty;
2354 xb[1] = xr2; yb[1] = y-ty;
2355 xb[2] = xr2; yb[2] = y+ty;
2356 xb[3] = xr2-tx; yb[3] = y+ty;
2357 gPad->PaintPolyLine(4, xb, yb);
2359 gPad->PaintLine(xr2,y-ty,xr2,y+ty);
2365 yup2 =
gPad->YtoPad(theY[i] + theEYhigh[i]);
2366 if (yup2 >
gPad->GetUymax()) yup2 =
gPad->GetUymax();
2369 arrow.
PaintArrow(x,yup1,x,yup2,asize,arrowOpt);
2371 if (!brackets)
gPad->PaintLine(x,yup1,x,yup2);
2374 xb[0] = x-tx; yb[0] = yup2-ty;
2375 xb[1] = x-tx; yb[1] = yup2;
2376 xb[2] = x+tx; yb[2] = yup2;
2377 xb[3] = x+tx; yb[3] = yup2-ty;
2378 gPad->PaintPolyLine(4, xb, yb);
2380 gPad->PaintLine(x-tx,yup2,x+tx,yup2);
2386 ylow2 =
gPad->YtoPad(theY[i] - theEYlow[i]);
2387 if (ylow2 < gPad->GetUymin()) ylow2 =
gPad->GetUymin();
2388 if (ylow2 < ylow1) {
2390 arrow.
PaintArrow(x,ylow1,x,ylow2,asize,arrowOpt);
2392 if (!brackets)
gPad->PaintLine(x,ylow1,x,ylow2);
2395 xb[0] = x-tx; yb[0] = ylow2+ty;
2396 xb[1] = x-tx; yb[1] = ylow2;
2397 xb[2] = x+tx; yb[2] = ylow2;
2398 xb[3] = x+tx; yb[3] = ylow2+ty;
2399 gPad->PaintPolyLine(4, xb, yb);
2401 gPad->PaintLine(x-tx,ylow2,x+tx,ylow2);
2415 if (option4)
PaintGraph(theGraph, 2*theNpoints, xline, yline,
"FC");
2416 else PaintGraph(theGraph, 2*theNpoints, xline, yline,
"F");
2417 gPad->SetLogx(logx);
2418 gPad->SetLogy(logy);
2437 const Int_t kBASEMARKER=8;
2438 Double_t s2x, s2y, symbolsize, sbase;
2439 Double_t x,
y, xl1, xl2, xr1, xr2, yup1, yup2, ylow1, ylow2, tx, ty;
2441 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};
2442 static Float_t cyy[15] = {1,1,1,1,1,1,1,1,1,0.5,0.6,1,1,1,1};
2455 if (strchr(option,
'X') || strchr(option,
'x')) {
PaintGraphSimple(theGraph, option);
return;}
2458 if (strstr(option,
"||") || strstr(option,
"[]")) {
2460 if (strstr(option,
"[]")) braticks =
kTRUE;
2463 if (strchr(option,
'z')) endLines =
kFALSE;
2464 if (strchr(option,
'Z')) endLines =
kFALSE;
2465 const char *arrowOpt = 0;
2466 if (strchr(option,
'>')) arrowOpt =
">";
2467 if (strstr(option,
"|>")) arrowOpt =
"|>";
2470 if (strchr(option,
'a')) axis =
kTRUE;
2471 if (strchr(option,
'A')) axis =
kTRUE;
2479 if (strchr(option,
'0')) option0 =
kTRUE;
2480 if (strchr(option,
'2')) option2 =
kTRUE;
2481 if (strchr(option,
'3')) option3 =
kTRUE;
2482 if (strchr(option,
'4')) {option3 =
kTRUE; option4 =
kTRUE;}
2483 if (strchr(option,
'5')) {option2 =
kTRUE; option5 =
kTRUE;}
2486 xline =
new Double_t[2*theNpoints];
2487 yline =
new Double_t[2*theNpoints];
2488 if (!xline || !yline) {
2489 Error(
"Paint",
"too many points, out of memory");
2496 theGraph->TAttLine::Modify();
2511 sbase = symbolsize*kBASEMARKER;
2515 if (mark >= 20 && mark <= 34) {
2524 tx =
gPad->PixeltoX(dxend) -
gPad->PixeltoX(0);
2525 ty =-
gPad->PixeltoY(dxend) +
gPad->PixeltoY(0);
2526 Float_t asize = 0.6*symbolsize*kBASEMARKER/
gPad->GetWh();
2529 for (
Int_t i=0;i<theNpoints;i++) {
2530 x =
gPad->XtoPad(theX[i]);
2531 y =
gPad->YtoPad(theY[i]);
2532 bxl =
gPad->YtoPad(theY[i]+theEXlowd[i]);
2533 bxh =
gPad->YtoPad(theY[i]+theEXhighd[i]);
2534 byl =
gPad->XtoPad(theX[i]+theEYlowd[i]);
2535 byh =
gPad->XtoPad(theX[i]+theEYhighd[i]);
2538 if (x < gPad->GetUxmin()) x =
gPad->GetUxmin();
2539 if (x >
gPad->GetUxmax()) x =
gPad->GetUxmax();
2540 if (y < gPad->GetUymin()) y =
gPad->GetUymin();
2541 if (y >
gPad->GetUymax()) y =
gPad->GetUymax();
2543 if (x < gPad->GetUxmin())
continue;
2544 if (x >
gPad->GetUxmax())
continue;
2545 if (y < gPad->GetUymin())
continue;
2546 if (y >
gPad->GetUymax())
continue;
2552 x1b =
gPad->XtoPad(theX[i] - theEXlow[i]);
2553 y1b =
gPad->YtoPad(theY[i] - theEYlow[i]);
2554 x2b =
gPad->XtoPad(theX[i] + theEXhigh[i]);
2555 y2b =
gPad->YtoPad(theY[i] + theEYhigh[i]);
2556 if (x1b < gPad->GetUxmin()) x1b =
gPad->GetUxmin();
2557 if (x1b >
gPad->GetUxmax()) x1b =
gPad->GetUxmax();
2558 if (y1b < gPad->GetUymin()) y1b =
gPad->GetUymin();
2559 if (y1b >
gPad->GetUymax()) y1b =
gPad->GetUymax();
2560 if (x2b < gPad->GetUxmin()) x2b =
gPad->GetUxmin();
2561 if (x2b >
gPad->GetUxmax()) x2b =
gPad->GetUxmax();
2562 if (y2b < gPad->GetUymin()) y2b =
gPad->GetUymin();
2563 if (y2b >
gPad->GetUymax()) y2b =
gPad->GetUymax();
2564 if (option5) box.
PaintBox(x1b, y1b, x2b, y2b,
"l");
2565 else box.
PaintBox(x1b, y1b, x2b, y2b);
2573 yline[if1-1] =
gPad->YtoPad(theY[i] + theEYhigh[i]);
2574 yline[if2-1] =
gPad->YtoPad(theY[i] - theEYlow[i]);
2581 xl2 =
gPad->XtoPad(theX[i] - theEXlow[i]);
2584 arrow.
PaintArrow(xl1,y,xl2,bxl,asize,arrowOpt);
2586 if (!brackets)
gPad->PaintLine(xl1,y,xl2,bxl);
2589 xb[0] = xl2+tx; yb[0] = bxl-ty;
2590 xb[1] = xl2; yb[1] = bxl-ty;
2591 xb[2] = xl2; yb[2] = bxl+ty;
2592 xb[3] = xl2+tx; yb[3] = bxl+ty;
2593 gPad->PaintPolyLine(4, xb, yb);
2595 gPad->PaintLine(xl2,bxl-ty,xl2,bxl+ty);
2601 xr2 =
gPad->XtoPad(theX[i] + theEXhigh[i]);
2604 arrow.
PaintArrow(xr1,y,xr2,bxh,asize,arrowOpt);
2606 if (!brackets)
gPad->PaintLine(xr1,y,xr2,bxh);
2609 xb[0] = xr2-tx; yb[0] = bxh-ty;
2610 xb[1] = xr2; yb[1] = bxh-ty;
2611 xb[2] = xr2; yb[2] = bxh+ty;
2612 xb[3] = xr2-tx; yb[3] = bxh+ty;
2613 gPad->PaintPolyLine(4, xb, yb);
2615 gPad->PaintLine(xr2,bxh-ty,xr2,bxh+ty);
2621 yup2 =
gPad->YtoPad(theY[i] + theEYhigh[i]);
2622 if (yup2 >
gPad->GetUymax()) yup2 =
gPad->GetUymax();
2625 arrow.
PaintArrow(x,yup1,byh,yup2,asize,arrowOpt);
2627 if (!brackets)
gPad->PaintLine(x,yup1,byh,yup2);
2630 xb[0] = byh-tx; yb[0] = yup2-ty;
2631 xb[1] = byh-tx; yb[1] = yup2;
2632 xb[2] = byh+tx; yb[2] = yup2;
2633 xb[3] = byh+tx; yb[3] = yup2-ty;
2634 gPad->PaintPolyLine(4, xb, yb);
2636 gPad->PaintLine(byh-tx,yup2,byh+tx,yup2);
2642 ylow2 =
gPad->YtoPad(theY[i] - theEYlow[i]);
2643 if (ylow2 < gPad->GetUymin()) ylow2 =
gPad->GetUymin();
2644 if (ylow2 < ylow1) {
2646 arrow.
PaintArrow(x,ylow1,byl,ylow2,asize,arrowOpt);
2648 if (!brackets)
gPad->PaintLine(x,ylow1,byl,ylow2);
2651 xb[0] = byl-tx; yb[0] = ylow2+ty;
2652 xb[1] = byl-tx; yb[1] = ylow2;
2653 xb[2] = byl+tx; yb[2] = ylow2;
2654 xb[3] = byl+tx; yb[3] = ylow2+ty;
2655 gPad->PaintPolyLine(4, xb, yb);
2657 gPad->PaintLine(byl-tx,ylow2,byl+tx,ylow2);
2671 if (option4)
PaintGraph(theGraph, 2*theNpoints, xline, yline,
"FC");
2672 else PaintGraph(theGraph, 2*theNpoints, xline, yline,
"F");
2673 gPad->SetLogx(logx);
2674 gPad->SetLogy(logy);
2693 const Int_t kBASEMARKER=8;
2694 Double_t s2x, s2y, symbolsize, sbase;
2695 Double_t x,
y,
ex,
ey, xl1, xl2, xr1, xr2, yup1, yup2, ylow1, ylow2, tx, ty;
2696 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};
2697 static Float_t cyy[15] = {1,1,1,1,1,1,1,1,1,0.5,0.6,1,1,1,1};
2704 if (strchr(option,
'X') || strchr(option,
'x')) {
PaintGraphSimple(theGraph, option);
return;}
2707 if (strstr(option,
"||") || strstr(option,
"[]")) {
2709 if (strstr(option,
"[]")) braticks =
kTRUE;
2712 if (strchr(option,
'z')) endLines =
kFALSE;
2713 if (strchr(option,
'Z')) endLines =
kFALSE;
2714 const char *arrowOpt = 0;
2715 if (strchr(option,
'>')) arrowOpt =
">";
2716 if (strstr(option,
"|>")) arrowOpt =
"|>";
2719 if (strchr(option,
'a')) axis =
kTRUE;
2720 if (strchr(option,
'A')) axis =
kTRUE;
2728 if (strchr(option,
'0')) option0 =
kTRUE;
2729 if (strchr(option,
'2')) option2 =
kTRUE;
2730 if (strchr(option,
'3')) option3 =
kTRUE;
2731 if (strchr(option,
'4')) {option3 =
kTRUE; option4 =
kTRUE;}
2732 if (strchr(option,
'5')) {option2 =
kTRUE; option5 =
kTRUE;}
2735 xline =
new Double_t[2*theNpoints];
2736 yline =
new Double_t[2*theNpoints];
2737 if (!xline || !yline) {
2738 Error(
"Paint",
"too many points, out of memory");
2745 theGraph->TAttLine::Modify();
2760 sbase = symbolsize*kBASEMARKER;
2764 if (mark >= 20 && mark <= 34) {
2773 tx =
gPad->PixeltoX(dxend) -
gPad->PixeltoX(0);
2774 ty =-
gPad->PixeltoY(dxend) +
gPad->PixeltoY(0);
2775 Float_t asize = 0.6*symbolsize*kBASEMARKER/
gPad->GetWh();
2778 for (
Int_t i=0;i<theNpoints;i++) {
2779 x =
gPad->XtoPad(theX[i]);
2780 y =
gPad->YtoPad(theY[i]);
2783 if (x < gPad->GetUxmin()) x =
gPad->GetUxmin();
2784 if (x >
gPad->GetUxmax()) x =
gPad->GetUxmax();
2785 if (y < gPad->GetUymin()) y =
gPad->GetUymin();
2786 if (y >
gPad->GetUymax()) y =
gPad->GetUymax();
2788 if (x < gPad->GetUxmin())
continue;
2789 if (x >
gPad->GetUxmax())
continue;
2790 if (y < gPad->GetUymin())
continue;
2791 if (y >
gPad->GetUymax())
continue;
2799 x1b =
gPad->XtoPad(theX[i] - ex);
2800 y1b =
gPad->YtoPad(theY[i] - ey);
2801 x2b =
gPad->XtoPad(theX[i] + ex);
2802 y2b =
gPad->YtoPad(theY[i] + ey);
2803 if (x1b < gPad->GetUxmin()) x1b =
gPad->GetUxmin();
2804 if (x1b >
gPad->GetUxmax()) x1b =
gPad->GetUxmax();
2805 if (y1b < gPad->GetUymin()) y1b =
gPad->GetUymin();
2806 if (y1b >
gPad->GetUymax()) y1b =
gPad->GetUymax();
2807 if (x2b < gPad->GetUxmin()) x2b =
gPad->GetUxmin();
2808 if (x2b >
gPad->GetUxmax()) x2b =
gPad->GetUxmax();
2809 if (y2b < gPad->GetUymin()) y2b =
gPad->GetUymin();
2810 if (y2b >
gPad->GetUymax()) y2b =
gPad->GetUymax();
2811 if (option5) box.
PaintBox(x1b, y1b, x2b, y2b,
"l");
2812 else box.
PaintBox(x1b, y1b, x2b, y2b);
2820 yline[if1-1] =
gPad->YtoPad(theY[i] + ey);
2821 yline[if2-1] =
gPad->YtoPad(theY[i] - ey);
2828 xl2 =
gPad->XtoPad(theX[i] - ex);
2831 arrow.
PaintArrow(xl1,y,xl2,y,asize,arrowOpt);
2833 if (!brackets)
gPad->PaintLine(xl1,y,xl2,y);
2836 xb[0] = xl2+tx; yb[0] = y-ty;
2837 xb[1] = xl2; yb[1] = y-ty;
2838 xb[2] = xl2; yb[2] = y+ty;
2839 xb[3] = xl2+tx; yb[3] = y+ty;
2840 gPad->PaintPolyLine(4, xb, yb);
2842 gPad->PaintLine(xl2,y-ty,xl2,y+ty);
2848 xr2 =
gPad->XtoPad(theX[i] + ex);
2851 arrow.
PaintArrow(xr1,y,xr2,y,asize,arrowOpt);
2853 if (!brackets)
gPad->PaintLine(xr1,y,xr2,y);
2856 xb[0] = xr2-tx; yb[0] = y-ty;
2857 xb[1] = xr2; yb[1] = y-ty;
2858 xb[2] = xr2; yb[2] = y+ty;
2859 xb[3] = xr2-tx; yb[3] = y+ty;
2860 gPad->PaintPolyLine(4, xb, yb);
2862 gPad->PaintLine(xr2,y-ty,xr2,y+ty);
2868 yup2 =
gPad->YtoPad(theY[i] + ey);
2869 if (yup2 >
gPad->GetUymax()) yup2 =
gPad->GetUymax();
2872 arrow.
PaintArrow(x,yup1,x,yup2,asize,arrowOpt);
2874 if (!brackets)
gPad->PaintLine(x,yup1,x,yup2);
2877 xb[0] = x-tx; yb[0] = yup2-ty;
2878 xb[1] = x-tx; yb[1] = yup2;
2879 xb[2] = x+tx; yb[2] = yup2;
2880 xb[3] = x+tx; yb[3] = yup2-ty;
2881 gPad->PaintPolyLine(4, xb, yb);
2883 gPad->PaintLine(x-tx,yup2,x+tx,yup2);
2889 ylow2 =
gPad->YtoPad(theY[i] - ey);
2890 if (ylow2 < gPad->GetUymin()) ylow2 =
gPad->GetUymin();
2891 if (ylow2 < ylow1) {
2893 arrow.
PaintArrow(x,ylow1,x,ylow2,asize,arrowOpt);
2895 if (!brackets)
gPad->PaintLine(x,ylow1,x,ylow2);
2898 xb[0] = x-tx; yb[0] = ylow2+ty;
2899 xb[1] = x-tx; yb[1] = ylow2;
2900 xb[2] = x+tx; yb[2] = ylow2;
2901 xb[3] = x+tx; yb[3] = ylow2+ty;
2902 gPad->PaintPolyLine(4, xb, yb);
2904 gPad->PaintLine(x-tx,ylow2,x+tx,ylow2);
2918 if (option4)
PaintGraph(theGraph, 2*theNpoints, xline, yline,
"FC");
2919 else PaintGraph(theGraph, 2*theNpoints, xline, yline,
"F");
2920 gPad->SetLogx(logx);
2921 gPad->SetLogy(logy);
2935 Double_t rwrmin, rwrmax, rwtmin, rwtmax;
2939 Int_t theNpoints = theGraphPolar->
GetN();
2945 if (theNpoints<1)
return;
2960 if (thePolargram)
if (!
gPad->FindObject(thePolargram->
GetName())) thePolargram=0;
2961 if (!thePolargram) {
2964 while (
TObject* AnyObj = padObjIter.Next()) {
2965 if (
TString(AnyObj->ClassName()).CompareTo(
"TGraphPolargram",
2974 if (!thePolargram) {
2976 rwrmin = theY[0]; rwrmax = theY[theNpoints-1];
2977 rwtmin = theX[0]; rwtmax = theX[theNpoints-1];
2979 for (ipt = 0; ipt < theNpoints; ipt++) {
2982 if (theX[ipt] -theEX[ipt] < rwtmin) rwtmin = theX[ipt]-theEX[ipt];
2983 if (theX[ipt] +theEX[ipt] > rwtmax) rwtmax = theX[ipt]+theEX[ipt];
2985 if (theX[ipt] < rwtmin) rwtmin=theX[ipt];
2986 if (theX[ipt] > rwtmax) rwtmax=theX[ipt];
2989 if (theY[ipt] -theEY[ipt] < rwrmin) rwrmin = theY[ipt]-theEY[ipt];
2990 if (theY[ipt] +theEY[ipt] > rwrmax) rwrmax = theY[ipt]+theEY[ipt];
2992 if (theY[ipt] < rwrmin) rwrmin=theY[ipt];
2993 if (theY[ipt] > rwrmax) rwrmax=theY[ipt];
2997 if (rwrmin == rwrmax) rwrmax += 1.;
2998 if (rwtmin == rwtmax) rwtmax += 1.;
3005 rwtmax += dt/theNpoints;
3007 rwrmin = thePolargram->
GetRMin();
3008 rwrmax = thePolargram->
GetRMax();
3009 rwtmin = thePolargram->
GetTMin();
3010 rwtmax = thePolargram->
GetTMax();
3015 thePolargram =
new TGraphPolargram(
"Polargram",rwrmin,rwrmax,rwtmin,rwtmax);
3019 if (nolabel) thePolargram->
Draw(
"N");
3020 else thePolargram->
Draw(
"");
3029 Double_t radiusNDC = rwrmax-rwrmin;
3039 for (i=0; i<theNpoints; i++) {
3040 Double_t eymin, eymax, exmin,exmax;
3041 exmin = (theY[i]-theEY[i]-rwrmin)/radiusNDC*
3043 eymin = (theY[i]-theEY[i]-rwrmin)/radiusNDC*
3045 exmax = (theY[i]+theEY[i]-rwrmin)/radiusNDC*
3047 eymax = (theY[i]+theEY[i]-rwrmin)/radiusNDC*
3049 theGraphPolar->TAttLine::Modify();
3050 if (exmin != exmax || eymin != eymax)
gPad->PaintLine(exmin,eymin,exmax,eymax);
3054 for (i=0; i<theNpoints; i++) {
3058 theGraphPolar->TAttLine::Modify();
3059 if (phimin != phimax) thePolargram->
PaintCircle(0,0,rad,phimin,phimax,0);
3065 if (!(
gPad->GetLogx()) && !(
gPad->GetLogy())) {
3066 Double_t a,
b,
c=1,
x1,
x2, y1, y2, discr, norm1, norm2, xts, yts;
3074 for (i=0; i<theNpoints; i++) {
3077 xt = (theY[i]-rwrmin)/radiusNDC*
TMath::Cos(c*(theX[i]-rwtmin)/thetaNDC);
3078 yt = (theY[i]-rwrmin)/radiusNDC*
TMath::Sin(c*(theX[i]-rwtmin)/thetaNDC);
3079 norm =
sqrt(xt*xt+yt*yt);
3084 if (!previouspointin) {
3089 a = (yt-yts)/(xt-xts);
3091 discr = 4*(a*a-b*b+1);
3092 x1 = (-2*a*b+
sqrt(discr))/(2*(a*a+1));
3093 x2 = (-2*a*b-
sqrt(discr))/(2*(a*a+1));
3096 norm1 =
sqrt((
x1-xt)*(
x1-xt)+(y1-yt)*(y1-yt));
3097 norm2 =
sqrt((x2-xt)*(x2-xt)+(y2-yt)*(y2-yt));
3098 previouspointin =
kFALSE;
3100 if (norm1 < norm2) {
3110 PaintGraph(theGraphPolar, j+1, theXpol, theYpol, opt);
3115 if (j>=1 && !previouspointin) {
3116 a = (yt-theYpol[j])/(xt-theXpol[j]);
3117 b = theYpol[j]-a*theXpol[j];
3118 previouspointin =
kTRUE;
3119 discr = 4*(a*a-b*b+1);
3120 x1 = (-2*a*b+
sqrt(discr))/(2*(a*a+1));
3121 x2 = (-2*a*b-
sqrt(discr))/(2*(a*a+1));
3124 norm1 =
sqrt((
x1-xt)*(
x1-xt)+(y1-yt)*(y1-yt));
3125 norm2 =
sqrt((x2-xt)*(x2-xt)+(y2-yt)*(y2-yt));
3127 if (norm1 < norm2) {
3134 PaintGraph(theGraphPolar, j+1, theXpol, theYpol, opt);
3141 PaintGraph(theGraphPolar, j+1, theXpol, theYpol, opt);
3144 for (i=0; i<theNpoints; i++) {
3148 PaintGraph(theGraphPolar, theNpoints, theXpol, theYpol,opt);
3157 TIter next(
gPad->GetListOfPrimitives());
3158 while ((obj = next())) {
3161 if (title->GetName())
3162 if (strcmp(title->GetName(),
"title")) {title = 0;
continue;}
3166 if (title)
delete title;
3172 if (ht <= 0) ht = 0.05;
3187 if (wt > 0) title->SetX2NDC(title->GetX1NDC()+wt);
3193 if (talh < 1) talh = 1;
else if (talh > 3) talh = 3;
3195 if (talv < 1) talv = 1;
else if (talv > 3) talv = 3;
3201 if (talh == 2) xpos = xpos-wt/2.;
3202 if (talh == 3) xpos = xpos-wt;
3203 if (talv == 2) ypos = ypos+ht/2.;
3204 if (talv == 1) ypos = ypos+ht;
3237 TF1 *theF = theGraphQQ->
GetF();
3240 Error(
"TGraphQQ::Paint",
"2nd dataset or theoretical function not specified");
3255 Double_t yxmin, xymin, yxmax, xymax;
3261 TLine line1, line2, line3;
3264 yxmin = (theYq2-theYq1)*(xmin-theXq1)/(theXq2-theXq1) + theYq1;
3266 xymin = (theXq2-theXq1)*(ymin-theYq1)/(theYq2-theYq1) + theXq1;
3267 line1.
PaintLine(xymin, ymin, xqmin, yqmin);
3270 line1.
PaintLine(xmin, yxmin, xqmin, yqmin);
3272 line2.
PaintLine(xqmin, yqmin, xqmax, yqmax);
3274 yxmax = (theYq2-theYq1)*(xmax-theXq1)/(theXq2-theXq1) + theYq1;
3276 xymax = (theXq2-theXq1)*(ymax-theYq1)/(theYq2-theYq1) + theXq1;
3277 line3.
PaintLine(xqmax, yqmax, xymax, ymax);
3280 line3.
PaintLine(xqmax, yqmax, xmax, yxmax);
3314 theHist->
Paint(
"0");
3327 std::vector<Double_t> newX(N);
3328 std::vector<Double_t> newY(N);
3340 if (
gPad->GetGridx()) {
3341 GL = (YA2-YA1)/(
gPad->GetY2() -
gPad->GetY1());
3357 theNewAxis->
Paint();
3360 for (
Int_t i=0; i<
N; i++) newX[i] = dX-X[i];
3362 for (
Int_t i=0; i<
N; i++) newX[i] = X[i];
3373 if (
gPad->GetGridy()) {
3374 GL = (XA2-XA1)/(
gPad->GetX2() -
gPad->GetX1());
3390 theNewAxis->
Paint();
3393 for (
Int_t i=0; i<
N; i++) newY[i] = dY-Y[i];
3395 for (
Int_t i=0; i<
N; i++) newY[i] = Y[i];
3400 for (
Int_t i=0; i<
N; i++) theNewGraph->
SetPoint(i, newX[i], newY[i]);
3423 if (strstr(option,
"H") || strstr(option,
"h")) {
3432 if (!functions)
return;
3468 Double_t x1,
x2, y1, y2,
x3, y3, xm, ym,
a, a1, a2, a3;
3471 Int_t ix1,iy1,ix2,iy2;
3475 gPad->GetPadPar(x1p,y1p,x2p,y2p);
3476 ix1 = (
Int_t)(iw*x1p);
3477 iy1 = (
Int_t)(ih*y1p);
3478 ix2 = (
Int_t)(iw*x2p);
3479 iy2 = (
Int_t)(ih*y2p);
3491 gPad->GetRange(rx1,ry1,rx2,ry2);
3492 Double_t rx = (x2ndc-x1ndc)/(rx2-rx1);
3493 Double_t ry = (y2ndc-y1ndc)/(ry2-ry1);
3497 xf[0] = rx*(x[0]-rx1)+x1ndc;
3498 yf[0] = ry*(y[0]-ry1)+y1ndc;
3500 for (i=1; i<
n; i++) {
3501 if (x[i]==x[i-1] && y[i]==y[i-1])
continue;
3503 xf[nf] = rx*(x[i]-rx1)+x1ndc;
3504 if (xf[i]==xf[i-1]) xf[i] += 0.000001;
3505 yf[nf] = ry*(y[i]-ry1)+y1ndc;
3524 if (xf[nf]==xf[nf-1]) {
3527 a =
TMath::ATan((yf[nf]-yf[nf-1])/(xf[nf]-xf[nf-1]));
3529 if (xf[nf]>=xf[nf-1]) {
3538 for (i=1; i<nf; i++) {
3550 if (xi1<xi0) a1 = a1+3.14159;
3556 if (xi0<xi2) a2 = a2+3.14159;
3571 if ((xm-xi0)*(x3-xi0)<0 && (ym-yi0)*(y3-yi0)<0) {
3575 if ((xm==x1) && (ym==y1)) {
3584 if (xf[nf]==xf[0] && yf[nf]==yf[0]) {
3585 xm = (xt[nf]+xt[0])*0.5;
3586 ym = (yt[nf]+yt[0])*0.5;
3594 if ((xm-xf[0])*(x3-xf[0])<0 && (ym-yf[0])*(y3-yf[0])<0) {
3608 for (i=nf2; i>0; i--) {
3609 for (j=i-1; j>0; j--) {
3610 if (xt[i-1]==xt[i] || xt[j-1]==xt[j])
continue;
3611 c1 = (yt[i-1]-yt[i])/(xt[i-1]-xt[i]);
3612 b1 = yt[i]-c1*xt[i];
3613 c2 = (yt[j-1]-yt[j])/(xt[j-1]-xt[j]);
3614 b2 = yt[j]-c2*xt[j];
3616 xc = (b2-b1)/(c1-c2);
3622 nf++; xf[nf] = xt[i]; yf[nf] = yt[i];
3623 nf++; xf[nf] = xc ; yf[nf] = yc;
3641 nf++; xf[nf] = xt[0]; yf[nf] = yt[0];
3644 for (i=0; i<nf+1; i++) {
3645 xf[i] = (1/rx)*(xf[i]-x1ndc)+rx1;
3646 yf[i] = (1/ry)*(yf[i]-y1ndc)+ry1;
3650 gPad->PaintFillArea(nf+1,xf,yf);
3651 theGraph->TAttLine::Modify();
3669 TIter next(functions);
3671 while ((obj = next())) {
3681 if (!dofit) fit = 0;
3683 if (dofit == 1) dofit = 111;
3685 Int_t print_fval = dofit%10;
3686 Int_t print_ferrors = (dofit/10)%10;
3687 Int_t print_fchi2 = (dofit/100)%10;
3688 Int_t print_fprob = (dofit/1000)%10;
3689 Int_t nlinesf = print_fval + print_fchi2 + print_fprob;
3690 if (fit) nlinesf += fit->
GetNpar();
3728 if (print_fchi2) stats->
AddText(t);
3734 if (print_fval || print_ferrors) {
3736 if (print_ferrors) {
3749 if (!done) functions->
Add(stats);
3779 Int_t i, k, kp,
km, npointsMax, banksize, n2, npt;
3780 Int_t maxiterations, finished;
3781 Int_t jtype, ktype, closed;
3782 Double_t sxmin, sxmax, symin, symax;
3785 Double_t ratio_signs, xratio, yratio;
3791 Double_t co, so, ct, st, ctu, stu, xnt;
3792 Double_t dx1, dy1, dx2, dy2, dk1, dk2;
3799 c = t = co = so = ct = st = ctu = stu = dx1 = dy1 = dx2 = dy2 = 0;
3800 xt = yt = xa = xb = ya = yb = u1 = u2 = u3 = tj = sb = 0;
3802 npointsMax = npoints*10;
3809 Error(
"Smooth",
"not enough space in memory");
3816 jtype = (drawtype%1000)-10;
3817 if (jtype > 0) { ktype = jtype; loptx =
kTRUE; }
3818 else ktype = drawtype%1000;
3847 for (i=1;i<npoints;i++) {
3849 if ((x[i]-x[i-1])*(x[i-1]-x[i-2]) < 0) six++;
3850 if ((y[i]-y[i-1])*(y[i-1]-y[i-2]) < 0) siy++;
3852 if (x[i] < sxmin) sxmin = x[i];
3853 if (x[i] > sxmax) sxmax = x[i];
3854 if (y[i] < symin) symin = y[i];
3855 if (y[i] > symax) symax = y[i];
3860 if (dx1n < 0.01*(sxmax-sxmin) && dy1n < 0.01*(symax-symin)) closed = 1;
3861 if (sxmin == sxmax) {
3864 if (six > 1) ratio_signs = siy/six;
3865 else ratio_signs = 20;
3866 xratio = ratio_signs/(sxmax-sxmin);
3868 if (symin == symax) yratio = 1;
3869 else yratio = 1/(symax-symin);
3873 for (i=0;i<npoints;i++) {
3874 x[i] = (x[i]-sxmin)*xratio;
3875 y[i] = (y[i]-symin)*yratio;
3894 if (x[0] != x[npoints-1] || y[0] != y[npoints-1])
goto L40;
3895 if (x[npoints-2] == x[npoints-1] && y[npoints-2] == y[npoints-1])
goto L40;
3896 if (x[0] == x[1] && y[0] == y[1])
goto L40;
3919 if (npt > 1)
goto L310;
3923 if (x[k-1] == x[k-2] && y[k-1] == y[k-2])
goto L50;
3928 if (npt > 1)
goto L310;
3931 if (k < npoints)
goto L90;
3932 if (!flgic) { kp = 2;
goto L130;}
3935 if (flgis)
goto L150;
3945 if (x[k-1] == x[k] && y[k-1] == y[k])
goto L80;
3953 if (!flgis)
goto L50;
3968 dx1 = x[k-1] - x[km-1];
3969 dy1 = y[k-1] - y[km-1];
3970 dk1 = dx1*dx1 + dy1*dy1;
3971 dx2 = x[kp-1] - x[k-1];
3972 dy2 = y[kp-1] - y[k-1];
3973 dk2 = dx2*dx2 + dy2*dy2;
3974 ctu = dx1*dk2 + dx2*dk1;
3975 stu = dy1*dk2 + dy2*dk1;
3976 xnt = ctu*ctu + stu*stu;
3990 if (flgis)
goto L160;
3994 w3 = 2*(dx1*dy2-dx2*dy1);
4006 w3 = 2*(dx1*dy2-dx2*dy1);
4015 if (k <= 1)
goto L120;
4045 xa = (a*t-2*dx)/tcube;
4046 xb = (3*dx-(co+
a)*t)/tsquare;
4047 ya = (b*t-2*dy)/tcube;
4048 yb = (3*dy-(so+
b)*t)/tsquare;
4079 p2 = (u1*tj-u3)*3*tj+u2;
4109 z = s*sth*(s-s*sth)*(w1*sth+w1+w2);
4110 z = z*z/((a*a+b*
b)*(delta*delta));
4111 z = (z+2.642937)*z/((.3715652*z+3.063444)*z+.2441889)-cc;
4115 if (iw > 0)
goto L250;
4116 if (z > err)
goto L240;
4121 if (iw+2 == 0)
goto L190;
4122 if (iw+2 > 0)
goto L290;
4140 theGraph->
Zero(kp,0,sb,err,s,z,maxiterations);
4141 if (kp == 2)
goto L210;
4143 Error(
"Smooth",
"Attempt to plot outside plot limits");
4146 if (iw > 0)
goto L200;
4172 qlx[npt] = sxmin + xt/xratio;
4173 qly[npt] = symin + yt/yratio;
4180 if (npt < banksize)
goto L320;
4181 if (drawtype >= 1000 || ktype > 1) {
4182 Int_t newsize = banksize + n2;
4184 for (i=0;i<banksize;i++) qtemp[i] = qlx[i];
4187 for (i=0;i<banksize;i++) qlx[i] = qtemp[i];
4188 for (i=0;i<banksize;i++) qtemp[i] = qly[i];
4191 for (i=0;i<banksize;i++) qly[i] = qtemp[i];
4200 if (drawtype >= 1000) {
4201 gPad->PaintFillArea(npt,qlx,qly,
"B");
4205 qlx[npt] = qlx[npt-1];
4206 qlx[npt+1] = qlx[0];
4212 qly[npt] = qly[npt-1];
4213 qly[npt+1] = qly[0];
4215 gPad->PaintFillArea(npt+2,qlx,qly);
4218 gPad->PaintPolyLine(npt,qlx,qly);
4221 qlx[0] = sxmin + xt/xratio;
4222 qly[0] = symin + yt/yratio;
4224 if (finished > 0)
goto L390;
4225 if (finished < 0) { finished = 0;
goto L110;}
4226 if (s > 0)
goto L180;
4232 for (i=0;i<npoints;i++) {
4233 x[i] = sxmin + x[i]/xratio;
4234 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)
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)
Function which returns kTRUE if point xp,yp lies inside the polygon defined by the np points in array...
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
constexpr Double_t E()
Base of natural log: .
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)