613 if (
gPad->GetLogx()) {
614 for (i=0;i<npoints;i++) {
619 if (!opt &&
gPad->GetLogy()) {
620 for (i=0;i<npoints;i++) {
641 if (distance <= 5)
return distance;
645 const Int_t big = 9999;
646 const Int_t kMaxDiff = 10;
653 if (px <= puxmin)
return big;
654 if (py >= puymin)
return big;
655 if (px >= puxmax)
return big;
656 if (py <= puymax)
return big;
666 theX = theGraphPolar->
GetXpol();
667 theY = theGraphPolar->
GetYpol();
669 theX = theGraph->
GetX();
670 theY = theGraph->
GetY();
674 for (i=0;i<theNpoints;i++) {
675 pxp =
gPad->XtoAbsPixel(
gPad->XtoPad(theX[i]));
676 pyp =
gPad->YtoAbsPixel(
gPad->YtoPad(theY[i]));
686 if (distance < kMaxDiff)
return distance;
688 for (i=0;i<theNpoints-1;i++) {
690 d =
l.DistancetoLine(px, py,
gPad->XtoPad(theX[i]),
gPad->YtoPad(theY[i]),
gPad->XtoPad(theX[i+1]),
gPad->YtoPad(theY[i+1]));
691 if (
d < distance) distance =
d;
706 TIter next(functions);
710 else dist =
f->DistancetoPrimitive(px,py);
711 if (
dist < kMaxDiff) {
712 gPad->SetSelected(
f);
728 Error(
"DrawPanel",
"need to draw graph first");
733 gROOT->ProcessLine(
Form(
"((TCanvas*)0x%lx)->Selected((TVirtualPad*)0x%lx,(TObject*)0x%lx,1)",
756 const Int_t kMaxDiff = 10;
757 static Bool_t middle, badcase;
758 static Int_t ipoint, pxp, pyp;
759 static Int_t px1,px2,py1,py2;
760 static Int_t pxold, pyold, px1old, py1old, px2old, py2old;
761 static Int_t dpx, dpy;
769 if (!
gPad->IsEditable())
return;
779 theGraph->TAttLine::Modify();
780 px1 =
gPad->XtoAbsPixel(
gPad->GetX1());
781 py1 =
gPad->YtoAbsPixel(
gPad->GetY1());
782 px2 =
gPad->XtoAbsPixel(
gPad->GetX2());
783 py2 =
gPad->YtoAbsPixel(
gPad->GetY2());
788 x =
new Int_t[theNpoints+1];
789 y =
new Int_t[theNpoints+1];
790 for (i=0;i<theNpoints;i++) {
791 pxp =
gPad->XtoAbsPixel(
gPad->XtoPad(theX[i]));
792 pyp =
gPad->YtoAbsPixel(
gPad->YtoPad(theY[i]));
793 if (pxp < -kMaxPixel || pxp >=
kMaxPixel ||
799 gVirtualX->DrawLine(pxp-4, pyp-4, pxp+4, pyp-4);
800 gVirtualX->DrawLine(pxp+4, pyp-4, pxp+4, pyp+4);
801 gVirtualX->DrawLine(pxp+4, pyp+4, pxp-4, pyp+4);
802 gVirtualX->DrawLine(pxp-4, pyp+4, pxp-4, pyp-4);
807 if (
d < kMaxDiff) ipoint =i;
813 if (ipoint < 0)
return;
817 px2old =
gPad->XtoAbsPixel(theX[1]);
818 py2old =
gPad->YtoAbsPixel(theY[1]);
819 }
else if (ipoint == theNpoints-1) {
820 px1old =
gPad->XtoAbsPixel(
gPad->XtoPad(theX[theNpoints-2]));
821 py1old =
gPad->YtoAbsPixel(
gPad->YtoPad(theY[theNpoints-2]));
825 px1old =
gPad->XtoAbsPixel(
gPad->XtoPad(theX[ipoint-1]));
826 py1old =
gPad->YtoAbsPixel(
gPad->YtoPad(theY[ipoint-1]));
827 px2old =
gPad->XtoAbsPixel(
gPad->XtoPad(theX[ipoint+1]));
828 py2old =
gPad->YtoAbsPixel(
gPad->YtoPad(theY[ipoint+1]));
830 pxold =
gPad->XtoAbsPixel(
gPad->XtoPad(theX[ipoint]));
831 pyold =
gPad->YtoAbsPixel(
gPad->YtoPad(theY[ipoint]));
839 for (i=0;i<theNpoints;i++) {
840 pxp =
gPad->XtoAbsPixel(
gPad->XtoPad(theX[i]));
841 pyp =
gPad->YtoAbsPixel(
gPad->YtoPad(theY[i]));
843 if (
d < kMaxDiff) middle =
kFALSE;
855 for(i=0;i<theNpoints-1;i++) {
856 gVirtualX->DrawLine(
x[i]+dpx,
y[i]+dpy,
x[i+1]+dpx,
y[i+1]+dpy);
859 if (pxp < -kMaxPixel || pxp >=
kMaxPixel ||
860 pyp < -kMaxPixel || pyp >=
kMaxPixel)
continue;
861 gVirtualX->DrawLine(pxp-4, pyp-4, pxp+4, pyp-4);
862 gVirtualX->DrawLine(pxp+4, pyp-4, pxp+4, pyp+4);
863 gVirtualX->DrawLine(pxp+4, pyp+4, pxp-4, pyp+4);
864 gVirtualX->DrawLine(pxp-4, pyp+4, pxp-4, pyp-4);
866 pxp =
x[theNpoints-1]+dpx;
867 pyp =
y[theNpoints-1]+dpy;
868 gVirtualX->DrawLine(pxp-4, pyp-4, pxp+4, pyp-4);
869 gVirtualX->DrawLine(pxp+4, pyp-4, pxp+4, pyp+4);
870 gVirtualX->DrawLine(pxp+4, pyp+4, pxp-4, pyp+4);
871 gVirtualX->DrawLine(pxp-4, pyp+4, pxp-4, pyp-4);
876 for(i=0;i<theNpoints-1;i++) {
877 gVirtualX->DrawLine(
x[i]+dpx,
y[i]+dpy,
x[i+1]+dpx,
y[i+1]+dpy);
880 if (pxp < -kMaxPixel || pxp >=
kMaxPixel ||
881 pyp < -kMaxPixel || pyp >=
kMaxPixel)
continue;
882 gVirtualX->DrawLine(pxp-4, pyp-4, pxp+4, pyp-4);
883 gVirtualX->DrawLine(pxp+4, pyp-4, pxp+4, pyp+4);
884 gVirtualX->DrawLine(pxp+4, pyp+4, pxp-4, pyp+4);
885 gVirtualX->DrawLine(pxp-4, pyp+4, pxp-4, pyp-4);
887 pxp =
x[theNpoints-1]+dpx;
888 pyp =
y[theNpoints-1]+dpy;
889 gVirtualX->DrawLine(pxp-4, pyp-4, pxp+4, pyp-4);
890 gVirtualX->DrawLine(pxp+4, pyp-4, pxp+4, pyp+4);
891 gVirtualX->DrawLine(pxp+4, pyp+4, pxp-4, pyp+4);
892 gVirtualX->DrawLine(pxp-4, pyp+4, pxp-4, pyp-4);
894 if (px1old)
gVirtualX->DrawLine(px1old, py1old, pxold, pyold);
895 if (px2old)
gVirtualX->DrawLine(pxold, pyold, px2old, py2old);
896 gVirtualX->DrawLine(pxold-4, pyold-4, pxold+4, pyold-4);
897 gVirtualX->DrawLine(pxold+4, pyold-4, pxold+4, pyold+4);
898 gVirtualX->DrawLine(pxold+4, pyold+4, pxold-4, pyold+4);
899 gVirtualX->DrawLine(pxold-4, pyold+4, pxold-4, pyold-4);
906 if (px1old)
gVirtualX->DrawLine(px1old, py1old, pxold, pyold);
907 if (px2old)
gVirtualX->DrawLine(pxold, pyold, px2old, py2old);
908 gVirtualX->DrawLine(pxold-4, pyold-4, pxold+4, pyold-4);
909 gVirtualX->DrawLine(pxold+4, pyold-4, pxold+4, pyold+4);
910 gVirtualX->DrawLine(pxold+4, pyold+4, pxold-4, pyold+4);
911 gVirtualX->DrawLine(pxold-4, pyold+4, pxold-4, pyold-4);
920 dxr = dx/(1 -
gPad->GetLeftMargin() -
gPad->GetRightMargin());
921 dyr = dy/(1 -
gPad->GetBottomMargin() -
gPad->GetTopMargin());
937 for(i=0;i<theNpoints;i++) {
938 if (badcase)
continue;
939 if (
x) theX[i] =
gPad->PadtoX(
gPad->AbsPixeltoX(
x[i]+dpx));
940 if (
y) theY[i] =
gPad->PadtoY(
gPad->AbsPixeltoY(
y[i]+dpy));
949 theX[ipoint] =
gPad->PadtoX(
gPad->AbsPixeltoX(pxold));
950 theY[ipoint] =
gPad->PadtoY(
gPad->AbsPixeltoY(pyold));
954 theX[theNpoints-1] = theX[0];
955 theY[theNpoints-1] = theY[0];
957 if (ipoint == theNpoints-1) {
958 theX[0] = theX[theNpoints-1];
959 theY[0] = theY[theNpoints-1];
971 if (
gROOT->IsEscaped()) {
985 dxr = dx/(1 -
gPad->GetLeftMargin() -
gPad->GetRightMargin());
986 dyr = dy/(1 -
gPad->GetBottomMargin() -
gPad->GetTopMargin());
998 for(i=0;i<theNpoints;i++) {
999 if (badcase)
continue;
1000 if (
x) theX[i] =
gPad->PadtoX(
gPad->AbsPixeltoX(
x[i]+dpx));
1001 if (
y) theY[i] =
gPad->PadtoY(
gPad->AbsPixeltoY(
y[i]+dpy));
1004 theX[ipoint] =
gPad->PadtoX(
gPad->AbsPixeltoX(pxold));
1005 theY[ipoint] =
gPad->PadtoY(
gPad->AbsPixeltoY(pyold));
1009 theX[theNpoints-1] = theX[0];
1010 theY[theNpoints-1] = theY[0];
1012 if (ipoint == theNpoints-1) {
1013 theX[0] = theX[theNpoints-1];
1014 theY[0] = theY[theNpoints-1];
1068 const Int_t kHighlightRange = 50;
1069 static Int_t distanceOld = kHighlightRange;
1072 if ((distance < kHighlightRange) && (distance < distanceOld)) {
1110 if (
gPad->GetLogx()) {
1114 if (
gPad->GetLogy()) {
1118 if ((hx < uxmin) || (hx > uxmax))
return;
1119 if ((hy < uymin) || (hy > uymax))
return;
1143 strlcpy(chopt,option,80);
1146 char *l1 = strstr(chopt,
"pfc");
1147 char *l2 = strstr(chopt,
"plc");
1148 char *l3 = strstr(chopt,
"pmc");
1149 if (l1 || l2 || l3) {
1158 char *l4 = strstr(chopt,
"rx");
1159 char *l5 = strstr(chopt,
"ry");
1191 TIter next(functions);
1212 gPad->PushSelectableObject(theGraph);
1214 Int_t optionLine , optionAxis , optionCurve , optionStar , optionMark;
1215 Int_t optionBar , optionR , optionOne , optionE;
1216 Int_t optionFill , optionZ , optionCurveFill, optionIAxis;
1217 Int_t i, npt, nloop;
1220 Double_t barxmin, barxmax, barymin, barymax;
1227 Error(
"PaintGraph",
"illegal number of points (%d)", npoints);
1234 if (opt.
Contains(
"L")) optionLine = 1;
else optionLine = 0;
1235 if (opt.
Contains(
"A")) optionAxis = 1;
else optionAxis = 0;
1236 if (opt.
Contains(
"C")) optionCurve = 1;
else optionCurve = 0;
1237 if (opt.
Contains(
"*")) optionStar = 1;
else optionStar = 0;
1238 if (opt.
Contains(
"P")) optionMark = 1;
else optionMark = 0;
1239 if (opt.
Contains(
"B")) optionBar = 1;
else optionBar = 0;
1240 if (opt.
Contains(
"R")) optionR = 1;
else optionR = 0;
1241 if (opt.
Contains(
"1")) optionOne = 1;
else optionOne = 0;
1242 if (opt.
Contains(
"F")) optionFill = 1;
else optionFill = 0;
1243 if (opt.
Contains(
"I")) optionIAxis = 1;
else optionIAxis = 0;
1249 if (optionLine+optionFill+optionCurve+optionStar+optionMark+optionBar+optionE == 0) {
1250 if (!chopt[0]) optionLine=1;
1256 optionCurveFill = 0;
1257 if (optionCurve && optionFill) {
1258 optionCurveFill = 1;
1263 Double_t rwxmin,rwxmax, rwymin, rwymax, maximum, minimum, dx, dy;
1266 rwxmin =
gPad->GetUxmin();
1267 rwxmax =
gPad->GetUxmax();
1268 rwymin =
gPad->GetUymin();
1269 rwymax =
gPad->GetUymax();
1272 if (minimum == -1111) {
1276 if (maximum == -1111) {
1280 uxmin =
gPad->PadtoX(rwxmin);
1281 uxmax =
gPad->PadtoX(rwxmax);
1284 theGraph->
ComputeRange(rwxmin, rwymin, rwxmax, rwymax);
1286 if (rwxmin == rwxmax) rwxmax += 1.;
1287 if (rwymin == rwymax) rwymax += 1.;
1288 dx = 0.1*(rwxmax-rwxmin);
1289 dy = 0.1*(rwymax-rwymin);
1290 uxmin = rwxmin - dx;
1291 uxmax = rwxmax + dx;
1292 minimum = rwymin - dy;
1293 maximum = rwymax + dy;
1297 if (uxmin < 0 && rwxmin >= 0) uxmin = 0.9*rwxmin;
1298 if (uxmax > 0 && rwxmax <= 0) {
1299 if (
gPad->GetLogx()) uxmax = 1.1*rwxmax;
1302 if (minimum < 0 && rwymin >= 0) minimum = 0.9*rwymin;
1303 if (maximum > 0 && rwymax <= 0) {
1307 if (minimum <= 0 && gPad->GetLogy()) minimum = 0.001*maximum;
1308 if (uxmin <= 0 && gPad->GetLogx()) {
1309 if (uxmax > 1000) uxmin = 1;
1310 else uxmin = 0.001*uxmax;
1317 char chopth[8] =
" ";
1318 if (strstr(chopt,
"x+")) strncat(chopth,
"x+",3);
1319 if (strstr(chopt,
"y+")) strncat(chopth,
"y+",3);
1320 if (optionIAxis) strncat(chopth,
"A",2);
1327 if (theNpoints > npt) npt = theNpoints;
1339 if (
gPad->GetLogy()) {
1352 rwxmin =
gPad->GetUxmin();
1353 rwxmax =
gPad->GetUxmax();
1354 rwymin =
gPad->GetUymin();
1355 rwymax =
gPad->GetUymax();
1356 uxmin =
gPad->PadtoX(rwxmin);
1357 uxmax =
gPad->PadtoX(rwxmax);
1362 maximum =
gPad->PadtoY(rwymax);
1363 minimum =
gPad->PadtoY(rwymin);
1367 theGraph->TAttLine::Modify();
1368 theGraph->TAttFill::Modify();
1369 theGraph->TAttMarker::Modify();
1377 if (optionLine || optionFill) {
1383 if (optionFill && (xn !=
x1 || yn != y1)) nloop++;
1385 for (i=1;i<=nloop;i++) {
1428 if (optionCurveFill) {
1430 if (xn !=
x1 || yn != y1) nloop++;
1434 for (i=1;i<=nloop;i++) {
1459 for (i=1;i<=nloop;i++) {
1463 if (
y[i-1] < minimum ||
y[i-1] > maximum)
continue;
1464 if (
x[i-1] < uxmin ||
x[i-1] > uxmax)
continue;
1490 for (i=1;i<=npoints;i++) {
1505 for (i=1;i<=npoints;i++) {
1522 for (i=1;i<npoints;i++) {
1523 if (
x[i] < barxmin) barxmin =
x[i];
1524 if (
x[i] > barxmax) barxmax =
x[i];
1526 bdelta = (barxmax-barxmin)/
Double_t(npoints);
1530 for (i=1;i<npoints;i++) {
1531 if (
y[i] < barymin) barymin =
y[i];
1532 if (
y[i] > barymax) barymax =
y[i];
1534 bdelta = (barymax-barymin)/
Double_t(npoints);
1538 for (i=1;i<=npoints;i++) {
1539 xlow =
x[i-1] - dbar;
1540 xhigh =
x[i-1] + dbar;
1542 if (xlow < uxmin && xhigh < uxmin)
continue;
1543 if (xhigh > uxmax && xlow > uxmax)
continue;
1544 if (xlow < uxmin) xlow = uxmin;
1545 if (xhigh > uxmax) xhigh = uxmax;
1547 else ylow =
gPad->GetUymin();
1561 for (i=1;i<=npoints;i++) {
1563 ylow =
y[i-1] - dbar;
1564 yhigh =
y[i-1] + dbar;
1617 const char *where =
"PaintGrapHist";
1619 Int_t optionLine , optionAxis , optionCurve, optionStar, optionMark;
1620 Int_t optionBar , optionRot , optionOne , optionOff ;
1621 Int_t optionFill , optionZ;
1622 Int_t optionHist , optionBins , optionMarker;
1624 Int_t drawtype=0, drawborder, drawbordersav;
1630 Double_t xi, xi1, xj, xj1, yi1, yi, yj, yj1, xwmin, ywmin;
1634 char choptaxis[10] =
" ";
1637 Error(where,
"illegal number of points (%d)", npoints);
1642 if (opt.
Contains(
"H")) optionHist = 1;
else optionHist = 0;
1643 if (opt.
Contains(
"F")) optionFill = 1;
else optionFill = 0;
1644 if (opt.
Contains(
"C")) optionCurve= 1;
else optionCurve= 0;
1645 if (opt.
Contains(
"*")) optionStar = 1;
else optionStar = 0;
1646 if (opt.
Contains(
"R")) optionRot = 1;
else optionRot = 0;
1647 if (opt.
Contains(
"1")) optionOne = 1;
else optionOne = 0;
1648 if (opt.
Contains(
"B")) optionBar = 1;
else optionBar = 0;
1649 if (opt.
Contains(
"N")) optionBins = 1;
else optionBins = 0;
1650 if (opt.
Contains(
"L")) optionLine = 1;
else optionLine = 0;
1651 if (opt.
Contains(
"P")) optionMark = 1;
else optionMark = 0;
1652 if (opt.
Contains(
"A")) optionAxis = 1;
else optionAxis = 0;
1653 if (opt.
Contains(
"][")) optionOff = 1;
else optionOff = 0;
1654 if (opt.
Contains(
"P0")) optionMark = 10;
1656 Int_t optionFill2 = 0;
1658 optionFill = 0; optionFill2 = 1;
1673 nbins = last -
first + 1;
1685 Double_t rounding = (uxmax-uxmin)*1.e-5;
1688 Int_t nx1, nx2, ndivx, ndivy, ndiv;
1701 if (ndivx < 0) strlcat(choptaxis,
"N",10);
1702 if (
gPad->GetGridx()) {
1704 strlcat(choptaxis,
"W",10);
1706 if (
gPad->GetLogx()) {
1710 strlcat(choptaxis,
"G",10);
1720 axis->
PaintAxis(rwxmin,rwymin,rwxmax,rwymin,rwmin,rwmax,ndiv,choptaxis);
1730 strlcat(choptaxis,
"N",10);
1733 if (
gPad->GetGridy()) {
1735 strlcat(choptaxis,
"W",10);
1737 if (
gPad->GetLogy()) {
1741 strlcat(choptaxis,
"G",10);
1750 axis->
PaintAxis(rwxmin,rwymin,rwxmin,rwymax,rwmin,rwmax,ndiv,choptaxis);
1756 theGraph->TAttLine::Modify();
1757 theGraph->TAttFill::Modify();
1758 theGraph->TAttMarker::Modify();
1762 if (!optionRot) {wmin =
x[0]; wmax =
x[1];}
1763 else {wmin =
y[0]; wmax =
y[1];}
1765 if (!optionBins) delta = (wmax - wmin)/
Double_t(nbins);
1767 Int_t fwidth =
gPad->GetFrameLineWidth();
1770 if (optionOff) fwidth = 1;
1786 if (optionFill && !optionCurve) {
1794 for (j=
first; j<=last;j++) {
1801 xj1 =
x[j]; xj =
x[j-1];
1803 if (j != last)
Error(where,
"X must be in increasing order");
1804 else Error(where,
"X must have N+1 values with option N");
1812 if ((
gxwork[npt-1] >= uxmin-rounding &&
gxwork[npt-1] <= uxmax+rounding) ||
1813 (
gxwork[npt] >= uxmin-rounding &&
gxwork[npt] <= uxmax+rounding)) npt += 2;
1826 if (!fillarea)
gyworkl[0] = ylast;
1837 for (j=
first; j<=last;j++) {
1842 yj1 =
y[j]; yj =
y[j-1];
1844 if (j != last)
Error(where,
"Y must be in increasing order");
1845 else Error(where,
"Y must have N+1 values with option N");
1851 if ((
gxwork[npt-1] >= uxmin-rounding &&
gxwork[npt-1] <= uxmax+rounding) ||
1852 (
gxwork[npt] >= uxmin-rounding &&
gxwork[npt] <= uxmax+rounding)) npt += 2;
1859 if (!fillarea)
gyworkl[0] = ylast;
1866 theGraph->TAttLine::Modify();
1867 theGraph->TAttFill::Modify();
1872 if ((optionHist) || !chopt[0]) {
1878 for (i=
first; i<=last;i++) {
1883 xi1 =
x[i]; xi =
x[i-1];
1885 if (i != last)
Error(where,
"X must be in increasing order");
1886 else Error(where,
"X must have N+1 values with option N");
1894 if ((
gxwork[npt-1] >= uxmin-rounding &&
gxwork[npt-1] <= uxmax+rounding) ||
1895 (
gxwork[npt] >= uxmin-rounding &&
gxwork[npt] <= uxmax+rounding)) npt += 2;
1907 Int_t nbpoints = npt-2;
1913 for (ip=point1; ip<=nbpoints; ip++) {
1920 Int_t point2 = nbpoints;
1921 for (ip=point2; ip>=point1; ip--) {
1927 nbpoints = point2-point1+1;
1931 if (
gxwork[0] >
gPad->GetUxmin()) { nbpoints++; point1 = 0; }
1932 if (
gxwork[nbpoints] <
gPad->GetUxmax()) nbpoints++;
1944 for (i=
first; i<=last;i++) {
1949 yi1 =
y[i]; yi =
y[i-1];
1951 if (i != last)
Error(where,
"Y must be in increasing order");
1952 else Error(where,
"Y must have N+1 values with option N");
1958 if ((
gxwork[npt-1] >= uxmin-rounding &&
gxwork[npt-1] <= uxmax+rounding) ||
1959 (
gxwork[npt] >= uxmin-rounding &&
gxwork[npt] <= uxmax+rounding)) npt += 2;
1978 if (!optionOne) drawtype = 2;
1983 for (i=
first; i<=last;i++) {
1988 xi1 =
x[i]; xi =
x[i-1];
1990 if (i != last)
Error(where,
"X must be in increasing order");
1991 else Error(where,
"X must have N+1 values with option N");
1994 gxwork[npt-1] =
x[i-1] + 0.5*(
x[i]-
x[i-1]);
2025 drawtype = drawtype+10;
2027 for (i=
first; i<=last;i++) {
2032 yi1 =
y[i]; yi =
y[i-1];
2034 if (i != last)
Error(where,
"Y must be in increasing order");
2035 else Error(where,
"Y must have N+1 values with option N");
2038 gywork[npt-1] =
y[i-1] + 0.5*(
y[i]-
y[i-1]);
2071 wminstep = wmin + 0.5*delta;
2073 gPad->GetRangeAxis(ax1,ay1,ax2,ay2);
2077 for (i=
first; i<=last;i++) {
2082 xi1 =
x[i]; xi =
x[i-1];
2084 if (i != last)
Error(where,
"X must be in increasing order");
2085 else Error(where,
"X must have N+1 values with option N");
2088 gxwork[npt-1] =
x[i-1] + 0.5*(
x[i]-
x[i-1]);
2090 if (
gxwork[npt-1] < uxmin ||
gxwork[npt-1] > uxmax) { npt--;
continue;}
2093 if ((
gywork[npt-1] < rwymin) || ((
gywork[npt-1] > rwymax) && !optionFill2)) {
2130 for (i=
first; i<=last;i++) {
2133 gywork[npt-1] = wminstep+(i-
first)*delta+0.5*delta;
2135 yi1 =
y[i]; yi =
y[i-1];
2137 if (i != last)
Error(where,
"Y must be in increasing order");
2138 else Error(where,
"Y must have N+1 values with option N");
2141 gywork[npt-1] =
y[i-1] + 0.5*(
y[i]-
y[i-1]);
2144 if ((
gxwork[npt-1] < uxmin) || (
gxwork[npt-1] > uxmax)) {
2166 if (optionLine != 0 && npt > 1) {
2177 offset = delta*baroffset; dbar = delta*barwidth;
2180 offset = (
x[1]-
x[0])*baroffset;
2181 dbar = (
x[1]-
x[0])*barwidth;
2183 offset = (
y[1]-
y[0])*baroffset;
2184 dbar = (
y[1]-
y[0])*barwidth;
2187 drawbordersav = drawborder;
2191 xhigh = wmin+offset+dbar;
2194 else ylow =
gPad->GetUymin();
2196 for (i=
first; i<=last;i++) {
2203 if (xlow < rwxmax && xhigh > rwxmin)
2207 xhigh = xhigh+delta;
2210 xi1 =
x[i]; xi =
x[i-1];
2212 Error(where,
"X must be in increasing order");
2215 offset = (
x[i+1]-
x[i])*baroffset;
2216 dbar = (
x[i+1]-
x[i])*barwidth;
2217 xlow =
x[i] + offset;
2218 xhigh =
x[i] + offset + dbar;
2223 ylow = wmin + offset;
2224 yhigh = wmin + offset + dbar;
2226 else xlow =
gPad->GetUxmin();
2227 for (i=
first; i<=last;i++) {
2235 gPad->PaintBox(xlow,ylow,xhigh,yhigh);
2237 ylow = ylow + delta;
2238 yhigh = yhigh + delta;
2241 yi1 =
y[i]; yi =
y[i-1];
2243 Error(where,
"Y must be in increasing order");
2246 offset = (
y[i+1]-
y[i])*baroffset;
2247 dbar = (
y[i+1]-
y[i])*barwidth;
2248 ylow =
y[i] + offset;
2249 yhigh =
y[i] + offset + dbar;
2260 if ((optionStar) || (optionMark)) optionMarker=1;
2266 for (i=
first; i<=last;i++) {
2267 if (!optionBins) xm = wmin+(i-
first)*delta+0.5*delta;
2268 else xm =
x[i-1] + 0.5*(
x[i]-
x[i-1]);
2270 if (optionMark != 10) {
2271 if (ym<rwymax && ym > rwymin) {
2277 if (ym<rwymax && ym >= rwymin) {
2294 wminstep = wmin + 0.5*delta;
2295 for (i=
first; i<=last;i++) {
2296 if (!optionBins) ym = wminstep+(i-
first)*delta+0.5*delta;
2297 else ym =
y[i-1] + 0.5*(
y[i]-
y[i-1]);
2299 if (optionMark != 10) {
2300 if (xm<rwxmax && xm > rwxmin) {
2306 if (xm<rwxmax && xm >= rwxmin) {
2346 const Int_t kBASEMARKER=8;
2347 Double_t s2x, s2y, symbolsize, sbase;
2348 Double_t x,
y, xl1, xl2, xr1, xr2, yup1, yup2, ylow1, ylow2, tx, ty;
2349 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};
2350 static Float_t cyy[15] = {1,1,1,1,1,1,1,1,1,0.5,0.6,1,1,1,1};
2359 if (strchr(option,
'X') || strchr(option,
'x')) {
PaintGraphSimple(theGraph, option);
return;}
2362 if (strstr(option,
"||") || strstr(option,
"[]")) {
2364 if (strstr(option,
"[]")) braticks =
kTRUE;
2367 if (strchr(option,
'z')) endLines =
kFALSE;
2368 if (strchr(option,
'Z')) endLines =
kFALSE;
2369 const char *arrowOpt = 0;
2370 if (strchr(option,
'>')) arrowOpt =
">";
2371 if (strstr(option,
"|>")) arrowOpt =
"|>";
2374 if (strchr(option,
'a')) axis =
kTRUE;
2375 if (strchr(option,
'A')) axis =
kTRUE;
2383 if (strchr(option,
'0')) option0 =
kTRUE;
2384 if (strchr(option,
'2')) option2 =
kTRUE;
2385 if (strchr(option,
'3')) option3 =
kTRUE;
2386 if (strchr(option,
'4')) {option3 =
kTRUE; option4 =
kTRUE;}
2387 if (strchr(option,
'5')) {option2 =
kTRUE; option5 =
kTRUE;}
2390 xline =
new Double_t[2*theNpoints];
2391 yline =
new Double_t[2*theNpoints];
2392 if (!xline || !yline) {
2393 Error(
"Paint",
"too many points, out of memory");
2400 theGraph->TAttLine::Modify();
2415 sbase = symbolsize*kBASEMARKER;
2428 tx =
gPad->PixeltoX(dxend) -
gPad->PixeltoX(0);
2429 ty =-
gPad->PixeltoY(dxend) +
gPad->PixeltoY(0);
2430 Float_t asize = 0.6*symbolsize*kBASEMARKER/
gPad->GetWh();
2433 for (
Int_t i=0;i<theNpoints;i++) {
2434 x =
gPad->XtoPad(theX[i]);
2435 y =
gPad->YtoPad(theY[i]);
2438 if (x < gPad->GetUxmin())
x =
gPad->GetUxmin();
2439 if (
x >
gPad->GetUxmax())
x =
gPad->GetUxmax();
2440 if (y < gPad->GetUymin())
y =
gPad->GetUymin();
2441 if (
y >
gPad->GetUymax())
y =
gPad->GetUymax();
2443 if (x < gPad->GetUxmin())
continue;
2444 if (
x >
gPad->GetUxmax())
continue;
2445 if (y < gPad->GetUymin())
continue;
2446 if (
y >
gPad->GetUymax())
continue;
2450 xl2 =
gPad->XtoPad(theX[i] - theEXlow[i]);
2454 x1b =
gPad->XtoPad(theX[i] - theEXlow[i]);
2455 y1b =
gPad->YtoPad(theY[i] - theEYlow[i]);
2456 x2b =
gPad->XtoPad(theX[i] + theEXhigh[i]);
2457 y2b =
gPad->YtoPad(theY[i] + theEYhigh[i]);
2458 if (x1b < gPad->GetUxmin()) x1b =
gPad->GetUxmin();
2459 if (x1b >
gPad->GetUxmax()) x1b =
gPad->GetUxmax();
2460 if (y1b < gPad->GetUymin()) y1b =
gPad->GetUymin();
2461 if (y1b >
gPad->GetUymax()) y1b =
gPad->GetUymax();
2462 if (x2b < gPad->GetUxmin()) x2b =
gPad->GetUxmin();
2463 if (x2b >
gPad->GetUxmax()) x2b =
gPad->GetUxmax();
2464 if (y2b < gPad->GetUymin()) y2b =
gPad->GetUymin();
2465 if (y2b >
gPad->GetUymax()) y2b =
gPad->GetUymax();
2466 if (option5)
box.PaintBox(x1b, y1b, x2b, y2b,
"l");
2467 else box.PaintBox(x1b, y1b, x2b, y2b);
2475 yline[if1-1] =
gPad->YtoPad(theY[i] + theEYhigh[i]);
2476 yline[if2-1] =
gPad->YtoPad(theY[i] - theEYlow[i]);
2484 arrow.PaintArrow(xl1,
y,xl2,
y,asize,arrowOpt);
2486 if (!brackets)
gPad->PaintLine(xl1,
y,xl2,
y);
2489 xb[0] = xl2+tx; yb[0] =
y-ty;
2490 xb[1] = xl2; yb[1] =
y-ty;
2491 xb[2] = xl2; yb[2] =
y+ty;
2492 xb[3] = xl2+tx; yb[3] =
y+ty;
2493 gPad->PaintPolyLine(4, xb, yb);
2495 gPad->PaintLine(xl2,
y-ty,xl2,
y+ty);
2501 xr2 =
gPad->XtoPad(theX[i] + theEXhigh[i]);
2504 arrow.PaintArrow(xr1,
y,xr2,
y,asize,arrowOpt);
2506 if (!brackets)
gPad->PaintLine(xr1,
y,xr2,
y);
2509 xb[0] = xr2-tx; yb[0] =
y-ty;
2510 xb[1] = xr2; yb[1] =
y-ty;
2511 xb[2] = xr2; yb[2] =
y+ty;
2512 xb[3] = xr2-tx; yb[3] =
y+ty;
2513 gPad->PaintPolyLine(4, xb, yb);
2515 gPad->PaintLine(xr2,
y-ty,xr2,
y+ty);
2521 yup2 =
gPad->YtoPad(theY[i] + theEYhigh[i]);
2522 if (yup2 >
gPad->GetUymax()) yup2 =
gPad->GetUymax();
2525 arrow.PaintArrow(
x,yup1,
x,yup2,asize,arrowOpt);
2527 if (!brackets)
gPad->PaintLine(
x,yup1,
x,yup2);
2530 xb[0] =
x-tx; yb[0] = yup2-ty;
2531 xb[1] =
x-tx; yb[1] = yup2;
2532 xb[2] =
x+tx; yb[2] = yup2;
2533 xb[3] =
x+tx; yb[3] = yup2-ty;
2534 gPad->PaintPolyLine(4, xb, yb);
2536 gPad->PaintLine(
x-tx,yup2,
x+tx,yup2);
2542 ylow2 =
gPad->YtoPad(theY[i] - theEYlow[i]);
2543 if (ylow2 < gPad->GetUymin()) ylow2 =
gPad->GetUymin();
2544 if (ylow2 < ylow1) {
2546 arrow.PaintArrow(
x,ylow1,
x,ylow2,asize,arrowOpt);
2548 if (!brackets)
gPad->PaintLine(
x,ylow1,
x,ylow2);
2551 xb[0] =
x-tx; yb[0] = ylow2+ty;
2552 xb[1] =
x-tx; yb[1] = ylow2;
2553 xb[2] =
x+tx; yb[2] = ylow2;
2554 xb[3] =
x+tx; yb[3] = ylow2+ty;
2555 gPad->PaintPolyLine(4, xb, yb);
2557 gPad->PaintLine(
x-tx,ylow2,
x+tx,ylow2);
2571 if (option4)
PaintGraph(theGraph, 2*theNpoints, xline, yline,
"FC");
2572 else PaintGraph(theGraph, 2*theNpoints, xline, yline,
"F");
2573 gPad->SetLogx(logx);
2574 gPad->SetLogy(logy);
2593 const Int_t kBASEMARKER=8;
2594 Double_t s2x, s2y, symbolsize, sbase;
2595 Double_t x,
y, xl1, xl2, xr1, xr2, yup1, yup2, ylow1, ylow2, tx, ty;
2597 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};
2598 static Float_t cyy[15] = {1,1,1,1,1,1,1,1,1,0.5,0.6,1,1,1,1};
2611 if (strchr(option,
'X') || strchr(option,
'x')) {
PaintGraphSimple(theGraph, option);
return;}
2614 if (strstr(option,
"||") || strstr(option,
"[]")) {
2616 if (strstr(option,
"[]")) braticks =
kTRUE;
2619 if (strchr(option,
'z')) endLines =
kFALSE;
2620 if (strchr(option,
'Z')) endLines =
kFALSE;
2621 const char *arrowOpt = 0;
2622 if (strchr(option,
'>')) arrowOpt =
">";
2623 if (strstr(option,
"|>")) arrowOpt =
"|>";
2626 if (strchr(option,
'a')) axis =
kTRUE;
2627 if (strchr(option,
'A')) axis =
kTRUE;
2635 if (strchr(option,
'0')) option0 =
kTRUE;
2636 if (strchr(option,
'2')) option2 =
kTRUE;
2637 if (strchr(option,
'3')) option3 =
kTRUE;
2638 if (strchr(option,
'4')) {option3 =
kTRUE; option4 =
kTRUE;}
2639 if (strchr(option,
'5')) {option2 =
kTRUE; option5 =
kTRUE;}
2642 xline =
new Double_t[2*theNpoints];
2643 yline =
new Double_t[2*theNpoints];
2644 if (!xline || !yline) {
2645 Error(
"Paint",
"too many points, out of memory");
2652 theGraph->TAttLine::Modify();
2667 sbase = symbolsize*kBASEMARKER;
2680 tx =
gPad->PixeltoX(dxend) -
gPad->PixeltoX(0);
2681 ty =-
gPad->PixeltoY(dxend) +
gPad->PixeltoY(0);
2682 Float_t asize = 0.6*symbolsize*kBASEMARKER/
gPad->GetWh();
2685 for (
Int_t i=0;i<theNpoints;i++) {
2686 x =
gPad->XtoPad(theX[i]);
2687 y =
gPad->YtoPad(theY[i]);
2688 bxl =
gPad->YtoPad(theY[i]+theEXlowd[i]);
2689 bxh =
gPad->YtoPad(theY[i]+theEXhighd[i]);
2690 byl =
gPad->XtoPad(theX[i]+theEYlowd[i]);
2691 byh =
gPad->XtoPad(theX[i]+theEYhighd[i]);
2694 if (x < gPad->GetUxmin())
x =
gPad->GetUxmin();
2695 if (
x >
gPad->GetUxmax())
x =
gPad->GetUxmax();
2696 if (y < gPad->GetUymin())
y =
gPad->GetUymin();
2697 if (
y >
gPad->GetUymax())
y =
gPad->GetUymax();
2699 if (x < gPad->GetUxmin())
continue;
2700 if (
x >
gPad->GetUxmax())
continue;
2701 if (y < gPad->GetUymin())
continue;
2702 if (
y >
gPad->GetUymax())
continue;
2708 x1b =
gPad->XtoPad(theX[i] - theEXlow[i]);
2709 y1b =
gPad->YtoPad(theY[i] - theEYlow[i]);
2710 x2b =
gPad->XtoPad(theX[i] + theEXhigh[i]);
2711 y2b =
gPad->YtoPad(theY[i] + theEYhigh[i]);
2712 if (x1b < gPad->GetUxmin()) x1b =
gPad->GetUxmin();
2713 if (x1b >
gPad->GetUxmax()) x1b =
gPad->GetUxmax();
2714 if (y1b < gPad->GetUymin()) y1b =
gPad->GetUymin();
2715 if (y1b >
gPad->GetUymax()) y1b =
gPad->GetUymax();
2716 if (x2b < gPad->GetUxmin()) x2b =
gPad->GetUxmin();
2717 if (x2b >
gPad->GetUxmax()) x2b =
gPad->GetUxmax();
2718 if (y2b < gPad->GetUymin()) y2b =
gPad->GetUymin();
2719 if (y2b >
gPad->GetUymax()) y2b =
gPad->GetUymax();
2720 if (option5)
box.PaintBox(x1b, y1b, x2b, y2b,
"l");
2721 else box.PaintBox(x1b, y1b, x2b, y2b);
2729 yline[if1-1] =
gPad->YtoPad(theY[i] + theEYhigh[i]);
2730 yline[if2-1] =
gPad->YtoPad(theY[i] - theEYlow[i]);
2737 xl2 =
gPad->XtoPad(theX[i] - theEXlow[i]);
2740 arrow.PaintArrow(xl1,
y,xl2,bxl,asize,arrowOpt);
2742 if (!brackets)
gPad->PaintLine(xl1,
y,xl2,bxl);
2745 xb[0] = xl2+tx; yb[0] = bxl-ty;
2746 xb[1] = xl2; yb[1] = bxl-ty;
2747 xb[2] = xl2; yb[2] = bxl+ty;
2748 xb[3] = xl2+tx; yb[3] = bxl+ty;
2749 gPad->PaintPolyLine(4, xb, yb);
2751 gPad->PaintLine(xl2,bxl-ty,xl2,bxl+ty);
2757 xr2 =
gPad->XtoPad(theX[i] + theEXhigh[i]);
2760 arrow.PaintArrow(xr1,
y,xr2,bxh,asize,arrowOpt);
2762 if (!brackets)
gPad->PaintLine(xr1,
y,xr2,bxh);
2765 xb[0] = xr2-tx; yb[0] = bxh-ty;
2766 xb[1] = xr2; yb[1] = bxh-ty;
2767 xb[2] = xr2; yb[2] = bxh+ty;
2768 xb[3] = xr2-tx; yb[3] = bxh+ty;
2769 gPad->PaintPolyLine(4, xb, yb);
2771 gPad->PaintLine(xr2,bxh-ty,xr2,bxh+ty);
2777 yup2 =
gPad->YtoPad(theY[i] + theEYhigh[i]);
2778 if (yup2 >
gPad->GetUymax()) yup2 =
gPad->GetUymax();
2781 arrow.PaintArrow(
x,yup1,byh,yup2,asize,arrowOpt);
2783 if (!brackets)
gPad->PaintLine(
x,yup1,byh,yup2);
2786 xb[0] = byh-tx; yb[0] = yup2-ty;
2787 xb[1] = byh-tx; yb[1] = yup2;
2788 xb[2] = byh+tx; yb[2] = yup2;
2789 xb[3] = byh+tx; yb[3] = yup2-ty;
2790 gPad->PaintPolyLine(4, xb, yb);
2792 gPad->PaintLine(byh-tx,yup2,byh+tx,yup2);
2798 ylow2 =
gPad->YtoPad(theY[i] - theEYlow[i]);
2799 if (ylow2 < gPad->GetUymin()) ylow2 =
gPad->GetUymin();
2800 if (ylow2 < ylow1) {
2802 arrow.PaintArrow(
x,ylow1,byl,ylow2,asize,arrowOpt);
2804 if (!brackets)
gPad->PaintLine(
x,ylow1,byl,ylow2);
2807 xb[0] = byl-tx; yb[0] = ylow2+ty;
2808 xb[1] = byl-tx; yb[1] = ylow2;
2809 xb[2] = byl+tx; yb[2] = ylow2;
2810 xb[3] = byl+tx; yb[3] = ylow2+ty;
2811 gPad->PaintPolyLine(4, xb, yb);
2813 gPad->PaintLine(byl-tx,ylow2,byl+tx,ylow2);
2827 if (option4)
PaintGraph(theGraph, 2*theNpoints, xline, yline,
"FC");
2828 else PaintGraph(theGraph, 2*theNpoints, xline, yline,
"F");
2829 gPad->SetLogx(logx);
2830 gPad->SetLogy(logy);
2849 const Int_t kBASEMARKER=8;
2850 Double_t s2x, s2y, symbolsize, sbase;
2851 Double_t x,
y,
ex,
ey, xl1, xl2, xr1, xr2, yup1, yup2, ylow1, ylow2, tx, ty;
2852 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};
2853 static Float_t cyy[15] = {1,1,1,1,1,1,1,1,1,0.5,0.6,1,1,1,1};
2860 if (strchr(option,
'X') || strchr(option,
'x')) {
PaintGraphSimple(theGraph, option);
return;}
2863 if (strstr(option,
"||") || strstr(option,
"[]")) {
2865 if (strstr(option,
"[]")) braticks =
kTRUE;
2868 if (strchr(option,
'z')) endLines =
kFALSE;
2869 if (strchr(option,
'Z')) endLines =
kFALSE;
2870 const char *arrowOpt = 0;
2871 if (strchr(option,
'>')) arrowOpt =
">";
2872 if (strstr(option,
"|>")) arrowOpt =
"|>";
2875 if (strchr(option,
'a')) axis =
kTRUE;
2876 if (strchr(option,
'A')) axis =
kTRUE;
2884 if (strchr(option,
'0')) option0 =
kTRUE;
2885 if (strchr(option,
'2')) option2 =
kTRUE;
2886 if (strchr(option,
'3')) option3 =
kTRUE;
2887 if (strchr(option,
'4')) {option3 =
kTRUE; option4 =
kTRUE;}
2888 if (strchr(option,
'5')) {option2 =
kTRUE; option5 =
kTRUE;}
2891 xline =
new Double_t[2*theNpoints];
2892 yline =
new Double_t[2*theNpoints];
2893 if (!xline || !yline) {
2894 Error(
"Paint",
"too many points, out of memory");
2901 theGraph->TAttLine::Modify();
2916 sbase = symbolsize*kBASEMARKER;
2929 tx =
gPad->PixeltoX(dxend) -
gPad->PixeltoX(0);
2930 ty =-
gPad->PixeltoY(dxend) +
gPad->PixeltoY(0);
2931 Float_t asize = 0.6*symbolsize*kBASEMARKER/
gPad->GetWh();
2934 for (
Int_t i=0;i<theNpoints;i++) {
2935 x =
gPad->XtoPad(theX[i]);
2936 y =
gPad->YtoPad(theY[i]);
2939 if (x < gPad->GetUxmin())
x =
gPad->GetUxmin();
2940 if (
x >
gPad->GetUxmax())
x =
gPad->GetUxmax();
2941 if (y < gPad->GetUymin())
y =
gPad->GetUymin();
2942 if (
y >
gPad->GetUymax())
y =
gPad->GetUymax();
2944 if (x < gPad->GetUxmin())
continue;
2945 if (
x >
gPad->GetUxmax())
continue;
2946 if (y < gPad->GetUymin())
continue;
2947 if (
y >
gPad->GetUymax())
continue;
2955 x1b =
gPad->XtoPad(theX[i] -
ex);
2956 y1b =
gPad->YtoPad(theY[i] -
ey);
2957 x2b =
gPad->XtoPad(theX[i] +
ex);
2958 y2b =
gPad->YtoPad(theY[i] +
ey);
2959 if (x1b < gPad->GetUxmin()) x1b =
gPad->GetUxmin();
2960 if (x1b >
gPad->GetUxmax()) x1b =
gPad->GetUxmax();
2961 if (y1b < gPad->GetUymin()) y1b =
gPad->GetUymin();
2962 if (y1b >
gPad->GetUymax()) y1b =
gPad->GetUymax();
2963 if (x2b < gPad->GetUxmin()) x2b =
gPad->GetUxmin();
2964 if (x2b >
gPad->GetUxmax()) x2b =
gPad->GetUxmax();
2965 if (y2b < gPad->GetUymin()) y2b =
gPad->GetUymin();
2966 if (y2b >
gPad->GetUymax()) y2b =
gPad->GetUymax();
2967 if (option5)
box.PaintBox(x1b, y1b, x2b, y2b,
"l");
2968 else box.PaintBox(x1b, y1b, x2b, y2b);
2976 yline[if1-1] =
gPad->YtoPad(theY[i] +
ey);
2977 yline[if2-1] =
gPad->YtoPad(theY[i] -
ey);
2984 xl2 =
gPad->XtoPad(theX[i] -
ex);
2987 arrow.PaintArrow(xl1,
y,xl2,
y,asize,arrowOpt);
2989 if (!brackets)
gPad->PaintLine(xl1,
y,xl2,
y);
2992 xb[0] = xl2+tx; yb[0] =
y-ty;
2993 xb[1] = xl2; yb[1] =
y-ty;
2994 xb[2] = xl2; yb[2] =
y+ty;
2995 xb[3] = xl2+tx; yb[3] =
y+ty;
2996 gPad->PaintPolyLine(4, xb, yb);
2998 gPad->PaintLine(xl2,
y-ty,xl2,
y+ty);
3004 xr2 =
gPad->XtoPad(theX[i] +
ex);
3007 arrow.PaintArrow(xr1,
y,xr2,
y,asize,arrowOpt);
3009 if (!brackets)
gPad->PaintLine(xr1,
y,xr2,
y);
3012 xb[0] = xr2-tx; yb[0] =
y-ty;
3013 xb[1] = xr2; yb[1] =
y-ty;
3014 xb[2] = xr2; yb[2] =
y+ty;
3015 xb[3] = xr2-tx; yb[3] =
y+ty;
3016 gPad->PaintPolyLine(4, xb, yb);
3018 gPad->PaintLine(xr2,
y-ty,xr2,
y+ty);
3024 yup2 =
gPad->YtoPad(theY[i] +
ey);
3025 if (yup2 >
gPad->GetUymax()) yup2 =
gPad->GetUymax();
3028 arrow.PaintArrow(
x,yup1,
x,yup2,asize,arrowOpt);
3030 if (!brackets)
gPad->PaintLine(
x,yup1,
x,yup2);
3033 xb[0] =
x-tx; yb[0] = yup2-ty;
3034 xb[1] =
x-tx; yb[1] = yup2;
3035 xb[2] =
x+tx; yb[2] = yup2;
3036 xb[3] =
x+tx; yb[3] = yup2-ty;
3037 gPad->PaintPolyLine(4, xb, yb);
3039 gPad->PaintLine(
x-tx,yup2,
x+tx,yup2);
3045 ylow2 =
gPad->YtoPad(theY[i] -
ey);
3046 if (ylow2 < gPad->GetUymin()) ylow2 =
gPad->GetUymin();
3047 if (ylow2 < ylow1) {
3049 arrow.PaintArrow(
x,ylow1,
x,ylow2,asize,arrowOpt);
3051 if (!brackets)
gPad->PaintLine(
x,ylow1,
x,ylow2);
3054 xb[0] =
x-tx; yb[0] = ylow2+ty;
3055 xb[1] =
x-tx; yb[1] = ylow2;
3056 xb[2] =
x+tx; yb[2] = ylow2;
3057 xb[3] =
x+tx; yb[3] = ylow2+ty;
3058 gPad->PaintPolyLine(4, xb, yb);
3060 gPad->PaintLine(
x-tx,ylow2,
x+tx,ylow2);
3074 if (option4)
PaintGraph(theGraph, 2*theNpoints, xline, yline,
"FC");
3075 else PaintGraph(theGraph, 2*theNpoints, xline, yline,
"F");
3076 gPad->SetLogx(logx);
3077 gPad->SetLogy(logy);
3091 Double_t rwrmin, rwrmax, rwtmin, rwtmax;
3095 Int_t theNpoints = theGraphPolar->
GetN();
3101 if (theNpoints<1)
return;
3116 if (thePolargram)
if (!
gPad->FindObject(thePolargram->
GetName())) thePolargram=0;
3117 if (!thePolargram) {
3130 if (!thePolargram) {
3132 rwrmin = theY[0]; rwrmax = theY[theNpoints-1];
3133 rwtmin = theX[0]; rwtmax = theX[theNpoints-1];
3135 for (ipt = 0; ipt < theNpoints; ipt++) {
3138 if (theX[ipt] -theEX[ipt] < rwtmin) rwtmin = theX[ipt]-theEX[ipt];
3139 if (theX[ipt] +theEX[ipt] > rwtmax) rwtmax = theX[ipt]+theEX[ipt];
3141 if (theX[ipt] < rwtmin) rwtmin=theX[ipt];
3142 if (theX[ipt] > rwtmax) rwtmax=theX[ipt];
3145 if (theY[ipt] -theEY[ipt] < rwrmin) rwrmin = theY[ipt]-theEY[ipt];
3146 if (theY[ipt] +theEY[ipt] > rwrmax) rwrmax = theY[ipt]+theEY[ipt];
3148 if (theY[ipt] < rwrmin) rwrmin=theY[ipt];
3149 if (theY[ipt] > rwrmax) rwrmax=theY[ipt];
3153 if (rwrmin == rwrmax) rwrmax += 1.;
3154 if (rwtmin == rwtmax) rwtmax += 1.;
3161 rwtmax += dt/theNpoints;
3163 rwrmin = thePolargram->
GetRMin();
3164 rwrmax = thePolargram->
GetRMax();
3165 rwtmin = thePolargram->
GetTMin();
3166 rwtmax = thePolargram->
GetTMax();
3171 thePolargram =
new TGraphPolargram(
"Polargram",rwrmin,rwrmax,rwtmin,rwtmax);
3175 if (nolabel) thePolargram->
Draw(
"N");
3176 else thePolargram->
Draw(
"");
3185 Double_t radiusNDC = rwrmax-rwrmin;
3195 for (i=0; i<theNpoints; i++) {
3196 Double_t eymin, eymax, exmin,exmax;
3197 exmin = (theY[i]-theEY[i]-rwrmin)/radiusNDC*
3199 eymin = (theY[i]-theEY[i]-rwrmin)/radiusNDC*
3201 exmax = (theY[i]+theEY[i]-rwrmin)/radiusNDC*
3203 eymax = (theY[i]+theEY[i]-rwrmin)/radiusNDC*
3205 theGraphPolar->TAttLine::Modify();
3206 if (exmin != exmax || eymin != eymax)
gPad->PaintLine(exmin,eymin,exmax,eymax);
3210 for (i=0; i<theNpoints; i++) {
3214 theGraphPolar->TAttLine::Modify();
3215 if (phimin != phimax) thePolargram->
PaintCircle(0,0,
rad,phimin,phimax,0);
3221 if (!(
gPad->GetLogx()) && !(
gPad->GetLogy())) {
3222 Double_t a,
b,
c=1,
x1,
x2, y1, y2, discr, norm1, norm2, xts, yts;
3230 for (i=0; i<theNpoints; i++) {
3233 xt = (theY[i]-rwrmin)/radiusNDC*
TMath::Cos(
c*(theX[i]-rwtmin)/thetaNDC);
3234 yt = (theY[i]-rwrmin)/radiusNDC*
TMath::Sin(
c*(theX[i]-rwtmin)/thetaNDC);
3235 norm =
sqrt(xt*xt+yt*yt);
3240 if (!previouspointin) {
3245 a = (yt-yts)/(xt-xts);
3247 discr = 4*(
a*
a-
b*
b+1);
3252 norm1 =
sqrt((
x1-xt)*(
x1-xt)+(y1-yt)*(y1-yt));
3253 norm2 =
sqrt((
x2-xt)*(
x2-xt)+(y2-yt)*(y2-yt));
3254 previouspointin =
kFALSE;
3256 if (norm1 < norm2) {
3266 PaintGraph(theGraphPolar, j+1, theXpol, theYpol, opt);
3271 if (j>=1 && !previouspointin) {
3272 a = (yt-theYpol[j])/(xt-theXpol[j]);
3273 b = theYpol[j]-
a*theXpol[j];
3274 previouspointin =
kTRUE;
3275 discr = 4*(
a*
a-
b*
b+1);
3280 norm1 =
sqrt((
x1-xt)*(
x1-xt)+(y1-yt)*(y1-yt));
3281 norm2 =
sqrt((
x2-xt)*(
x2-xt)+(y2-yt)*(y2-yt));
3283 if (norm1 < norm2) {
3290 PaintGraph(theGraphPolar, j+1, theXpol, theYpol, opt);
3297 PaintGraph(theGraphPolar, j+1, theXpol, theYpol, opt);
3300 for (i=0; i<theNpoints; i++) {
3304 PaintGraph(theGraphPolar, theNpoints, theXpol, theYpol,opt);
3313 TIter next(
gPad->GetListOfPrimitives());
3314 while ((obj = next())) {
3318 if (strcmp(title->
GetName(),
"title")) {title = 0;
continue;}
3322 if (title)
delete title;
3328 if (ht <= 0) ht = 0.05;
3349 if (talh < 1) talh = 1;
else if (talh > 3) talh = 3;
3351 if (talv < 1) talv = 1;
else if (talv > 3) talv = 3;
3357 if (talh == 2) xpos = xpos-wt/2.;
3358 if (talh == 3) xpos = xpos-wt;
3359 if (talv == 2) ypos = ypos+ht/2.;
3360 if (talv == 1) ypos = ypos+ht;
3393 TF1 *theF = theGraphQQ->
GetF();
3396 Error(
"TGraphQQ::Paint",
"2nd dataset or theoretical function not specified");
3411 Double_t yxmin, xymin, yxmax, xymax;
3417 TLine line1, line2, line3;
3420 yxmin = (theYq2-theYq1)*(
xmin-theXq1)/(theXq2-theXq1) + theYq1;
3422 xymin = (theXq2-theXq1)*(
ymin-theYq1)/(theYq2-theYq1) + theXq1;
3428 line2.
PaintLine(xqmin, yqmin, xqmax, yqmax);
3430 yxmax = (theYq2-theYq1)*(
xmax-theXq1)/(theXq2-theXq1) + theYq1;
3432 xymax = (theXq2-theXq1)*(
ymax-theYq1)/(theYq2-theYq1) + theXq1;
3470 theHist->
Paint(
"0");
3483 std::vector<Double_t> newX(
N);
3484 std::vector<Double_t> newY(
N);
3496 if (
gPad->GetGridx()) {
3497 GL = (YA2-YA1)/(
gPad->GetY2() -
gPad->GetY1());
3513 theNewAxis->
Paint();
3516 for (
Int_t i=0; i<
N; i++) newX[i] = dX-X[i];
3518 for (
Int_t i=0; i<
N; i++) newX[i] = X[i];
3529 if (
gPad->GetGridy()) {
3530 GL = (XA2-XA1)/(
gPad->GetX2() -
gPad->GetX1());
3546 theNewAxis->
Paint();
3549 for (
Int_t i=0; i<
N; i++) newY[i] = dY-Y[i];
3551 for (
Int_t i=0; i<
N; i++) newY[i] = Y[i];
3556 for (
Int_t i=0; i<
N; i++) theNewGraph->
SetPoint(i, newX[i], newY[i]);
3579 if (strstr(option,
"H") || strstr(option,
"h")) {
3590 if (!functions)
return;
3626 Double_t x1,
x2, y1, y2,
x3, y3, xm, ym,
a, a1, a2, a3;
3629 Int_t ix1,iy1,ix2,iy2;
3633 gPad->GetPadPar(x1p,y1p,x2p,y2p);
3634 ix1 = (
Int_t)(iw*x1p);
3635 iy1 = (
Int_t)(ih*y1p);
3636 ix2 = (
Int_t)(iw*x2p);
3637 iy2 = (
Int_t)(ih*y2p);
3649 gPad->GetRange(rx1,ry1,rx2,ry2);
3650 Double_t rx = (x2ndc-x1ndc)/(rx2-rx1);
3651 Double_t ry = (y2ndc-y1ndc)/(ry2-ry1);
3655 xf[0] = rx*(
x[0]-rx1)+x1ndc;
3656 yf[0] = ry*(
y[0]-ry1)+y1ndc;
3658 for (i=1; i<
n; i++) {
3659 if (
x[i]==
x[i-1] &&
y[i]==
y[i-1])
continue;
3661 xf[nf] = rx*(
x[i]-rx1)+x1ndc;
3662 if (xf[i]==xf[i-1]) xf[i] += 0.000001;
3663 yf[nf] = ry*(
y[i]-ry1)+y1ndc;
3682 if (xf[nf]==xf[nf-1]) {
3687 if (xf[nf]>=xf[nf-1]) {
3696 for (i=1; i<nf; i++) {
3708 if (xi1<xi0) a1 = a1+3.14159;
3714 if (xi0<xi2) a2 = a2+3.14159;
3729 if ((xm-xi0)*(
x3-xi0)<0 && (ym-yi0)*(y3-yi0)<0) {
3733 if ((xm==
x1) && (ym==y1)) {
3742 if (xf[nf]==xf[0] && yf[nf]==yf[0]) {
3743 xm = (xt[nf]+xt[0])*0.5;
3744 ym = (yt[nf]+yt[0])*0.5;
3752 if ((xm-xf[0])*(
x3-xf[0])<0 && (ym-yf[0])*(y3-yf[0])<0) {
3766 for (i=nf2; i>0; i--) {
3767 for (j=i-1; j>0; j--) {
3768 if (xt[i-1]==xt[i] || xt[j-1]==xt[j])
continue;
3769 c1 = (yt[i-1]-yt[i])/(xt[i-1]-xt[i]);
3770 b1 = yt[i]-
c1*xt[i];
3771 c2 = (yt[j-1]-yt[j])/(xt[j-1]-xt[j]);
3772 b2 = yt[j]-
c2*xt[j];
3774 xc = (b2-b1)/(
c1-
c2);
3780 nf++; xf[nf] = xt[i]; yf[nf] = yt[i];
3781 nf++; xf[nf] = xc ; yf[nf] = yc;
3799 nf++; xf[nf] = xt[0]; yf[nf] = yt[0];
3802 for (i=0; i<nf+1; i++) {
3803 xf[i] = (1/rx)*(xf[i]-x1ndc)+rx1;
3804 yf[i] = (1/ry)*(yf[i]-y1ndc)+ry1;
3808 gPad->PaintFillArea(nf+1,xf,yf);
3809 theGraph->TAttLine::Modify();
3827 TIter next(functions);
3829 while ((obj = next())) {
3839 if (!dofit) fit = 0;
3841 if (dofit == 1) dofit = 111;
3843 Int_t print_fval = dofit%10;
3844 Int_t print_ferrors = (dofit/10)%10;
3845 Int_t print_fchi2 = (dofit/100)%10;
3846 Int_t print_fprob = (dofit/1000)%10;
3847 Int_t nlinesf = print_fval + print_fchi2 + print_fprob;
3848 if (fit) nlinesf += fit->
GetNpar();
3886 if (print_fchi2) stats->
AddText(t);
3892 if (print_fval || print_ferrors) {
3894 if (print_ferrors) {
3907 if (!done) functions->
Add(stats);
3937 Int_t i, k, kp,
km, npointsMax, banksize, n2, npt;
3938 Int_t maxiterations, finished;
3939 Int_t jtype, ktype, closed;
3940 Double_t sxmin, sxmax, symin, symax;
3943 Double_t ratio_signs, xratio, yratio;
3949 Double_t co, so, ct, st, ctu, stu, xnt;
3950 Double_t dx1, dy1, dx2, dy2, dk1, dk2;
3957 c = t = co = so = ct = st = ctu = stu = dx1 = dy1 = dx2 = dy2 = 0;
3958 xt = yt = xa = xb = ya = yb = u1 = u2 = u3 = tj = sb = 0;
3960 npointsMax = npoints*10;
3967 Error(
"Smooth",
"not enough space in memory");
3974 jtype = (drawtype%1000)-10;
3975 if (jtype > 0) { ktype = jtype; loptx =
kTRUE; }
3976 else ktype = drawtype%1000;
4005 for (i=1;i<npoints;i++) {
4007 if ((
x[i]-
x[i-1])*(
x[i-1]-
x[i-2]) < 0) six++;
4008 if ((
y[i]-
y[i-1])*(
y[i-1]-
y[i-2]) < 0) siy++;
4010 if (
x[i] < sxmin) sxmin =
x[i];
4011 if (
x[i] > sxmax) sxmax =
x[i];
4012 if (
y[i] < symin) symin =
y[i];
4013 if (
y[i] > symax) symax =
y[i];
4018 if (dx1n < 0.01*(sxmax-sxmin) && dy1n < 0.01*(symax-symin)) closed = 1;
4019 if (sxmin == sxmax) {
4022 if (six > 1) ratio_signs = siy/six;
4023 else ratio_signs = 20;
4024 xratio = ratio_signs/(sxmax-sxmin);
4026 if (symin == symax) yratio = 1;
4027 else yratio = 1/(symax-symin);
4031 for (i=0;i<npoints;i++) {
4032 x[i] = (
x[i]-sxmin)*xratio;
4033 y[i] = (
y[i]-symin)*yratio;
4052 if (
x[0] !=
x[npoints-1] ||
y[0] !=
y[npoints-1])
goto L40;
4053 if (
x[npoints-2] ==
x[npoints-1] &&
y[npoints-2] ==
y[npoints-1])
goto L40;
4054 if (
x[0] ==
x[1] &&
y[0] ==
y[1])
goto L40;
4077 if (npt > 1)
goto L310;
4081 if (
x[k-1] ==
x[k-2] &&
y[k-1] ==
y[k-2])
goto L50;
4086 if (npt > 1)
goto L310;
4089 if (k < npoints)
goto L90;
4090 if (!flgic) { kp = 2;
goto L130;}
4093 if (flgis)
goto L150;
4103 if (
x[k-1] ==
x[k] &&
y[k-1] ==
y[k])
goto L80;
4111 if (!flgis)
goto L50;
4126 dx1 =
x[k-1] -
x[
km-1];
4127 dy1 =
y[k-1] -
y[
km-1];
4128 dk1 = dx1*dx1 + dy1*dy1;
4129 dx2 =
x[kp-1] -
x[k-1];
4130 dy2 =
y[kp-1] -
y[k-1];
4131 dk2 = dx2*dx2 + dy2*dy2;
4132 ctu = dx1*dk2 + dx2*dk1;
4133 stu = dy1*dk2 + dy2*dk1;
4134 xnt = ctu*ctu + stu*stu;
4148 if (flgis)
goto L160;
4152 w3 = 2*(dx1*dy2-dx2*dy1);
4164 w3 = 2*(dx1*dy2-dx2*dy1);
4173 if (k <= 1)
goto L120;
4203 xa = (
a*t-2*dx)/tcube;
4204 xb = (3*dx-(co+
a)*t)/tsquare;
4205 ya = (
b*t-2*dy)/tcube;
4206 yb = (3*dy-(so+
b)*t)/tsquare;
4237 p2 = (u1*tj-u3)*3*tj+u2;
4267 z =
s*sth*(
s-
s*sth)*(w1*sth+w1+w2);
4268 z = z*z/((
a*
a+
b*
b)*(delta*delta));
4269 z = (z+2.642937)*z/((.3715652*z+3.063444)*z+.2441889)-cc;
4273 if (iw > 0)
goto L250;
4274 if (z > err)
goto L240;
4279 if (iw+2 == 0)
goto L190;
4280 if (iw+2 > 0)
goto L290;
4298 theGraph->
Zero(kp,0,sb,err,
s,z,maxiterations);
4299 if (kp == 2)
goto L210;
4301 Error(
"Smooth",
"Attempt to plot outside plot limits");
4304 if (iw > 0)
goto L200;
4330 qlx[npt] = sxmin + xt/xratio;
4331 qly[npt] = symin + yt/yratio;
4338 if (npt < banksize)
goto L320;
4339 if (drawtype >= 1000 || ktype > 1) {
4340 Int_t newsize = banksize + n2;
4342 for (i=0;i<banksize;i++) qtemp[i] = qlx[i];
4345 for (i=0;i<banksize;i++) qlx[i] = qtemp[i];
4346 for (i=0;i<banksize;i++) qtemp[i] = qly[i];
4349 for (i=0;i<banksize;i++) qly[i] = qtemp[i];
4358 if (drawtype >= 1000) {
4359 gPad->PaintFillArea(npt,qlx,qly,
"B");
4363 qlx[npt] = qlx[npt-1];
4364 qlx[npt+1] = qlx[0];
4370 qly[npt] = qly[npt-1];
4371 qly[npt+1] = qly[0];
4373 gPad->PaintFillArea(npt+2,qlx,qly);
4376 gPad->PaintPolyLine(npt,qlx,qly);
4379 qlx[0] = sxmin + xt/xratio;
4380 qly[0] = symin + yt/yratio;
4382 if (finished > 0)
goto L390;
4383 if (finished < 0) { finished = 0;
goto L110;}
4384 if (
s > 0)
goto L180;
4390 for (i=0;i<npoints;i++) {
4391 x[i] = sxmin +
x[i]/xratio;
4392 y[i] = symin +
y[i]/yratio;
static const double x2[5]
static const double x1[5]
static const double x3[11]
static TMarker * gHighlightMarker
static Int_t gHighlightPoint
static TGraph * gHighlightGraph
char * Form(const char *fmt,...)
R__EXTERN TStyle * gStyle
Draw all kinds of Arrows.
virtual Color_t GetLabelColor() const
virtual Color_t GetAxisColor() const
virtual Float_t GetLabelOffset() const
virtual void SetAxisColor(Color_t color=1, Float_t alpha=1.)
Set color of the line axis and tick marks.
virtual Style_t GetLabelFont() const
virtual void SetLabelOffset(Float_t offset=0.005)
Set distance between the axis and the labels The distance is expressed in per cent of the pad width.
virtual Float_t GetLabelSize() const
virtual Float_t GetTickLength() const
virtual void SetTickLength(Float_t length=0.03)
Set tick mark length The length is expressed in per cent of the pad width.
virtual Color_t GetFillColor() const
Return the fill area color.
virtual Style_t GetFillStyle() const
Return the fill area style.
virtual void SetFillColor(Color_t fcolor)
Set the fill area color.
virtual void SetFillStyle(Style_t fstyle)
Set the fill area style.
virtual Color_t GetLineColor() const
Return the line color.
virtual void SetLineStyle(Style_t lstyle)
Set the line style.
virtual Width_t GetLineWidth() const
Return the line width.
virtual void SetLineColor(Color_t lcolor)
Set the line color.
virtual Style_t GetLineStyle() const
Return the line style.
virtual Style_t GetMarkerStyle() const
Return the marker style.
virtual void SetMarkerColor(Color_t mcolor=1)
Set the marker color.
virtual Color_t GetMarkerColor() const
Return the marker color.
virtual Size_t GetMarkerSize() const
Return the marker size.
virtual void SetMarkerStyle(Style_t mstyle=1)
Set the marker style.
virtual void SetMarkerSize(Size_t msize=1)
Set the marker size.
virtual void SetTextAlign(Short_t align=11)
Set the text alignment.
virtual void SetTextColor(Color_t tcolor=1)
Set the text color.
virtual void SetTextFont(Font_t tfont=62)
Set the text font.
virtual void SetTextSize(Float_t tsize=1)
Set the text size.
virtual void SetLimits(Double_t xmin, Double_t xmax)
virtual Int_t GetNDF() const
Return the number of degrees of freedom in the fit the fNDF parameter has been previously computed du...
virtual Double_t GetParError(Int_t ipar) const
Return value of parameter number ipar.
Double_t GetChisquare() const
virtual Int_t GetNpar() const
virtual const char * GetParName(Int_t ipar) const
virtual Double_t GetParameter(Int_t ipar) const
virtual void Paint(Option_t *chopt="")
Draw this axis with its current attributes.
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 SetLabelFont(Int_t labelfont)
void SetLabelOffset(Float_t labeloffset)
void SetLabelColor(Int_t labelcolor)
void SetTickLength(Float_t ticklength)
void SetTickSize(Float_t ticksize)
void SetLabelSize(Float_t labelsize)
void PaintGraphPolar(TGraph *theGraph, Option_t *option)
[Paint this TGraphPolar with its current attributes.]($GP04)
virtual char * GetObjectInfoHelper(TGraph *theGraph, Int_t px, Int_t py) const
virtual ~TGraphPainter()
Destructor.
void PaintGraphErrors(TGraph *theGraph, Option_t *option)
[Paint this TGraphErrors with its current attributes.]($GP03)
void PaintGraphAsymmErrors(TGraph *theGraph, Option_t *option)
Paint this TGraphAsymmErrors with its current attributes.
virtual void PaintHighlightPoint(TGraph *theGraph, Option_t *option)
Paint highlight point as TMarker object (open circle)
void PaintGraphReverse(TGraph *theGraph, Option_t *option)
Paint theGraph reverting values along X and/or Y axis. a new graph is created.
virtual void PaintGrapHist(TGraph *theGraph, Int_t npoints, const Double_t *x, const Double_t *y, Option_t *chopt)
This is a service method used by THistPainter to paint 1D histograms.
virtual void SetHighlight(TGraph *theGraph)
Set highlight (enable/disable) mode for theGraph.
void PaintStats(TGraph *theGraph, TF1 *fit)
Paint the statistics box with the fit info.
void PaintHelper(TGraph *theGraph, Option_t *option)
Paint a any kind of TGraph.
static Int_t fgMaxPointsPerLine
virtual void PaintGraph(TGraph *theGraph, Int_t npoints, const Double_t *x, const Double_t *y, Option_t *chopt)
[Control function to draw a graph.]($GP01)
void PaintPolyLineHatches(TGraph *theGraph, Int_t n, const Double_t *x, const Double_t *y)
Paint a polyline with hatches on one side showing an exclusion zone.
virtual void DrawPanelHelper(TGraph *theGraph)
Display a panel with all histogram drawing options.
virtual void HighlightPoint(TGraph *theGraph, Int_t hpoint, Int_t distance)
Check on highlight point.
virtual Int_t DistancetoPrimitiveHelper(TGraph *theGraph, Int_t px, Int_t py)
Compute distance from point px,py to a graph.
void ComputeLogs(Int_t npoints, Int_t opt)
Compute the logarithm of global variables gxwork and gywork according to the value of Options and put...
virtual void ExecuteEventHelper(TGraph *theGraph, Int_t event, Int_t px, Int_t py)
Execute action corresponding to one event.
void Smooth(TGraph *theGraph, Int_t npoints, Double_t *x, Double_t *y, Int_t drawtype)
Smooth a curve given by N points.
virtual Int_t GetHighlightPoint(TGraph *theGraph) const
Return the highlighted point for theGraph.
void PaintGraphSimple(TGraph *theGraph, Option_t *option)
Paint a simple graph, without errors bars.
void PaintGraphQQ(TGraph *theGraph, Option_t *option)
Paint this graphQQ. No options for the time being.
static void SetMaxPointsPerLine(Int_t maxp=50)
Static function to set fgMaxPointsPerLine for graph painting.
void PaintGraphBentErrors(TGraph *theGraph, Option_t *option)
[Paint this TGraphBentErrors with its current attributes.]($GP03)
TGraphPainter()
Default constructor.
Double_t * GetYpol()
Return points in polar coordinates.
TGraphPolargram * GetPolargram()
void SetPolargram(TGraphPolargram *p)
void SetOptionAxis(Bool_t opt)
Double_t * GetXpol()
Return points in polar coordinates.
void PaintCircle(Double_t x, Double_t y, Double_t r, Double_t phimin, Double_t phimax, Double_t theta)
This is simplified from TEllipse::PaintEllipse.
void Draw(Option_t *options="")
Draw Polargram.
This class allows to draw quantile-quantile plots.
A Graph is a graphics object made of two arrays X and Y with npoints each.
virtual void SetPoint(Int_t i, Double_t x, Double_t y)
Set x and y values for point number i.
virtual Double_t * GetEXhighd() const
virtual Bool_t IsEditable() const
@ kClipFrame
clip to the frame boundary
Double_t GetMinimum() const
virtual Double_t * GetEYlow() const
virtual Double_t * GetEX() const
Double_t GetMaximum() const
virtual Double_t * GetEXlowd() const
virtual void ComputeRange(Double_t &xmin, Double_t &ymin, Double_t &xmax, Double_t &ymax) const
Compute the x/y range of the points in this graph.
virtual Double_t * GetEYlowd() const
void Zero(Int_t &k, Double_t AZ, Double_t BZ, Double_t E2, Double_t &X, Double_t &Y, Int_t maxiterations)
Find zero of a continuous function.
TList * GetListOfFunctions() const
virtual Bool_t IsHighlight() const
virtual Double_t * GetEYhighd() const
TAxis * GetXaxis() const
Get x axis of the graph.
virtual Double_t * GetEXhigh() const
virtual Double_t * GetEYhigh() const
TAxis * GetYaxis() const
Get y axis of the graph.
TH1F * GetHistogram() const
Returns a pointer to the histogram used to draw the axis Takes into account the two following cases.
virtual Double_t * GetEY() const
virtual void SetHistogram(TH1F *h)
virtual Double_t * GetEXlow() const
virtual Int_t GetPoint(Int_t i, Double_t &x, Double_t &y) const
Get x and y values for point number i.
1-D histogram with a float per channel (see TH1 documentation)}
virtual void SetDirectory(TDirectory *dir)
By default when an histogram is created, it is added to the list of histogram objects in the current ...
virtual Double_t GetMinimumStored() const
@ kNoTitle
don't draw the histogram title
@ kNoStats
don't draw stats box
TAxis * GetXaxis()
Get the behaviour adopted by the object about the statoverflows. See EStatOverflows for more informat...
virtual Double_t GetMaximum(Double_t maxval=FLT_MAX) const
Return maximum value smaller than maxval of bins in the range, unless the value has been overridden b...
virtual void SetMaximum(Double_t maximum=-1111)
virtual Int_t GetNdivisions(Option_t *axis="X") const
Return the number of divisions for "axis".
virtual void SetMinimum(Double_t minimum=-1111)
virtual Double_t GetMaximumStored() const
virtual void Paint(Option_t *option="")
Control routine to paint any kind of histograms.
virtual Double_t GetMinimum(Double_t minval=-FLT_MAX) const
Return minimum value larger than minval of bins in the range, unless the value has been overridden by...
virtual void Sumw2(Bool_t flag=kTRUE)
Create structure to store sum of squares of weights.
virtual Int_t DistancetoPrimitive(Int_t px, Int_t py)
Compute distance from point px,py to a line.
To draw Mathematical Formula.
virtual void PaintLine(Double_t x1, Double_t y1, Double_t x2, Double_t y2)
Draw this line with new coordinates.
TObject * Next()
Return next object in the list. Returns 0 when no more objects in list.
virtual void Add(TObject *obj)
virtual TObjLink * FirstLink() const
virtual TObject * First() const
Return the first object in the list. Returns 0 when list is empty.
virtual void SetX(Double_t x)
virtual void Paint(Option_t *option="")
Paint this marker with its current attributes.
virtual void SetY(Double_t y)
virtual void SetTitle(const char *title="")
Set the title of the TNamed.
virtual const char * GetTitle() const
Returns title of object.
virtual TObject * Clone(const char *newname="") const
Make a clone of an object using the Streamer facility.
virtual const char * GetName() const
Returns name of object.
TObject * GetObject() const
Option_t * GetOption() const
Mother of all ROOT objects.
virtual const char * GetName() const
Returns name of object.
R__ALWAYS_INLINE Bool_t TestBit(UInt_t f) const
virtual Option_t * GetDrawOption() const
Get option used by the graphics system to draw this object.
virtual void Delete(Option_t *option="")
Delete this object.
void SetBit(UInt_t f, Bool_t set)
Set or unset the user status bits as specified in f.
virtual Bool_t InheritsFrom(const char *classname) const
Returns kTRUE if object inherits from class "classname".
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
virtual const char * GetTitle() const
Returns title of object.
virtual void Paint(Option_t *option="")
This method must be overridden if a class wants to paint itself.
@ kCannotPick
if object in a pad cannot be picked
@ kCanDelete
if object in a list can be deleted
@ kMustCleanup
if object destructor must call RecursiveRemove()
The histogram statistics painter class.
virtual void SetStatFormat(const char *format="6.4g")
Change (i.e. set) the format for printing statistics.
void SetOptStat(Int_t stat=1)
Set the stat option.
virtual const char * GetFitFormat() const
void SetParent(TObject *obj)
virtual void SetFitFormat(const char *format="5.4g")
Change (i.e. set) the format for printing fit parameters in statistics box.
Int_t GetOptFit() const
Return the fit option.
virtual void Paint(Option_t *option="")
Paint the pave stat.
void SetOptFit(Int_t fit=1)
Set the fit option.
A Pave (see TPave) with text, lines or/and boxes inside.
virtual TText * AddText(Double_t x1, Double_t y1, const char *label)
Add a new Text line to this pavetext at given coordinates.
virtual void Draw(Option_t *option="")
Draw this pavetext with its current attributes.
virtual void Paint(Option_t *option="")
Paint this pavetext with its current attributes.
virtual TText * GetLine(Int_t number) const
Get Pointer to line number in this pavetext.
virtual void Clear(Option_t *option="")
Clear all lines in this pavetext.
virtual void SetName(const char *name="")
Option_t * GetName() const
Returns name of object.
virtual void SetBorderSize(Int_t bordersize=4)
Double_t GetX1NDC() const
virtual void SetX2NDC(Double_t x2)
void ToLower()
Change string to lower-case.
int CompareTo(const char *cs, ECaseCompare cmp=kExact) const
Compare a string to char *cs2.
const char * Data() const
TString & ReplaceAll(const TString &s1, const TString &s2)
void ToUpper()
Change string to upper case.
TString & Append(const char *cs)
Bool_t Contains(const char *pat, ECaseCompare cmp=kExact) const
Color_t GetLabelColor(Option_t *axis="X") const
Return the label color number in the axis.
Color_t GetStatTextColor() const
Float_t GetTitleX() const
Int_t GetOptTitle() const
Int_t GetNdivisions(Option_t *axis="X") const
Return number of divisions.
Float_t GetStatFontSize() const
Float_t GetBarOffset() const
Float_t GetLabelSize(Option_t *axis="X") const
Return label size.
Float_t GetTickLength(Option_t *axis="X") const
Return tick length.
Style_t GetLabelFont(Option_t *axis="X") const
Return label font.
Float_t GetTitleY() const
Style_t GetTitleFont(Option_t *axis="X") const
Return title font.
Color_t GetTitleFillColor() const
Style_t GetTitleStyle() const
Float_t GetLabelOffset(Option_t *axis="X") const
Return label offset.
Color_t GetStatColor() const
Float_t GetBarWidth() const
void SetDrawBorder(Int_t drawborder=1)
Width_t GetTitleBorderSize() const
Float_t GetEndErrorSize() const
Int_t GetDrawBorder() const
Width_t GetStatBorderSize() const
Color_t GetTitleTextColor() const
Float_t GetTitleH() const
Style_t GetStatStyle() const
const char * GetFitFormat() const
const char * GetStatFormat() const
Style_t GetStatFont() const
Float_t GetTitleFontSize() const
Color_t GetAxisColor(Option_t *axis="X") const
Return the axis color number in the axis.
Float_t GetTitleW() const
Base class for several text objects.
Abstract base class used by ROOT graphics editor.
static TVirtualPadEditor * GetPadEditor(Bool_t load=kTRUE)
Returns the pad editor dialog. Static method.
TVirtualPad is an abstract base class for the Pad and Canvas classes.
virtual TVirtualPad * cd(Int_t subpadnumber=0)=0
void box(Int_t pat, Double_t x1, Double_t y1, Double_t x2, Double_t y2)
double dist(Rotation3D const &r1, Rotation3D const &r2)
static constexpr double rad
static constexpr double s
static constexpr double km
Short_t Max(Short_t a, Short_t b)
Double_t Prob(Double_t chi2, Int_t ndf)
Computation of the probability for a certain Chi-squared (chi2) and number of degrees of freedom (ndf...
Bool_t IsInside(T xp, T yp, Int_t np, T *x, T *y)
Function which returns kTRUE if point xp,yp lies inside the polygon defined by the np points in array...
constexpr Double_t PiOver2()
Double_t Sqrt(Double_t x)
LongDouble_t Power(LongDouble_t x, LongDouble_t y)
Short_t Min(Short_t a, Short_t b)
Double_t Log10(Double_t x)