465 if (
gPad->GetLogx()) {
466 for (i=0;i<npoints;i++) {
471 if (!opt &&
gPad->GetLogy()) {
472 for (i=0;i<npoints;i++) {
497 const Int_t big = 9999;
498 const Int_t kMaxDiff = 10;
505 if (px <= puxmin)
return big;
506 if (py >= puymin)
return big;
507 if (px >= puxmax)
return big;
508 if (py <= puymax)
return big;
511 Int_t i, pxp, pyp, d;
518 theX = theGraphPolar->
GetXpol();
519 theY = theGraphPolar->
GetYpol();
521 theX = theGraph->
GetX();
522 theY = theGraph->
GetY();
525 for (i=0;i<theNpoints;i++) {
526 pxp =
gPad->XtoAbsPixel(
gPad->XtoPad(theX[i]));
527 pyp =
gPad->YtoAbsPixel(
gPad->YtoPad(theY[i]));
529 if (d < distance) distance = d;
531 if (distance < kMaxDiff)
return distance;
533 for (i=0;i<theNpoints-1;i++) {
536 if (d < distance) distance = d;
556 if (dist < kMaxDiff) {
557 gPad->SetSelected(f);
573 Error(
"DrawPanel",
"need to draw graph first");
578 gROOT->ProcessLine(
Form(
"((TCanvas*)0x%lx)->Selected((TVirtualPad*)0x%lx,(TObject*)0x%lx,1)",
601 const Int_t kMaxDiff = 10;
602 static Bool_t middle, badcase;
603 static Int_t ipoint, pxp, pyp;
604 static Int_t px1,px2,py1,py2;
605 static Int_t pxold, pyold, px1old, py1old, px2old, py2old;
606 static Int_t dpx, dpy;
614 if (!
gPad->IsEditable())
return;
624 theGraph->TAttLine::Modify();
625 px1 =
gPad->XtoAbsPixel(
gPad->GetX1());
626 py1 =
gPad->YtoAbsPixel(
gPad->GetY1());
627 px2 =
gPad->XtoAbsPixel(
gPad->GetX2());
628 py2 =
gPad->YtoAbsPixel(
gPad->GetY2());
633 x =
new Int_t[theNpoints+1];
634 y =
new Int_t[theNpoints+1];
635 for (i=0;i<theNpoints;i++) {
636 pxp =
gPad->XtoAbsPixel(
gPad->XtoPad(theX[i]));
637 pyp =
gPad->YtoAbsPixel(
gPad->YtoPad(theY[i]));
638 if (pxp < -kMaxPixel || pxp >=
kMaxPixel ||
644 gVirtualX->DrawLine(pxp-4, pyp-4, pxp+4, pyp-4);
645 gVirtualX->DrawLine(pxp+4, pyp-4, pxp+4, pyp+4);
646 gVirtualX->DrawLine(pxp+4, pyp+4, pxp-4, pyp+4);
647 gVirtualX->DrawLine(pxp-4, pyp+4, pxp-4, pyp-4);
652 if (d < kMaxDiff) ipoint =i;
658 if (ipoint < 0)
return;
662 px2old =
gPad->XtoAbsPixel(theX[1]);
663 py2old =
gPad->YtoAbsPixel(theY[1]);
664 }
else if (ipoint == theNpoints-1) {
665 px1old =
gPad->XtoAbsPixel(
gPad->XtoPad(theX[theNpoints-2]));
666 py1old =
gPad->YtoAbsPixel(
gPad->YtoPad(theY[theNpoints-2]));
670 px1old =
gPad->XtoAbsPixel(
gPad->XtoPad(theX[ipoint-1]));
671 py1old =
gPad->YtoAbsPixel(
gPad->YtoPad(theY[ipoint-1]));
672 px2old =
gPad->XtoAbsPixel(
gPad->XtoPad(theX[ipoint+1]));
673 py2old =
gPad->YtoAbsPixel(
gPad->YtoPad(theY[ipoint+1]));
675 pxold =
gPad->XtoAbsPixel(
gPad->XtoPad(theX[ipoint]));
676 pyold =
gPad->YtoAbsPixel(
gPad->YtoPad(theY[ipoint]));
684 for (i=0;i<theNpoints;i++) {
685 pxp =
gPad->XtoAbsPixel(
gPad->XtoPad(theX[i]));
686 pyp =
gPad->YtoAbsPixel(
gPad->YtoPad(theY[i]));
688 if (d < kMaxDiff) middle =
kFALSE;
700 for(i=0;i<theNpoints-1;i++) {
701 gVirtualX->DrawLine(x[i]+dpx,
y[i]+dpy, x[i+1]+dpx,
y[i+1]+dpy);
704 if (pxp < -kMaxPixel || pxp >=
kMaxPixel ||
705 pyp < -kMaxPixel || pyp >=
kMaxPixel)
continue;
706 gVirtualX->DrawLine(pxp-4, pyp-4, pxp+4, pyp-4);
707 gVirtualX->DrawLine(pxp+4, pyp-4, pxp+4, pyp+4);
708 gVirtualX->DrawLine(pxp+4, pyp+4, pxp-4, pyp+4);
709 gVirtualX->DrawLine(pxp-4, pyp+4, pxp-4, pyp-4);
711 pxp = x[theNpoints-1]+dpx;
712 pyp =
y[theNpoints-1]+dpy;
713 gVirtualX->DrawLine(pxp-4, pyp-4, pxp+4, pyp-4);
714 gVirtualX->DrawLine(pxp+4, pyp-4, pxp+4, pyp+4);
715 gVirtualX->DrawLine(pxp+4, pyp+4, pxp-4, pyp+4);
716 gVirtualX->DrawLine(pxp-4, pyp+4, pxp-4, pyp-4);
721 for(i=0;i<theNpoints-1;i++) {
722 gVirtualX->DrawLine(x[i]+dpx,
y[i]+dpy, x[i+1]+dpx,
y[i+1]+dpy);
725 if (pxp < -kMaxPixel || pxp >=
kMaxPixel ||
726 pyp < -kMaxPixel || pyp >=
kMaxPixel)
continue;
727 gVirtualX->DrawLine(pxp-4, pyp-4, pxp+4, pyp-4);
728 gVirtualX->DrawLine(pxp+4, pyp-4, pxp+4, pyp+4);
729 gVirtualX->DrawLine(pxp+4, pyp+4, pxp-4, pyp+4);
730 gVirtualX->DrawLine(pxp-4, pyp+4, pxp-4, pyp-4);
732 pxp = x[theNpoints-1]+dpx;
733 pyp =
y[theNpoints-1]+dpy;
734 gVirtualX->DrawLine(pxp-4, pyp-4, pxp+4, pyp-4);
735 gVirtualX->DrawLine(pxp+4, pyp-4, pxp+4, pyp+4);
736 gVirtualX->DrawLine(pxp+4, pyp+4, pxp-4, pyp+4);
737 gVirtualX->DrawLine(pxp-4, pyp+4, pxp-4, pyp-4);
739 if (px1old)
gVirtualX->DrawLine(px1old, py1old, pxold, pyold);
740 if (px2old)
gVirtualX->DrawLine(pxold, pyold, px2old, py2old);
741 gVirtualX->DrawLine(pxold-4, pyold-4, pxold+4, pyold-4);
742 gVirtualX->DrawLine(pxold+4, pyold-4, pxold+4, pyold+4);
743 gVirtualX->DrawLine(pxold+4, pyold+4, pxold-4, pyold+4);
744 gVirtualX->DrawLine(pxold-4, pyold+4, pxold-4, pyold-4);
751 if (px1old)
gVirtualX->DrawLine(px1old, py1old, pxold, pyold);
752 if (px2old)
gVirtualX->DrawLine(pxold, pyold, px2old, py2old);
753 gVirtualX->DrawLine(pxold-4, pyold-4, pxold+4, pyold-4);
754 gVirtualX->DrawLine(pxold+4, pyold-4, pxold+4, pyold+4);
755 gVirtualX->DrawLine(pxold+4, pyold+4, pxold-4, pyold+4);
756 gVirtualX->DrawLine(pxold-4, pyold+4, pxold-4, pyold-4);
759 xmin =
gPad->GetUxmin();
760 xmax =
gPad->GetUxmax();
761 ymin =
gPad->GetUymin();
762 ymax =
gPad->GetUymax();
765 dxr = dx/(1 -
gPad->GetLeftMargin() -
gPad->GetRightMargin());
766 dyr = dy/(1 -
gPad->GetBottomMargin() -
gPad->GetTopMargin());
771 gPad->Range(xmin - dxr*
gPad->GetLeftMargin(),
772 ymin - dyr*
gPad->GetBottomMargin(),
773 xmax + dxr*
gPad->GetRightMargin(),
774 ymax + dyr*
gPad->GetTopMargin());
775 gPad->RangeAxis(xmin, ymin, xmax, ymax);
782 for(i=0;i<theNpoints;i++) {
783 if (badcase)
continue;
784 if (x) theX[i] =
gPad->PadtoX(
gPad->AbsPixeltoX(x[i]+dpx));
785 if (
y) theY[i] =
gPad->PadtoY(
gPad->AbsPixeltoY(
y[i]+dpy));
794 theX[ipoint] =
gPad->PadtoX(
gPad->AbsPixeltoX(pxold));
795 theY[ipoint] =
gPad->PadtoY(
gPad->AbsPixeltoY(pyold));
799 theX[theNpoints-1] = theX[0];
800 theY[theNpoints-1] = theY[0];
802 if (ipoint == theNpoints-1) {
803 theX[0] = theX[theNpoints-1];
804 theY[0] = theY[theNpoints-1];
816 if (
gROOT->IsEscaped()) {
824 xmin =
gPad->GetUxmin();
825 xmax =
gPad->GetUxmax();
826 ymin =
gPad->GetUymin();
827 ymax =
gPad->GetUymax();
830 dxr = dx/(1 -
gPad->GetLeftMargin() -
gPad->GetRightMargin());
831 dyr = dy/(1 -
gPad->GetBottomMargin() -
gPad->GetTopMargin());
836 gPad->Range(xmin - dxr*
gPad->GetLeftMargin(),
837 ymin - dyr*
gPad->GetBottomMargin(),
838 xmax + dxr*
gPad->GetRightMargin(),
839 ymax + dyr*
gPad->GetTopMargin());
840 gPad->RangeAxis(xmin, ymin, xmax, ymax);
843 for(i=0;i<theNpoints;i++) {
844 if (badcase)
continue;
845 if (x) theX[i] =
gPad->PadtoX(
gPad->AbsPixeltoX(x[i]+dpx));
846 if (
y) theY[i] =
gPad->PadtoY(
gPad->AbsPixeltoY(
y[i]+dpy));
849 theX[ipoint] =
gPad->PadtoX(
gPad->AbsPixeltoX(pxold));
850 theY[ipoint] =
gPad->PadtoY(
gPad->AbsPixeltoY(pyold));
854 theX[theNpoints-1] = theX[0];
855 theY[theNpoints-1] = theY[0];
857 if (ipoint == theNpoints-1) {
858 theX[0] = theX[theNpoints-1];
859 theY[0] = theY[theNpoints-1];
914 gPad->PushSelectableObject(theGraph);
916 Int_t optionLine , optionAxis , optionCurve, optionStar , optionMark;
917 Int_t optionBar , optionR , optionOne , optionE;
918 Int_t optionFill , optionZ , optionCurveFill;
922 Double_t barxmin, barxmax, barymin, barymax;
929 Error(
"PaintGraph",
"illegal number of points (%d)", npoints);
936 if (opt.
Contains(
"L")) optionLine = 1;
else optionLine = 0;
937 if (opt.
Contains(
"A")) optionAxis = 1;
else optionAxis = 0;
938 if (opt.
Contains(
"C")) optionCurve= 1;
else optionCurve= 0;
939 if (opt.
Contains(
"*")) optionStar = 1;
else optionStar = 0;
940 if (opt.
Contains(
"P")) optionMark = 1;
else optionMark = 0;
941 if (opt.
Contains(
"B")) optionBar = 1;
else optionBar = 0;
942 if (opt.
Contains(
"R")) optionR = 1;
else optionR = 0;
943 if (opt.
Contains(
"1")) optionOne = 1;
else optionOne = 0;
944 if (opt.
Contains(
"F")) optionFill = 1;
else optionFill = 0;
950 if (optionLine+optionFill+optionCurve+optionStar+optionMark+optionBar+optionE == 0) {
951 if (!chopt[0]) optionLine=1;
958 if (optionCurve && optionFill) {
964 Double_t rwxmin,rwxmax, rwymin, rwymax, maximum, minimum, dx, dy;
967 rwxmin =
gPad->GetUxmin();
968 rwxmax =
gPad->GetUxmax();
969 rwymin =
gPad->GetUymin();
970 rwymax =
gPad->GetUymax();
973 if (minimum == -1111) {
977 if (maximum == -1111) {
981 uxmin =
gPad->PadtoX(rwxmin);
982 uxmax =
gPad->PadtoX(rwxmax);
987 if (rwxmin == rwxmax) rwxmax += 1.;
988 if (rwymin == rwymax) rwymax += 1.;
989 dx = 0.1*(rwxmax-rwxmin);
990 dy = 0.1*(rwymax-rwymin);
993 minimum = rwymin - dy;
994 maximum = rwymax + dy;
998 if (uxmin < 0 && rwxmin >= 0) uxmin = 0.9*rwxmin;
999 if (uxmax > 0 && rwxmax <= 0) {
1000 if (
gPad->GetLogx()) uxmax = 1.1*rwxmax;
1003 if (minimum < 0 && rwymin >= 0) minimum = 0.9*rwymin;
1004 if (maximum > 0 && rwymax <= 0) {
1008 if (minimum <= 0 && gPad->GetLogy()) minimum = 0.001*maximum;
1009 if (uxmin <= 0 && gPad->GetLogx()) {
1010 if (uxmax > 1000) uxmin = 1;
1011 else uxmin = 0.001*uxmax;
1018 char chopth[8] =
" ";
1019 if (strstr(chopt,
"x+")) strncat(chopth,
"x+",2);
1020 if (strstr(chopt,
"y+")) strncat(chopth,
"y+",2);
1027 if (theNpoints > npt) npt = theNpoints;
1038 if (
gPad->GetLogy()) {
1068 rwxmin =
gPad->GetUxmin();
1069 rwxmax =
gPad->GetUxmax();
1070 rwymin =
gPad->GetUymin();
1071 rwymax =
gPad->GetUymax();
1072 uxmin =
gPad->PadtoX(rwxmin);
1073 uxmax =
gPad->PadtoX(rwxmax);
1078 maximum =
gPad->PadtoY(rwymax);
1079 minimum =
gPad->PadtoY(rwymin);
1083 theGraph->TAttLine::Modify();
1084 theGraph->TAttFill::Modify();
1085 theGraph->TAttMarker::Modify();
1093 if (optionLine || optionFill) {
1099 if (optionFill && (xn != x1 || yn != y1)) nloop++;
1101 for (i=1;i<=nloop;i++) {
1142 if (optionCurveFill) {
1144 if (xn != x1 || yn != y1) nloop++;
1148 for (i=1;i<=nloop;i++) {
1173 for (i=1;i<=nloop;i++) {
1177 if (y[i-1] < minimum || y[i-1] > maximum)
continue;
1178 if (x[i-1] < uxmin || x[i-1] > uxmax)
continue;
1204 for (i=1;i<=npoints;i++) {
1219 for (i=1;i<=npoints;i++) {
1236 for (i=1;i<npoints;i++) {
1237 if (x[i] < barxmin) barxmin = x[i];
1238 if (x[i] > barxmax) barxmax = x[i];
1240 bdelta = (barxmax-barxmin)/
Double_t(npoints);
1244 for (i=1;i<npoints;i++) {
1245 if (y[i] < barymin) barymin = y[i];
1246 if (y[i] > barymax) barymax = y[i];
1248 bdelta = (barymax-barymin)/
Double_t(npoints);
1252 for (i=1;i<=npoints;i++) {
1253 xlow = x[i-1] - dbar;
1254 xhigh = x[i-1] + dbar;
1256 if (xlow < uxmin) xlow = uxmin;
1257 if (xhigh > uxmax) xhigh = uxmax;
1259 else ylow =
gPad->GetUymin();
1273 for (i=1;i<=npoints;i++) {
1275 ylow = y[i-1] - dbar;
1276 yhigh = y[i-1] + dbar;
1329 const char *where =
"PaintGraphHist";
1331 Int_t optionLine , optionAxis , optionCurve, optionStar, optionMark;
1332 Int_t optionBar , optionRot , optionOne , optionOff ;
1333 Int_t optionFill , optionZ;
1334 Int_t optionHist , optionBins , optionMarker;
1336 Int_t drawtype=0, drawborder, drawbordersav;
1342 Double_t xi, xi1, xj, xj1, yi1, yi, yj, yj1, xwmin, ywmin;
1346 char choptaxis[10] =
" ";
1349 Error(where,
"illegal number of points (%d)", npoints);
1354 if (opt.
Contains(
"H")) optionHist = 1;
else optionHist = 0;
1355 if (opt.
Contains(
"F")) optionFill = 1;
else optionFill = 0;
1356 if (opt.
Contains(
"C")) optionCurve= 1;
else optionCurve= 0;
1357 if (opt.
Contains(
"*")) optionStar = 1;
else optionStar = 0;
1358 if (opt.
Contains(
"R")) optionRot = 1;
else optionRot = 0;
1359 if (opt.
Contains(
"1")) optionOne = 1;
else optionOne = 0;
1360 if (opt.
Contains(
"B")) optionBar = 1;
else optionBar = 0;
1361 if (opt.
Contains(
"N")) optionBins = 1;
else optionBins = 0;
1362 if (opt.
Contains(
"L")) optionLine = 1;
else optionLine = 0;
1363 if (opt.
Contains(
"P")) optionMark = 1;
else optionMark = 0;
1364 if (opt.
Contains(
"A")) optionAxis = 1;
else optionAxis = 0;
1365 if (opt.
Contains(
"][")) optionOff = 1;
else optionOff = 0;
1366 if (opt.
Contains(
"P0")) optionMark = 10;
1368 Int_t optionFill2 = 0;
1370 optionFill = 0; optionFill2 = 1;
1385 nbins = last - first + 1;
1397 Double_t rounding = (uxmax-uxmin)*1.e-5;
1400 Int_t nx1, nx2, ndivx, ndivy, ndiv;
1413 if (ndivx < 0) strlcat(choptaxis,
"N",10);
1414 if (
gPad->GetGridx()) {
1416 strlcat(choptaxis,
"W",10);
1418 if (
gPad->GetLogx()) {
1422 strlcat(choptaxis,
"G",10);
1432 axis->
PaintAxis(rwxmin,rwymin,rwxmax,rwymin,rwmin,rwmax,ndiv,choptaxis);
1442 strlcat(choptaxis,
"N",10);
1445 if (
gPad->GetGridy()) {
1447 strlcat(choptaxis,
"W",10);
1449 if (
gPad->GetLogy()) {
1453 strlcat(choptaxis,
"G",10);
1462 axis->
PaintAxis(rwxmin,rwymin,rwxmin,rwymax,rwmin,rwmax,ndiv,choptaxis);
1468 theGraph->TAttLine::Modify();
1469 theGraph->TAttFill::Modify();
1470 theGraph->TAttMarker::Modify();
1474 if (!optionRot) {wmin = x[0]; wmax = x[1];}
1475 else {wmin = y[0]; wmax = y[1];}
1477 if (!optionBins) delta = (wmax - wmin)/
Double_t(nbins);
1479 Int_t fwidth =
gPad->GetFrameLineWidth();
1482 if (optionOff) fwidth = 1;
1498 if (optionFill && !optionCurve) {
1506 for (j=first; j<=last;j++) {
1509 gxwork[npt] = wmin+((j-first+1)*delta);
1513 xj1 = x[j]; xj = x[j-1];
1515 if (j != last)
Error(where,
"X must be in increasing order");
1516 else Error(where,
"X must have N+1 values with option N");
1521 gywork[npt-1] = y[j-1];
1522 gywork[npt] = y[j-1];
1523 if (gywork[npt] < vymin) {gywork[npt] = vymin; gywork[npt-1] = vymin;}
1524 if ((
gxwork[npt-1] >= uxmin-rounding &&
gxwork[npt-1] <= uxmax+rounding) ||
1525 (
gxwork[npt] >= uxmin-rounding &&
gxwork[npt] <= uxmax+rounding)) npt += 2;
1528 gywork[npt-1] = gywork[0];
1532 if (gywork[0] < vymin) {gywork[0] = vymin; gywork[npt-1] = vymin;}
1538 if (!fillarea)
gyworkl[0] = ylast;
1549 for (j=first; j<=last;j++) {
1552 gywork[npt] = wmin+((j-first+1)*delta);
1554 yj1 = y[j]; yj = y[j-1];
1556 if (j != last)
Error(where,
"Y must be in increasing order");
1557 else Error(where,
"Y must have N+1 values with option N");
1562 gxwork[npt-1] = x[j-1]; gxwork[npt] = x[j-1];
1563 if ((gxwork[npt-1] >= uxmin-rounding && gxwork[npt-1] <= uxmax+rounding) ||
1564 (gxwork[npt] >= uxmin-rounding && gxwork[npt] <= uxmax+rounding)) npt += 2;
1567 gxwork[npt-1] = gxwork[0];
1571 if (!fillarea)
gyworkl[0] = ylast;
1578 theGraph->TAttLine::Modify();
1579 theGraph->TAttFill::Modify();
1584 if ((optionHist) || !chopt[0]) {
1590 for (i=first; i<=last;i++) {
1593 gxwork[npt] = wmin+((i-first+1)*delta);
1595 xi1 = x[i]; xi = x[i-1];
1597 if (i != last)
Error(where,
"X must be in increasing order");
1598 else Error(where,
"X must have N+1 values with option N");
1606 if ((
gxwork[npt-1] >= uxmin-rounding &&
gxwork[npt-1] <= uxmax+rounding) ||
1607 (
gxwork[npt] >= uxmin-rounding &&
gxwork[npt] <= uxmax+rounding)) npt += 2;
1619 Int_t nbpoints = npt-2;
1625 for (ip=point1; ip<=nbpoints; ip++) {
1632 Int_t point2 = nbpoints;
1633 for (ip=point2; ip>=point1; ip--) {
1639 nbpoints = point2-point1+1;
1643 if (
gxwork[0] >
gPad->GetUxmin()) { nbpoints++; point1 = 0; }
1644 if (
gxwork[nbpoints] <
gPad->GetUxmax()) nbpoints++;
1656 for (i=first; i<=last;i++) {
1659 gywork[npt] = wmin+((i-first+1)*delta);
1661 yi1 = y[i]; yi = y[i-1];
1663 if (i != last)
Error(where,
"Y must be in increasing order");
1664 else Error(where,
"Y must have N+1 values with option N");
1670 if ((
gxwork[npt-1] >= uxmin-rounding &&
gxwork[npt-1] <= uxmax+rounding) ||
1671 (
gxwork[npt] >= uxmin-rounding &&
gxwork[npt] <= uxmax+rounding)) npt += 2;
1690 if (!optionOne) drawtype = 2;
1695 for (i=first; i<=last;i++) {
1698 gxwork[npt-1] = wmin+(i-first)*delta+0.5*delta;
1700 xi1 = x[i]; xi = x[i-1];
1702 if (i != last)
Error(where,
"X must be in increasing order");
1703 else Error(where,
"X must have N+1 values with option N");
1706 gxwork[npt-1] = x[i-1] + 0.5*(x[i]-x[i-1]);
1737 drawtype = drawtype+10;
1739 for (i=first; i<=last;i++) {
1742 gywork[npt-1] = wmin+(i-first)*delta+0.5*delta;
1744 yi1 = y[i]; yi = y[i-1];
1746 if (i != last)
Error(where,
"Y must be in increasing order");
1747 else Error(where,
"Y must have N+1 values with option N");
1750 gywork[npt-1] = y[i-1] + 0.5*(y[i]-y[i-1]);
1782 if ((optionStar) || (optionMark))optionMarker=1;
1783 if ((optionMarker) || (optionLine)) {
1784 wminstep = wmin + 0.5*delta;
1786 gPad->GetRangeAxis(ax1,ay1,ax2,ay2);
1790 for (i=first; i<=last;i++) {
1793 gxwork[npt-1] = wmin+(i-first)*delta+0.5*delta;
1795 xi1 = x[i]; xi = x[i-1];
1797 if (i != last)
Error(where,
"X must be in increasing order");
1798 else Error(where,
"X must have N+1 values with option N");
1801 gxwork[npt-1] = x[i-1] + 0.5*(x[i]-x[i-1]);
1803 if (
gxwork[npt-1] < uxmin ||
gxwork[npt-1] > uxmax) { npt--;
continue;}
1804 if ((optionMark != 10) && (optionLine == 0)) {
1805 if (y[i-1] <= rwymin) {npt--;
continue;}
1809 if ((
gywork[npt-1] < rwymin) || ((
gywork[npt-1] > rwymax) && !optionFill2)) {
1847 if (optionMarker && npt > 0) {
1851 if (optionLine && npt > 1) {
1862 for (i=first; i<=last;i++) {
1865 gywork[npt-1] = wminstep+(i-first)*delta+0.5*delta;
1867 yi1 = y[i]; yi = y[i-1];
1869 if (i != last)
Error(where,
"Y must be in increasing order");
1870 else Error(where,
"Y must have N+1 values with option N");
1873 gywork[npt-1] = y[i-1] + 0.5*(y[i]-y[i-1]);
1876 if ((
gxwork[npt-1] < uxmin) || (
gxwork[npt-1] > uxmax)) {
1906 if (optionMarker && npt > 0) {
1910 if (optionLine != 0 && npt > 1) {
1921 offset = delta*baroffset; dbar = delta*barwidth;
1924 offset = (x[1]-x[0])*baroffset;
1925 dbar = (x[1]-x[0])*barwidth;
1927 offset = (y[1]-y[0])*baroffset;
1928 dbar = (y[1]-y[0])*barwidth;
1931 drawbordersav = drawborder;
1935 xhigh = wmin+offset+dbar;
1938 else ylow =
gPad->GetUymin();
1940 for (i=first; i<=last;i++) {
1947 if (xlow < rwxmax && xhigh > rwxmin)
1951 xhigh = xhigh+delta;
1954 xi1 = x[i]; xi = x[i-1];
1956 Error(where,
"X must be in increasing order");
1959 offset = (x[i+1]-x[i])*baroffset;
1960 dbar = (x[i+1]-x[i])*barwidth;
1961 xlow = x[i] + offset;
1962 xhigh = x[i] + offset + dbar;
1967 ylow = wmin + offset;
1968 yhigh = wmin + offset + dbar;
1970 else xlow =
gPad->GetUxmin();
1971 for (i=first; i<=last;i++) {
1979 gPad->PaintBox(xlow,ylow,xhigh,yhigh);
1981 ylow = ylow + delta;
1982 yhigh = yhigh + delta;
1985 yi1 = y[i]; yi = y[i-1];
1987 Error(where,
"Y must be in increasing order");
1990 offset = (y[i+1]-y[i])*baroffset;
1991 dbar = (y[i+1]-y[i])*barwidth;
1992 ylow = y[i] + offset;
1993 yhigh = y[i] + offset + dbar;
2021 const Int_t kBASEMARKER=8;
2022 Double_t s2x, s2y, symbolsize, sbase;
2023 Double_t x,
y, xl1, xl2, xr1, xr2, yup1, yup2, ylow1, ylow2, tx, ty;
2024 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};
2025 static Float_t cyy[15] = {1,1,1,1,1,1,1,1,1,0.5,0.6,1,1,1,1};
2034 if (strchr(option,
'X') || strchr(option,
'x')) {
PaintGraphSimple(theGraph, option);
return;}
2037 if (strstr(option,
"||") || strstr(option,
"[]")) {
2039 if (strstr(option,
"[]")) braticks =
kTRUE;
2042 if (strchr(option,
'z')) endLines =
kFALSE;
2043 if (strchr(option,
'Z')) endLines =
kFALSE;
2044 const char *arrowOpt = 0;
2045 if (strchr(option,
'>')) arrowOpt =
">";
2046 if (strstr(option,
"|>")) arrowOpt =
"|>";
2049 if (strchr(option,
'a')) axis =
kTRUE;
2050 if (strchr(option,
'A')) axis =
kTRUE;
2058 if (strchr(option,
'0')) option0 =
kTRUE;
2059 if (strchr(option,
'2')) option2 =
kTRUE;
2060 if (strchr(option,
'3')) option3 =
kTRUE;
2061 if (strchr(option,
'4')) {option3 =
kTRUE; option4 =
kTRUE;}
2062 if (strchr(option,
'5')) {option2 =
kTRUE; option5 =
kTRUE;}
2065 xline =
new Double_t[2*theNpoints];
2066 yline =
new Double_t[2*theNpoints];
2067 if (!xline || !yline) {
2068 Error(
"Paint",
"too many points, out of memory");
2075 theGraph->TAttLine::Modify();
2090 sbase = symbolsize*kBASEMARKER;
2094 if (mark >= 20 && mark <= 34) {
2103 tx =
gPad->PixeltoX(dxend) -
gPad->PixeltoX(0);
2104 ty =-
gPad->PixeltoY(dxend) +
gPad->PixeltoY(0);
2105 Float_t asize = 0.6*symbolsize*kBASEMARKER/
gPad->GetWh();
2108 for (
Int_t i=0;i<theNpoints;i++) {
2109 x =
gPad->XtoPad(theX[i]);
2110 y =
gPad->YtoPad(theY[i]);
2113 if (x < gPad->GetUxmin()) x =
gPad->GetUxmin();
2114 if (x >
gPad->GetUxmax()) x =
gPad->GetUxmax();
2115 if (y < gPad->GetUymin()) y =
gPad->GetUymin();
2116 if (y >
gPad->GetUymax()) y =
gPad->GetUymax();
2118 if (x < gPad->GetUxmin())
continue;
2119 if (x >
gPad->GetUxmax())
continue;
2120 if (y < gPad->GetUymin())
continue;
2121 if (y >
gPad->GetUymax())
continue;
2125 xl2 =
gPad->XtoPad(theX[i] - theEXlow[i]);
2129 x1b =
gPad->XtoPad(theX[i] - theEXlow[i]);
2130 y1b =
gPad->YtoPad(theY[i] - theEYlow[i]);
2131 x2b =
gPad->XtoPad(theX[i] + theEXhigh[i]);
2132 y2b =
gPad->YtoPad(theY[i] + theEYhigh[i]);
2133 if (x1b < gPad->GetUxmin()) x1b =
gPad->GetUxmin();
2134 if (x1b >
gPad->GetUxmax()) x1b =
gPad->GetUxmax();
2135 if (y1b < gPad->GetUymin()) y1b =
gPad->GetUymin();
2136 if (y1b >
gPad->GetUymax()) y1b =
gPad->GetUymax();
2137 if (x2b < gPad->GetUxmin()) x2b =
gPad->GetUxmin();
2138 if (x2b >
gPad->GetUxmax()) x2b =
gPad->GetUxmax();
2139 if (y2b < gPad->GetUymin()) y2b =
gPad->GetUymin();
2140 if (y2b >
gPad->GetUymax()) y2b =
gPad->GetUymax();
2141 if (option5) box.
PaintBox(x1b, y1b, x2b, y2b,
"l");
2142 else box.
PaintBox(x1b, y1b, x2b, y2b);
2150 yline[if1-1] =
gPad->YtoPad(theY[i] + theEYhigh[i]);
2151 yline[if2-1] =
gPad->YtoPad(theY[i] - theEYlow[i]);
2159 arrow.
PaintArrow(xl1,y,xl2,y,asize,arrowOpt);
2161 if (!brackets)
gPad->PaintLine(xl1,y,xl2,y);
2164 xb[0] = xl2+tx; yb[0] = y-ty;
2165 xb[1] = xl2; yb[1] = y-ty;
2166 xb[2] = xl2; yb[2] = y+ty;
2167 xb[3] = xl2+tx; yb[3] = y+ty;
2168 gPad->PaintPolyLine(4, xb, yb);
2170 gPad->PaintLine(xl2,y-ty,xl2,y+ty);
2176 xr2 =
gPad->XtoPad(theX[i] + theEXhigh[i]);
2179 arrow.
PaintArrow(xr1,y,xr2,y,asize,arrowOpt);
2181 if (!brackets)
gPad->PaintLine(xr1,y,xr2,y);
2184 xb[0] = xr2-tx; yb[0] = y-ty;
2185 xb[1] = xr2; yb[1] = y-ty;
2186 xb[2] = xr2; yb[2] = y+ty;
2187 xb[3] = xr2-tx; yb[3] = y+ty;
2188 gPad->PaintPolyLine(4, xb, yb);
2190 gPad->PaintLine(xr2,y-ty,xr2,y+ty);
2196 yup2 =
gPad->YtoPad(theY[i] + theEYhigh[i]);
2197 if (yup2 >
gPad->GetUymax()) yup2 =
gPad->GetUymax();
2200 arrow.
PaintArrow(x,yup1,x,yup2,asize,arrowOpt);
2202 if (!brackets)
gPad->PaintLine(x,yup1,x,yup2);
2205 xb[0] = x-tx; yb[0] = yup2-ty;
2206 xb[1] = x-tx; yb[1] = yup2;
2207 xb[2] = x+tx; yb[2] = yup2;
2208 xb[3] = x+tx; yb[3] = yup2-ty;
2209 gPad->PaintPolyLine(4, xb, yb);
2211 gPad->PaintLine(x-tx,yup2,x+tx,yup2);
2217 ylow2 =
gPad->YtoPad(theY[i] - theEYlow[i]);
2218 if (ylow2 < gPad->GetUymin()) ylow2 =
gPad->GetUymin();
2219 if (ylow2 < ylow1) {
2221 arrow.
PaintArrow(x,ylow1,x,ylow2,asize,arrowOpt);
2223 if (!brackets)
gPad->PaintLine(x,ylow1,x,ylow2);
2226 xb[0] = x-tx; yb[0] = ylow2+ty;
2227 xb[1] = x-tx; yb[1] = ylow2;
2228 xb[2] = x+tx; yb[2] = ylow2;
2229 xb[3] = x+tx; yb[3] = ylow2+ty;
2230 gPad->PaintPolyLine(4, xb, yb);
2232 gPad->PaintLine(x-tx,ylow2,x+tx,ylow2);
2246 if (option4)
PaintGraph(theGraph, 2*theNpoints, xline, yline,
"FC");
2247 else PaintGraph(theGraph, 2*theNpoints, xline, yline,
"F");
2248 gPad->SetLogx(logx);
2249 gPad->SetLogy(logy);
2268 const Int_t kBASEMARKER=8;
2269 Double_t s2x, s2y, symbolsize, sbase;
2270 Double_t x,
y, xl1, xl2, xr1, xr2, yup1, yup2, ylow1, ylow2, tx, ty;
2272 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};
2273 static Float_t cyy[15] = {1,1,1,1,1,1,1,1,1,0.5,0.6,1,1,1,1};
2286 if (strchr(option,
'X') || strchr(option,
'x')) {
PaintGraphSimple(theGraph, option);
return;}
2289 if (strstr(option,
"||") || strstr(option,
"[]")) {
2291 if (strstr(option,
"[]")) braticks =
kTRUE;
2294 if (strchr(option,
'z')) endLines =
kFALSE;
2295 if (strchr(option,
'Z')) endLines =
kFALSE;
2296 const char *arrowOpt = 0;
2297 if (strchr(option,
'>')) arrowOpt =
">";
2298 if (strstr(option,
"|>")) arrowOpt =
"|>";
2301 if (strchr(option,
'a')) axis =
kTRUE;
2302 if (strchr(option,
'A')) axis =
kTRUE;
2310 if (strchr(option,
'0')) option0 =
kTRUE;
2311 if (strchr(option,
'2')) option2 =
kTRUE;
2312 if (strchr(option,
'3')) option3 =
kTRUE;
2313 if (strchr(option,
'4')) {option3 =
kTRUE; option4 =
kTRUE;}
2314 if (strchr(option,
'5')) {option2 =
kTRUE; option5 =
kTRUE;}
2317 xline =
new Double_t[2*theNpoints];
2318 yline =
new Double_t[2*theNpoints];
2319 if (!xline || !yline) {
2320 Error(
"Paint",
"too many points, out of memory");
2327 theGraph->TAttLine::Modify();
2342 sbase = symbolsize*kBASEMARKER;
2346 if (mark >= 20 && mark <= 34) {
2355 tx =
gPad->PixeltoX(dxend) -
gPad->PixeltoX(0);
2356 ty =-
gPad->PixeltoY(dxend) +
gPad->PixeltoY(0);
2357 Float_t asize = 0.6*symbolsize*kBASEMARKER/
gPad->GetWh();
2360 for (
Int_t i=0;i<theNpoints;i++) {
2361 x =
gPad->XtoPad(theX[i]);
2362 y =
gPad->YtoPad(theY[i]);
2363 bxl =
gPad->YtoPad(theY[i]+theEXlowd[i]);
2364 bxh =
gPad->YtoPad(theY[i]+theEXhighd[i]);
2365 byl =
gPad->XtoPad(theX[i]+theEYlowd[i]);
2366 byh =
gPad->XtoPad(theX[i]+theEYhighd[i]);
2369 if (x < gPad->GetUxmin()) x =
gPad->GetUxmin();
2370 if (x >
gPad->GetUxmax()) x =
gPad->GetUxmax();
2371 if (y < gPad->GetUymin()) y =
gPad->GetUymin();
2372 if (y >
gPad->GetUymax()) y =
gPad->GetUymax();
2374 if (x < gPad->GetUxmin())
continue;
2375 if (x >
gPad->GetUxmax())
continue;
2376 if (y < gPad->GetUymin())
continue;
2377 if (y >
gPad->GetUymax())
continue;
2383 x1b =
gPad->XtoPad(theX[i] - theEXlow[i]);
2384 y1b =
gPad->YtoPad(theY[i] - theEYlow[i]);
2385 x2b =
gPad->XtoPad(theX[i] + theEXhigh[i]);
2386 y2b =
gPad->YtoPad(theY[i] + theEYhigh[i]);
2387 if (x1b < gPad->GetUxmin()) x1b =
gPad->GetUxmin();
2388 if (x1b >
gPad->GetUxmax()) x1b =
gPad->GetUxmax();
2389 if (y1b < gPad->GetUymin()) y1b =
gPad->GetUymin();
2390 if (y1b >
gPad->GetUymax()) y1b =
gPad->GetUymax();
2391 if (x2b < gPad->GetUxmin()) x2b =
gPad->GetUxmin();
2392 if (x2b >
gPad->GetUxmax()) x2b =
gPad->GetUxmax();
2393 if (y2b < gPad->GetUymin()) y2b =
gPad->GetUymin();
2394 if (y2b >
gPad->GetUymax()) y2b =
gPad->GetUymax();
2395 if (option5) box.
PaintBox(x1b, y1b, x2b, y2b,
"l");
2396 else box.
PaintBox(x1b, y1b, x2b, y2b);
2404 yline[if1-1] =
gPad->YtoPad(theY[i] + theEYhigh[i]);
2405 yline[if2-1] =
gPad->YtoPad(theY[i] - theEYlow[i]);
2412 xl2 =
gPad->XtoPad(theX[i] - theEXlow[i]);
2415 arrow.
PaintArrow(xl1,y,xl2,bxl,asize,arrowOpt);
2417 if (!brackets)
gPad->PaintLine(xl1,y,xl2,bxl);
2420 xb[0] = xl2+tx; yb[0] = bxl-ty;
2421 xb[1] = xl2; yb[1] = bxl-ty;
2422 xb[2] = xl2; yb[2] = bxl+ty;
2423 xb[3] = xl2+tx; yb[3] = bxl+ty;
2424 gPad->PaintPolyLine(4, xb, yb);
2426 gPad->PaintLine(xl2,bxl-ty,xl2,bxl+ty);
2432 xr2 =
gPad->XtoPad(theX[i] + theEXhigh[i]);
2435 arrow.
PaintArrow(xr1,y,xr2,bxh,asize,arrowOpt);
2437 if (!brackets)
gPad->PaintLine(xr1,y,xr2,bxh);
2440 xb[0] = xr2-tx; yb[0] = bxh-ty;
2441 xb[1] = xr2; yb[1] = bxh-ty;
2442 xb[2] = xr2; yb[2] = bxh+ty;
2443 xb[3] = xr2-tx; yb[3] = bxh+ty;
2444 gPad->PaintPolyLine(4, xb, yb);
2446 gPad->PaintLine(xr2,bxh-ty,xr2,bxh+ty);
2452 yup2 =
gPad->YtoPad(theY[i] + theEYhigh[i]);
2453 if (yup2 >
gPad->GetUymax()) yup2 =
gPad->GetUymax();
2456 arrow.
PaintArrow(x,yup1,byh,yup2,asize,arrowOpt);
2458 if (!brackets)
gPad->PaintLine(x,yup1,byh,yup2);
2461 xb[0] = byh-tx; yb[0] = yup2-ty;
2462 xb[1] = byh-tx; yb[1] = yup2;
2463 xb[2] = byh+tx; yb[2] = yup2;
2464 xb[3] = byh+tx; yb[3] = yup2-ty;
2465 gPad->PaintPolyLine(4, xb, yb);
2467 gPad->PaintLine(byh-tx,yup2,byh+tx,yup2);
2473 ylow2 =
gPad->YtoPad(theY[i] - theEYlow[i]);
2474 if (ylow2 < gPad->GetUymin()) ylow2 =
gPad->GetUymin();
2475 if (ylow2 < ylow1) {
2477 arrow.
PaintArrow(x,ylow1,byl,ylow2,asize,arrowOpt);
2479 if (!brackets)
gPad->PaintLine(x,ylow1,byl,ylow2);
2482 xb[0] = byl-tx; yb[0] = ylow2+ty;
2483 xb[1] = byl-tx; yb[1] = ylow2;
2484 xb[2] = byl+tx; yb[2] = ylow2;
2485 xb[3] = byl+tx; yb[3] = ylow2+ty;
2486 gPad->PaintPolyLine(4, xb, yb);
2488 gPad->PaintLine(byl-tx,ylow2,byl+tx,ylow2);
2502 if (option4)
PaintGraph(theGraph, 2*theNpoints, xline, yline,
"FC");
2503 else PaintGraph(theGraph, 2*theNpoints, xline, yline,
"F");
2504 gPad->SetLogx(logx);
2505 gPad->SetLogy(logy);
2524 const Int_t kBASEMARKER=8;
2525 Double_t s2x, s2y, symbolsize, sbase;
2526 Double_t x,
y,
ex,
ey, xl1, xl2, xr1, xr2, yup1, yup2, ylow1, ylow2, tx, ty;
2527 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};
2528 static Float_t cyy[15] = {1,1,1,1,1,1,1,1,1,0.5,0.6,1,1,1,1};
2535 if (strchr(option,
'X') || strchr(option,
'x')) {
PaintGraphSimple(theGraph, option);
return;}
2538 if (strstr(option,
"||") || strstr(option,
"[]")) {
2540 if (strstr(option,
"[]")) braticks =
kTRUE;
2543 if (strchr(option,
'z')) endLines =
kFALSE;
2544 if (strchr(option,
'Z')) endLines =
kFALSE;
2545 const char *arrowOpt = 0;
2546 if (strchr(option,
'>')) arrowOpt =
">";
2547 if (strstr(option,
"|>")) arrowOpt =
"|>";
2550 if (strchr(option,
'a')) axis =
kTRUE;
2551 if (strchr(option,
'A')) axis =
kTRUE;
2559 if (strchr(option,
'0')) option0 =
kTRUE;
2560 if (strchr(option,
'2')) option2 =
kTRUE;
2561 if (strchr(option,
'3')) option3 =
kTRUE;
2562 if (strchr(option,
'4')) {option3 =
kTRUE; option4 =
kTRUE;}
2563 if (strchr(option,
'5')) {option2 =
kTRUE; option5 =
kTRUE;}
2566 xline =
new Double_t[2*theNpoints];
2567 yline =
new Double_t[2*theNpoints];
2568 if (!xline || !yline) {
2569 Error(
"Paint",
"too many points, out of memory");
2576 theGraph->TAttLine::Modify();
2591 sbase = symbolsize*kBASEMARKER;
2595 if (mark >= 20 && mark <= 34) {
2604 tx =
gPad->PixeltoX(dxend) -
gPad->PixeltoX(0);
2605 ty =-
gPad->PixeltoY(dxend) +
gPad->PixeltoY(0);
2606 Float_t asize = 0.6*symbolsize*kBASEMARKER/
gPad->GetWh();
2609 for (
Int_t i=0;i<theNpoints;i++) {
2610 x =
gPad->XtoPad(theX[i]);
2611 y =
gPad->YtoPad(theY[i]);
2614 if (x < gPad->GetUxmin()) x =
gPad->GetUxmin();
2615 if (x >
gPad->GetUxmax()) x =
gPad->GetUxmax();
2616 if (y < gPad->GetUymin()) y =
gPad->GetUymin();
2617 if (y >
gPad->GetUymax()) y =
gPad->GetUymax();
2619 if (x < gPad->GetUxmin())
continue;
2620 if (x >
gPad->GetUxmax())
continue;
2621 if (y < gPad->GetUymin())
continue;
2622 if (y >
gPad->GetUymax())
continue;
2630 x1b =
gPad->XtoPad(theX[i] - ex);
2631 y1b =
gPad->YtoPad(theY[i] - ey);
2632 x2b =
gPad->XtoPad(theX[i] + ex);
2633 y2b =
gPad->YtoPad(theY[i] + ey);
2634 if (x1b < gPad->GetUxmin()) x1b =
gPad->GetUxmin();
2635 if (x1b >
gPad->GetUxmax()) x1b =
gPad->GetUxmax();
2636 if (y1b < gPad->GetUymin()) y1b =
gPad->GetUymin();
2637 if (y1b >
gPad->GetUymax()) y1b =
gPad->GetUymax();
2638 if (x2b < gPad->GetUxmin()) x2b =
gPad->GetUxmin();
2639 if (x2b >
gPad->GetUxmax()) x2b =
gPad->GetUxmax();
2640 if (y2b < gPad->GetUymin()) y2b =
gPad->GetUymin();
2641 if (y2b >
gPad->GetUymax()) y2b =
gPad->GetUymax();
2642 if (option5) box.
PaintBox(x1b, y1b, x2b, y2b,
"l");
2643 else box.
PaintBox(x1b, y1b, x2b, y2b);
2651 yline[if1-1] =
gPad->YtoPad(theY[i] + ey);
2652 yline[if2-1] =
gPad->YtoPad(theY[i] - ey);
2659 xl2 =
gPad->XtoPad(theX[i] - ex);
2662 arrow.
PaintArrow(xl1,y,xl2,y,asize,arrowOpt);
2664 if (!brackets)
gPad->PaintLine(xl1,y,xl2,y);
2667 xb[0] = xl2+tx; yb[0] = y-ty;
2668 xb[1] = xl2; yb[1] = y-ty;
2669 xb[2] = xl2; yb[2] = y+ty;
2670 xb[3] = xl2+tx; yb[3] = y+ty;
2671 gPad->PaintPolyLine(4, xb, yb);
2673 gPad->PaintLine(xl2,y-ty,xl2,y+ty);
2679 xr2 =
gPad->XtoPad(theX[i] + ex);
2682 arrow.
PaintArrow(xr1,y,xr2,y,asize,arrowOpt);
2684 if (!brackets)
gPad->PaintLine(xr1,y,xr2,y);
2687 xb[0] = xr2-tx; yb[0] = y-ty;
2688 xb[1] = xr2; yb[1] = y-ty;
2689 xb[2] = xr2; yb[2] = y+ty;
2690 xb[3] = xr2-tx; yb[3] = y+ty;
2691 gPad->PaintPolyLine(4, xb, yb);
2693 gPad->PaintLine(xr2,y-ty,xr2,y+ty);
2699 yup2 =
gPad->YtoPad(theY[i] + ey);
2700 if (yup2 >
gPad->GetUymax()) yup2 =
gPad->GetUymax();
2703 arrow.
PaintArrow(x,yup1,x,yup2,asize,arrowOpt);
2705 if (!brackets)
gPad->PaintLine(x,yup1,x,yup2);
2708 xb[0] = x-tx; yb[0] = yup2-ty;
2709 xb[1] = x-tx; yb[1] = yup2;
2710 xb[2] = x+tx; yb[2] = yup2;
2711 xb[3] = x+tx; yb[3] = yup2-ty;
2712 gPad->PaintPolyLine(4, xb, yb);
2714 gPad->PaintLine(x-tx,yup2,x+tx,yup2);
2720 ylow2 =
gPad->YtoPad(theY[i] - ey);
2721 if (ylow2 < gPad->GetUymin()) ylow2 =
gPad->GetUymin();
2722 if (ylow2 < ylow1) {
2724 arrow.
PaintArrow(x,ylow1,x,ylow2,asize,arrowOpt);
2726 if (!brackets)
gPad->PaintLine(x,ylow1,x,ylow2);
2729 xb[0] = x-tx; yb[0] = ylow2+ty;
2730 xb[1] = x-tx; yb[1] = ylow2;
2731 xb[2] = x+tx; yb[2] = ylow2;
2732 xb[3] = x+tx; yb[3] = ylow2+ty;
2733 gPad->PaintPolyLine(4, xb, yb);
2735 gPad->PaintLine(x-tx,ylow2,x+tx,ylow2);
2749 if (option4)
PaintGraph(theGraph, 2*theNpoints, xline, yline,
"FC");
2750 else PaintGraph(theGraph, 2*theNpoints, xline, yline,
"F");
2751 gPad->SetLogx(logx);
2752 gPad->SetLogy(logy);
2766 Double_t rwrmin, rwrmax, rwtmin, rwtmax;
2770 Int_t theNpoints = theGraphPolar->
GetN();
2776 if (theNpoints<1)
return;
2791 if (thePolargram)
if (!
gPad->FindObject(thePolargram->
GetName())) thePolargram=0;
2792 if (!thePolargram) {
2795 while (
TObject* AnyObj = padObjIter.Next()) {
2805 if (!thePolargram) {
2807 rwrmin = theY[0]; rwrmax = theY[theNpoints-1];
2808 rwtmin = theX[0]; rwtmax = theX[theNpoints-1];
2810 for (ipt = 0; ipt < theNpoints; ipt++) {
2813 if (theX[ipt] -theEX[ipt] < rwtmin) rwtmin = theX[ipt]-theEX[ipt];
2814 if (theX[ipt] +theEX[ipt] > rwtmax) rwtmax = theX[ipt]+theEX[ipt];
2816 if (theX[ipt] < rwtmin) rwtmin=theX[ipt];
2817 if (theX[ipt] > rwtmax) rwtmax=theX[ipt];
2820 if (theY[ipt] -theEY[ipt] < rwrmin) rwrmin = theY[ipt]-theEY[ipt];
2821 if (theY[ipt] +theEY[ipt] > rwrmax) rwrmax = theY[ipt]+theEY[ipt];
2823 if (theY[ipt] < rwrmin) rwrmin=theY[ipt];
2824 if (theY[ipt] > rwrmax) rwrmax=theY[ipt];
2828 if (rwrmin == rwrmax) rwrmax += 1.;
2829 if (rwtmin == rwtmax) rwtmax += 1.;
2836 rwtmax += dt/theNpoints;
2838 rwrmin = thePolargram->
GetRMin();
2839 rwrmax = thePolargram->
GetRMax();
2840 rwtmin = thePolargram->
GetTMin();
2841 rwtmax = thePolargram->
GetTMax();
2846 thePolargram =
new TGraphPolargram(
"Polargram",rwrmin,rwrmax,rwtmin,rwtmax);
2850 if (nolabel) thePolargram->
Draw(
"N");
2851 else thePolargram->
Draw(
"");
2860 Double_t radiusNDC = rwrmax-rwrmin;
2867 for (i=0; i<theNpoints; i++) {
2868 Double_t eymin, eymax, exmin,exmax;
2869 exmin = (theY[i]-theEY[i]-rwrmin)/radiusNDC*
2871 eymin = (theY[i]-theEY[i]-rwrmin)/radiusNDC*
2873 exmax = (theY[i]+theEY[i]-rwrmin)/radiusNDC*
2875 eymax = (theY[i]+theEY[i]-rwrmin)/radiusNDC*
2877 theGraphPolar->TAttLine::Modify();
2878 if (exmin != exmax || eymin != eymax)
gPad->PaintLine(exmin,eymin,exmax,eymax);
2882 for (i=0; i<theNpoints; i++) {
2883 Double_t rad = (theY[i]-rwrmin)/radiusNDC;
2886 theGraphPolar->TAttLine::Modify();
2887 if (phimin != phimax) thePolargram->
PaintCircle(0,0,rad,phimin,phimax,0);
2893 if (!(
gPad->GetLogx()) && !(
gPad->GetLogy())) {
2894 Double_t a, b,
c=1,
x1,
x2, y1, y2, discr, norm1, norm2, xts, yts;
2900 for (i=0; i<theNpoints; i++) {
2901 if (thePolargram->
IsRadian()) {c=1;}
2906 xt = (theY[i]-rwrmin)/radiusNDC*
TMath::Cos(c*(theX[i]-rwtmin)/thetaNDC);
2907 yt = (theY[i]-rwrmin)/radiusNDC*
TMath::Sin(c*(theX[i]-rwtmin)/thetaNDC);
2908 norm =
sqrt(xt*xt+yt*yt);
2913 if (!previouspointin) {
2918 a = (yt-yts)/(xt-xts);
2920 discr = 4*(a*a-b*b+1);
2921 x1 = (-2*a*b+
sqrt(discr))/(2*(a*a+1));
2922 x2 = (-2*a*b-
sqrt(discr))/(2*(a*a+1));
2925 norm1 =
sqrt((
x1-xt)*(
x1-xt)+(y1-yt)*(y1-yt));
2926 norm2 =
sqrt((x2-xt)*(x2-xt)+(y2-yt)*(y2-yt));
2927 previouspointin =
kFALSE;
2929 if (norm1 < norm2) {
2939 PaintGraph(theGraphPolar, j+1, theXpol, theYpol, opt);
2944 if (j>=1 && !previouspointin) {
2945 a = (yt-theYpol[j])/(xt-theXpol[j]);
2946 b = theYpol[j]-a*theXpol[j];
2947 previouspointin =
kTRUE;
2948 discr = 4*(a*a-b*b+1);
2949 x1 = (-2*a*b+
sqrt(discr))/(2*(a*a+1));
2950 x2 = (-2*a*b-
sqrt(discr))/(2*(a*a+1));
2953 norm1 =
sqrt((
x1-xt)*(
x1-xt)+(y1-yt)*(y1-yt));
2954 norm2 =
sqrt((x2-xt)*(x2-xt)+(y2-yt)*(y2-yt));
2956 if (norm1 < norm2) {
2963 PaintGraph(theGraphPolar, j+1, theXpol, theYpol, opt);
2970 PaintGraph(theGraphPolar, j+1, theXpol, theYpol, opt);
2973 for (i=0; i<theNpoints; i++) {
2977 PaintGraph(theGraphPolar, theNpoints, theXpol, theYpol,opt);
2987 while ((obj =
next())) {
2990 if (title->GetName())
2991 if (strcmp(title->GetName(),
"title")) {title = 0;
continue;}
2995 if (title)
delete title;
3001 if (ht <= 0) ht = 0.05;
3016 if (wt > 0) title->SetX2NDC(title->GetX1NDC()+wt);
3022 if (talh < 1) talh = 1;
else if (talh > 3) talh = 3;
3024 if (talv < 1) talv = 1;
else if (talv > 3) talv = 3;
3030 if (talh == 2) xpos = xpos-wt/2.;
3031 if (talh == 3) xpos = xpos-wt;
3032 if (talv == 2) ypos = ypos+ht/2.;
3033 if (talv == 1) ypos = ypos+ht;
3066 TF1 *theF = theGraphQQ->
GetF();
3069 Error(
"TGraphQQ::Paint",
"2nd dataset or theoretical function not specified");
3084 Double_t yxmin, xymin, yxmax, xymax;
3090 TLine line1, line2, line3;
3093 yxmin = (theYq2-theYq1)*(xmin-theXq1)/(theXq2-theXq1) + theYq1;
3095 xymin = (theXq2-theXq1)*(ymin-theYq1)/(theYq2-theYq1) + theXq1;
3096 line1.
PaintLine(xymin, ymin, xqmin, yqmin);
3099 line1.
PaintLine(xmin, yxmin, xqmin, yqmin);
3101 line2.
PaintLine(xqmin, yqmin, xqmax, yqmax);
3103 yxmax = (theYq2-theYq1)*(xmax-theXq1)/(theXq2-theXq1) + theYq1;
3105 xymax = (theXq2-theXq1)*(ymax-theYq1)/(theYq2-theYq1) + theXq1;
3106 line3.
PaintLine(xqmax, yqmax, xymax, ymax);
3109 line3.
PaintLine(xqmax, yqmax, xmax, yxmax);
3119 if (strstr(option,
"H") || strstr(option,
"h")) {
3128 if (!functions)
return;
3164 Double_t x1,
x2, y1, y2,
x3, y3, xm, ym,
a, a1, a2, a3;
3167 Int_t ix1,iy1,ix2,iy2;
3171 gPad->GetPadPar(x1p,y1p,x2p,y2p);
3172 ix1 = (
Int_t)(iw*x1p);
3173 iy1 = (
Int_t)(ih*y1p);
3174 ix2 = (
Int_t)(iw*x2p);
3175 iy2 = (
Int_t)(ih*y2p);
3187 gPad->GetRange(rx1,ry1,rx2,ry2);
3188 Double_t rx = (x2ndc-x1ndc)/(rx2-rx1);
3189 Double_t ry = (y2ndc-y1ndc)/(ry2-ry1);
3193 xf[0] = rx*(x[0]-rx1)+x1ndc;
3194 yf[0] = ry*(y[0]-ry1)+y1ndc;
3196 for (i=1; i<
n; i++) {
3197 if (x[i]==x[i-1] && y[i]==y[i-1])
continue;
3199 xf[nf] = rx*(x[i]-rx1)+x1ndc;
3200 if (xf[i]==xf[i-1]) xf[i] += 0.000001;
3201 yf[nf] = ry*(y[i]-ry1)+y1ndc;
3220 if (xf[nf]==xf[nf-1]) {
3223 a =
TMath::ATan((yf[nf]-yf[nf-1])/(xf[nf]-xf[nf-1]));
3225 if (xf[nf]>=xf[nf-1]) {
3234 for (i=1; i<nf; i++) {
3246 if (xi1<xi0) a1 = a1+3.14159;
3252 if (xi0<xi2) a2 = a2+3.14159;
3267 if ((xm-xi0)*(x3-xi0)<0 && (ym-yi0)*(y3-yi0)<0) {
3271 if ((xm==x1) && (ym==y1)) {
3280 if (xf[nf]==xf[0] && yf[nf]==yf[0]) {
3281 xm = (xt[nf]+xt[0])*0.5;
3282 ym = (yt[nf]+yt[0])*0.5;
3290 if ((xm-xf[0])*(x3-xf[0])<0 && (ym-yf[0])*(y3-yf[0])<0) {
3304 for (i=nf2; i>0; i--) {
3305 for (j=i-1; j>0; j--) {
3306 if (xt[i-1]==xt[i] || xt[j-1]==xt[j])
continue;
3307 c1 = (yt[i-1]-yt[i])/(xt[i-1]-xt[i]);
3308 b1 = yt[i]-c1*xt[i];
3309 c2 = (yt[j-1]-yt[j])/(xt[j-1]-xt[j]);
3310 b2 = yt[j]-c2*xt[j];
3312 xc = (b2-b1)/(c1-c2);
3318 nf++; xf[nf] = xt[i]; yf[nf] = yt[i];
3319 nf++; xf[nf] = xc ; yf[nf] = yc;
3337 nf++; xf[nf] = xt[0]; yf[nf] = yt[0];
3340 for (i=0; i<nf+1; i++) {
3341 xf[i] = (1/rx)*(xf[i]-x1ndc)+rx1;
3342 yf[i] = (1/ry)*(yf[i]-y1ndc)+ry1;
3346 gPad->PaintFillArea(nf+1,xf,yf);
3347 theGraph->TAttLine::Modify();
3367 while ((obj =
next())) {
3377 if (!dofit) fit = 0;
3379 if (dofit == 1) dofit = 111;
3381 Int_t print_fval = dofit%10;
3382 Int_t print_ferrors = (dofit/10)%10;
3383 Int_t print_fchi2 = (dofit/100)%10;
3384 Int_t print_fprob = (dofit/1000)%10;
3385 Int_t nlinesf = print_fval + print_fchi2 + print_fprob;
3386 if (fit) nlinesf += fit->
GetNpar();
3422 snprintf(textstats,50,
"#chi^{2} / ndf = %s%s / %d",
"%",stats->
GetFitFormat(),ndf);
3424 if (print_fchi2) stats->
AddText(t);
3426 snprintf(textstats,50,
"Prob = %s%s",
"%",stats->
GetFitFormat());
3430 if (print_fval || print_ferrors) {
3432 if (print_ferrors) {
3445 if (!done) functions->
Add(stats);
3475 Int_t i, k, kp, km, npointsMax, banksize, n2, npt;
3476 Int_t maxiterations, finished;
3477 Int_t jtype, ktype, closed;
3478 Double_t sxmin, sxmax, symin, symax;
3481 Double_t ratio_signs, xratio, yratio;
3487 Double_t co, so, ct, st, ctu, stu, xnt;
3488 Double_t dx1, dy1, dx2, dy2, dk1, dk2;
3495 c = t = co = so = ct = st = ctu = stu = dx1 = dy1 = dx2 = dy2 = 0;
3496 xt = yt = xa = xb = ya = yb = u1 = u2 = u3 = tj = sb = 0;
3498 npointsMax = npoints*10;
3505 Error(
"Smooth",
"not enough space in memory");
3512 jtype = (drawtype%1000)-10;
3513 if (jtype > 0) { ktype = jtype; loptx =
kTRUE; }
3514 else ktype = drawtype%1000;
3543 for (i=1;i<npoints;i++) {
3545 if ((x[i]-x[i-1])*(x[i-1]-x[i-2]) < 0) six++;
3546 if ((y[i]-y[i-1])*(y[i-1]-y[i-2]) < 0) siy++;
3548 if (x[i] < sxmin) sxmin = x[i];
3549 if (x[i] > sxmax) sxmax = x[i];
3550 if (y[i] < symin) symin = y[i];
3551 if (y[i] > symax) symax = y[i];
3556 if (dx1n < 0.01*(sxmax-sxmin) && dy1n < 0.01*(symax-symin)) closed = 1;
3557 if (sxmin == sxmax) {
3560 if (six > 1) ratio_signs = siy/six;
3561 else ratio_signs = 20;
3562 xratio = ratio_signs/(sxmax-sxmin);
3564 if (symin == symax) yratio = 1;
3565 else yratio = 1/(symax-symin);
3569 for (i=0;i<npoints;i++) {
3570 x[i] = (x[i]-sxmin)*xratio;
3571 y[i] = (y[i]-symin)*yratio;
3590 if (x[0] != x[npoints-1] || y[0] != y[npoints-1])
goto L40;
3591 if (x[npoints-2] == x[npoints-1] && y[npoints-2] == y[npoints-1])
goto L40;
3592 if (x[0] == x[1] && y[0] == y[1])
goto L40;
3615 if (npt > 1)
goto L310;
3619 if (x[k-1] == x[k-2] && y[k-1] == y[k-2])
goto L50;
3624 if (npt > 1)
goto L310;
3627 if (k < npoints)
goto L90;
3628 if (!flgic) { kp = 2;
goto L130;}
3631 if (flgis)
goto L150;
3641 if (x[k-1] == x[k] && y[k-1] == y[k])
goto L80;
3649 if (!flgis)
goto L50;
3664 dx1 = x[k-1] - x[km-1];
3665 dy1 = y[k-1] - y[km-1];
3666 dk1 = dx1*dx1 + dy1*dy1;
3667 dx2 = x[kp-1] - x[k-1];
3668 dy2 = y[kp-1] - y[k-1];
3669 dk2 = dx2*dx2 + dy2*dy2;
3670 ctu = dx1*dk2 + dx2*dk1;
3671 stu = dy1*dk2 + dy2*dk1;
3672 xnt = ctu*ctu + stu*stu;
3686 if (flgis)
goto L160;
3690 w3 = 2*(dx1*dy2-dx2*dy1);
3702 w3 = 2*(dx1*dy2-dx2*dy1);
3711 if (k <= 1)
goto L120;
3741 xa = (a*t-2*dx)/tcube;
3742 xb = (3*dx-(co+
a)*t)/tsquare;
3743 ya = (b*t-2*dy)/tcube;
3744 yb = (3*dy-(so+b)*t)/tsquare;
3775 p2 = (u1*tj-u3)*3*tj+u2;
3805 z = s*sth*(s-s*sth)*(w1*sth+w1+w2);
3806 z = z*z/((a*a+b*b)*(delta*delta));
3807 z = (z+2.642937)*z/((.3715652*z+3.063444)*z+.2441889)-cc;
3811 if (iw > 0)
goto L250;
3812 if (z > err)
goto L240;
3817 if (iw+2 == 0)
goto L190;
3818 if (iw+2 > 0)
goto L290;
3836 theGraph->
Zero(kp,0,sb,err,s,z,maxiterations);
3837 if (kp == 2)
goto L210;
3839 Error(
"Smooth",
"Attempt to plot outside plot limits");
3842 if (iw > 0)
goto L200;
3868 qlx[npt] = sxmin + xt/xratio;
3869 qly[npt] = symin + yt/yratio;
3876 if (npt < banksize)
goto L320;
3877 if (drawtype >= 1000 || ktype > 1) {
3878 Int_t newsize = banksize + n2;
3880 for (i=0;i<banksize;i++) qtemp[i] = qlx[i];
3883 for (i=0;i<banksize;i++) qlx[i] = qtemp[i];
3884 for (i=0;i<banksize;i++) qtemp[i] = qly[i];
3887 for (i=0;i<banksize;i++) qly[i] = qtemp[i];
3896 if (drawtype >= 1000) {
3897 gPad->PaintFillArea(npt,qlx,qly,
"B");
3901 qlx[npt] = qlx[npt-1];
3902 qlx[npt+1] = qlx[0];
3908 qly[npt] = qly[npt-1];
3909 qly[npt+1] = qly[0];
3911 gPad->PaintFillArea(npt+2,qlx,qly);
3914 gPad->PaintPolyLine(npt,qlx,qly);
3917 qlx[0] = sxmin + xt/xratio;
3918 qly[0] = symin + yt/yratio;
3920 if (finished > 0)
goto L390;
3921 if (finished < 0) { finished = 0;
goto L110;}
3922 if (s > 0)
goto L180;
3928 for (i=0;i<npoints;i++) {
3929 x[i] = sxmin + x[i]/xratio;
3930 y[i] = symin + y[i]/yratio;
virtual Double_t * GetEYlow() const
virtual Double_t * GetEYhighd() const
virtual const char * GetTitle() const
Returns title of object.
virtual Style_t GetFillStyle() const
virtual void SetLineWidth(Width_t lwidth)
Option_t * GetOption() const
Float_t GetEndErrorSize() const
double dist(Rotation3D const &r1, Rotation3D const &r2)
Float_t GetLabelSize(Option_t *axis="X") const
Return label size.
virtual void Paint(Option_t *option="")
Control routine to paint any kind of histograms.
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.
Float_t GetTitleW() const
virtual void SetMaximum(Double_t maximum=-1111)
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.
virtual Bool_t InheritsFrom(const char *classname) const
Returns kTRUE if object inherits from class "classname".
ClassImp(TSeqCollection) Int_t TSeqCollection TIter next(this)
Return index of object in collection.
virtual const char * GetFitFormat() 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.
Int_t GetDrawBorder() const
void Smooth(TGraph *theGraph, Int_t npoints, Double_t *x, Double_t *y, Int_t drawtype)
Smooth a curve given by N points.
TVector3 cross(const TVector3 &v1, const TVector3 &v2)
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 Double_t * GetEYlowd() const
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.
TString & ReplaceAll(const TString &s1, const TString &s2)
virtual const char * GetParName(Int_t ipar) const
R__EXTERN TStyle * gStyle
Double_t distance(const TPoint2 &p1, const TPoint2 &p2)
Float_t GetTickLength(Option_t *axis="X") const
Return tick length.
Color_t GetTitleFillColor() const
void Draw(Option_t *options="")
Draw Polargram.
virtual Bool_t IsEditable() const
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 void SetMinimum(Double_t minimum=-1111)
virtual Double_t * GetEXlowd() const
Float_t GetTitleX() 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.
Float_t GetTitleFontSize() const
Short_t Min(Short_t a, Short_t b)
void ToLower()
Change string to lower-case.
virtual Double_t GetParError(Int_t ipar) const
Return value of parameter number ipar.
virtual void SetFillStyle(Style_t fstyle)
void SetOptionAxis(Bool_t opt)
The histogram statistics painter class.
void PaintGraphPolar(TGraph *theGraph, Option_t *option)
[Paint this TGraphPolar with its current attributes.]($GP04)
TH1F * GetHistogram() const
Returns a pointer to the histogram used to draw the axis Takes into account the two following cases...
virtual ~TGraphPainter()
Destructor.
void box(Int_t pat, Double_t x1, Double_t y1, Double_t x2, Double_t y2)
virtual Int_t GetNDF() const
Return the number of degrees of freedom in the fit the fNDF parameter has been previously computed du...
virtual TVirtualPad * cd(Int_t subpadnumber=0)=0
Double_t Prob(Double_t chi2, Int_t ndf)
Computation of the probability for a certain Chi-squared (chi2) and number of degrees of freedom (ndf...
LongDouble_t Power(LongDouble_t x, LongDouble_t y)
void SetBit(UInt_t f, Bool_t set)
Set or unset the user status bits as specified in f.
virtual char * GetObjectInfoHelper(TGraph *theGraph, Int_t px, Int_t py) const
Width_t GetTitleBorderSize() const
virtual Double_t * GetEY() const
Style_t GetStatFont() const
This class allows to draw quantile-quantile plots.
TGraphPainter()
Default constructor.
virtual void SetTextFont(Font_t tfont=62)
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.
static TVirtualPadEditor * GetPadEditor(Bool_t load=kTRUE)
Returns the pad editor dialog. Static method.
Double_t GetChisquare() const
Float_t GetBarOffset() const
virtual void Paint(Option_t *option="")
Paint this pavetext with its current attributes.
virtual Option_t * GetDrawOption() const
Get option used by the graphics system to draw this object.
Color_t GetTitleTextColor() const
virtual Double_t * GetEXhigh() const
virtual Double_t GetMaximumStored() const
virtual void SetStatFormat(const char *format="6.4g")
Change (i.e. set) the format for printing statistics.
Width_t GetStatBorderSize() const
TList * GetListOfFunctions() const
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)
Double_t GetMinimum() 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.
Color_t GetStatColor() const
TGraphPolargram * GetPolargram()
virtual void Clear(Option_t *option="")
Clear all lines in this pavetext.
Base class for several text objects.
Float_t GetBarWidth() const
Bool_t IsInside(T xp, T yp, Int_t np, T *x, T *y)
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
TVirtualPad is an abstract base class for the Pad and Canvas classes.
Style_t GetLabelFont(Option_t *axis="X") const
Return label font.
void SetLabelSize(Float_t labelsize)
virtual void SetTextAlign(Short_t align=11)
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 PaintLine(Double_t x1, Double_t y1, Double_t x2, Double_t y2)
Draw this line with new coordinates.
Int_t GetOptTitle() 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.
Color_t GetAxisColor(Option_t *axis="X") const
Return the axis color number in the axis.
virtual void SetLineColor(Color_t lcolor)
virtual Size_t GetMarkerSize() const
virtual Double_t * GetEYhigh() const
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)
TAxis * GetXaxis() const
Get x axis of the graph.
Double_t GetXsize()
Return size of the formula along X in pad coordinates.
void PaintGraphQQ(TGraph *theGraph, Option_t *option)
Paint this graphQQ. No options for the time being.
virtual Double_t GetMinimumStored() const
virtual void SetFillColor(Color_t fcolor)
virtual Color_t GetFillColor() const
TObject * GetObject() const
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.
Bool_t TestBit(UInt_t f) const
char * Form(const char *fmt,...)
return fString CompareTo(((TObjString *) obj) ->fString)
virtual const char * GetName() const
Returns name of object.
virtual void SetMarkerStyle(Style_t mstyle=1)
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 TObjLink * FirstLink() const
Style_t GetTitleStyle() const
virtual Color_t GetLineColor() const
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
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 Paint(Option_t *option="")
This method must be overridden if a class wants to paint itself.
void SetLabelOffset(Float_t labeloffset)
static const double x1[5]
A Pave (see TPave) with text, lines or/and boxes inside.
Color_t GetLabelColor(Option_t *axis="X") const
Return the label color number in the axis.
Int_t GetNdivisions(Option_t *axis="X") const
Return number of divisions.
virtual const char * GetName() const
Returns name of object.
void SetDrawBorder(Int_t drawborder=1)
Float_t GetStatFontSize() const
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.
Style_t GetStatStyle() const
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)
virtual void SetLineStyle(Style_t lstyle)
virtual Double_t GetParameter(Int_t ipar) const
Mother of all ROOT objects.
TAxis * GetYaxis() const
Get y axis of the graph.
virtual TObject * First() const
Return the first object in the list. Returns 0 when list is empty.
virtual Double_t * GetEXlow() const
const char * GetFitFormat() const
virtual void Add(TObject *obj)
Float_t GetTitleY() const
Short_t Max(Short_t a, Short_t b)
Bool_t Contains(const char *pat, ECaseCompare cmp=kExact) const
A Graph is a graphics object made of two arrays X and Y with npoints each.
Float_t GetLabelOffset(Option_t *axis="X") const
Return label offset.
void SetTickSize(Float_t ticksize)
Double_t * GetXpol()
Return points in polar coordinates.
virtual void SetTextColor(Color_t tcolor=1)
virtual void SetHistogram(TH1F *h)
virtual void Paint(Option_t *option="")
Paint the pave stat.
virtual Double_t * GetEX() const
virtual Double_t * GetEXhighd() const
Style_t GetTitleFont(Option_t *axis="X") const
Return title font.
Color_t GetStatTextColor() const
Double_t Sqrt(Double_t x)
virtual void SetTextSize(Float_t tsize=1)
Draw all kinds of Arrows.
virtual Style_t GetMarkerStyle() const
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 Width_t GetLineWidth() const
virtual const char * GetTitle() const
Returns title of object.
Double_t * GetYpol()
Return points in polar coordinates.
virtual void SetTitle(const char *title="")
Change (i.e. set) the title of the TNamed.
Int_t GetOptFit() const
Return the fit option.
double norm(double *x, double *p)
virtual Int_t GetNpar() 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...
void PaintGraphSimple(TGraph *theGraph, Option_t *option)
Paint a simple graph, without errors bars.
virtual void SetBorderSize(Int_t bordersize=4)
Float_t GetTitleH() const
void SetParent(TObject *obj)
const char * GetStatFormat() const
void SetOptStat(Int_t stat=1)
Set the stat option.
static const double x3[11]
void SetPolargram(TGraphPolargram *p)