467 if (
gPad->GetLogx()) {
468 for (i=0;i<npoints;i++) {
473 if (!opt &&
gPad->GetLogy()) {
474 for (i=0;i<npoints;i++) {
495 if (distance <= 5)
return distance;
499 const Int_t big = 9999;
500 const Int_t kMaxDiff = 10;
507 if (px <= puxmin)
return big;
508 if (py >= puymin)
return big;
509 if (px >= puxmax)
return big;
510 if (py <= puymax)
return big;
513 Int_t i, pxp, pyp, d;
520 theX = theGraphPolar->
GetXpol();
521 theY = theGraphPolar->
GetYpol();
523 theX = theGraph->
GetX();
524 theY = theGraph->
GetY();
527 for (i=0;i<theNpoints;i++) {
528 pxp =
gPad->XtoAbsPixel(
gPad->XtoPad(theX[i]));
529 pyp =
gPad->YtoAbsPixel(
gPad->YtoPad(theY[i]));
531 if (d < distance) distance = d;
533 if (distance < kMaxDiff)
return distance;
535 for (i=0;i<theNpoints-1;i++) {
538 if (d < distance) distance = d;
553 TIter next(functions);
554 while ((f = (
TObject*) next())) {
558 if (dist < kMaxDiff) {
559 gPad->SetSelected(f);
575 Error(
"DrawPanel",
"need to draw graph first");
580 gROOT->ProcessLine(
Form(
"((TCanvas*)0x%lx)->Selected((TVirtualPad*)0x%lx,(TObject*)0x%lx,1)",
603 const Int_t kMaxDiff = 10;
604 static Bool_t middle, badcase;
605 static Int_t ipoint, pxp, pyp;
606 static Int_t px1,px2,py1,py2;
607 static Int_t pxold, pyold, px1old, py1old, px2old, py2old;
608 static Int_t dpx, dpy;
616 if (!
gPad->IsEditable())
return;
626 theGraph->TAttLine::Modify();
627 px1 =
gPad->XtoAbsPixel(
gPad->GetX1());
628 py1 =
gPad->YtoAbsPixel(
gPad->GetY1());
629 px2 =
gPad->XtoAbsPixel(
gPad->GetX2());
630 py2 =
gPad->YtoAbsPixel(
gPad->GetY2());
635 x =
new Int_t[theNpoints+1];
636 y =
new Int_t[theNpoints+1];
637 for (i=0;i<theNpoints;i++) {
638 pxp =
gPad->XtoAbsPixel(
gPad->XtoPad(theX[i]));
639 pyp =
gPad->YtoAbsPixel(
gPad->YtoPad(theY[i]));
640 if (pxp < -kMaxPixel || pxp >=
kMaxPixel ||
646 gVirtualX->DrawLine(pxp-4, pyp-4, pxp+4, pyp-4);
647 gVirtualX->DrawLine(pxp+4, pyp-4, pxp+4, pyp+4);
648 gVirtualX->DrawLine(pxp+4, pyp+4, pxp-4, pyp+4);
649 gVirtualX->DrawLine(pxp-4, pyp+4, pxp-4, pyp-4);
654 if (d < kMaxDiff) ipoint =i;
660 if (ipoint < 0)
return;
664 px2old =
gPad->XtoAbsPixel(theX[1]);
665 py2old =
gPad->YtoAbsPixel(theY[1]);
666 }
else if (ipoint == theNpoints-1) {
667 px1old =
gPad->XtoAbsPixel(
gPad->XtoPad(theX[theNpoints-2]));
668 py1old =
gPad->YtoAbsPixel(
gPad->YtoPad(theY[theNpoints-2]));
672 px1old =
gPad->XtoAbsPixel(
gPad->XtoPad(theX[ipoint-1]));
673 py1old =
gPad->YtoAbsPixel(
gPad->YtoPad(theY[ipoint-1]));
674 px2old =
gPad->XtoAbsPixel(
gPad->XtoPad(theX[ipoint+1]));
675 py2old =
gPad->YtoAbsPixel(
gPad->YtoPad(theY[ipoint+1]));
677 pxold =
gPad->XtoAbsPixel(
gPad->XtoPad(theX[ipoint]));
678 pyold =
gPad->YtoAbsPixel(
gPad->YtoPad(theY[ipoint]));
686 for (i=0;i<theNpoints;i++) {
687 pxp =
gPad->XtoAbsPixel(
gPad->XtoPad(theX[i]));
688 pyp =
gPad->YtoAbsPixel(
gPad->YtoPad(theY[i]));
690 if (d < kMaxDiff) middle =
kFALSE;
702 for(i=0;i<theNpoints-1;i++) {
703 gVirtualX->DrawLine(x[i]+dpx,
y[i]+dpy, x[i+1]+dpx,
y[i+1]+dpy);
706 if (pxp < -kMaxPixel || pxp >=
kMaxPixel ||
707 pyp < -kMaxPixel || pyp >=
kMaxPixel)
continue;
708 gVirtualX->DrawLine(pxp-4, pyp-4, pxp+4, pyp-4);
709 gVirtualX->DrawLine(pxp+4, pyp-4, pxp+4, pyp+4);
710 gVirtualX->DrawLine(pxp+4, pyp+4, pxp-4, pyp+4);
711 gVirtualX->DrawLine(pxp-4, pyp+4, pxp-4, pyp-4);
713 pxp = x[theNpoints-1]+dpx;
714 pyp =
y[theNpoints-1]+dpy;
715 gVirtualX->DrawLine(pxp-4, pyp-4, pxp+4, pyp-4);
716 gVirtualX->DrawLine(pxp+4, pyp-4, pxp+4, pyp+4);
717 gVirtualX->DrawLine(pxp+4, pyp+4, pxp-4, pyp+4);
718 gVirtualX->DrawLine(pxp-4, pyp+4, pxp-4, pyp-4);
723 for(i=0;i<theNpoints-1;i++) {
724 gVirtualX->DrawLine(x[i]+dpx,
y[i]+dpy, x[i+1]+dpx,
y[i+1]+dpy);
727 if (pxp < -kMaxPixel || pxp >=
kMaxPixel ||
728 pyp < -kMaxPixel || pyp >=
kMaxPixel)
continue;
729 gVirtualX->DrawLine(pxp-4, pyp-4, pxp+4, pyp-4);
730 gVirtualX->DrawLine(pxp+4, pyp-4, pxp+4, pyp+4);
731 gVirtualX->DrawLine(pxp+4, pyp+4, pxp-4, pyp+4);
732 gVirtualX->DrawLine(pxp-4, pyp+4, pxp-4, pyp-4);
734 pxp = x[theNpoints-1]+dpx;
735 pyp =
y[theNpoints-1]+dpy;
736 gVirtualX->DrawLine(pxp-4, pyp-4, pxp+4, pyp-4);
737 gVirtualX->DrawLine(pxp+4, pyp-4, pxp+4, pyp+4);
738 gVirtualX->DrawLine(pxp+4, pyp+4, pxp-4, pyp+4);
739 gVirtualX->DrawLine(pxp-4, pyp+4, pxp-4, pyp-4);
741 if (px1old)
gVirtualX->DrawLine(px1old, py1old, pxold, pyold);
742 if (px2old)
gVirtualX->DrawLine(pxold, pyold, px2old, py2old);
743 gVirtualX->DrawLine(pxold-4, pyold-4, pxold+4, pyold-4);
744 gVirtualX->DrawLine(pxold+4, pyold-4, pxold+4, pyold+4);
745 gVirtualX->DrawLine(pxold+4, pyold+4, pxold-4, pyold+4);
746 gVirtualX->DrawLine(pxold-4, pyold+4, pxold-4, pyold-4);
753 if (px1old)
gVirtualX->DrawLine(px1old, py1old, pxold, pyold);
754 if (px2old)
gVirtualX->DrawLine(pxold, pyold, px2old, py2old);
755 gVirtualX->DrawLine(pxold-4, pyold-4, pxold+4, pyold-4);
756 gVirtualX->DrawLine(pxold+4, pyold-4, pxold+4, pyold+4);
757 gVirtualX->DrawLine(pxold+4, pyold+4, pxold-4, pyold+4);
758 gVirtualX->DrawLine(pxold-4, pyold+4, pxold-4, pyold-4);
761 xmin =
gPad->GetUxmin();
762 xmax =
gPad->GetUxmax();
763 ymin =
gPad->GetUymin();
764 ymax =
gPad->GetUymax();
767 dxr = dx/(1 -
gPad->GetLeftMargin() -
gPad->GetRightMargin());
768 dyr = dy/(1 -
gPad->GetBottomMargin() -
gPad->GetTopMargin());
773 gPad->Range(xmin - dxr*
gPad->GetLeftMargin(),
774 ymin - dyr*
gPad->GetBottomMargin(),
775 xmax + dxr*
gPad->GetRightMargin(),
776 ymax + dyr*
gPad->GetTopMargin());
777 gPad->RangeAxis(xmin, ymin, xmax, ymax);
784 for(i=0;i<theNpoints;i++) {
785 if (badcase)
continue;
786 if (x) theX[i] =
gPad->PadtoX(
gPad->AbsPixeltoX(x[i]+dpx));
787 if (
y) theY[i] =
gPad->PadtoY(
gPad->AbsPixeltoY(
y[i]+dpy));
796 theX[ipoint] =
gPad->PadtoX(
gPad->AbsPixeltoX(pxold));
797 theY[ipoint] =
gPad->PadtoY(
gPad->AbsPixeltoY(pyold));
801 theX[theNpoints-1] = theX[0];
802 theY[theNpoints-1] = theY[0];
804 if (ipoint == theNpoints-1) {
805 theX[0] = theX[theNpoints-1];
806 theY[0] = theY[theNpoints-1];
818 if (
gROOT->IsEscaped()) {
826 xmin =
gPad->GetUxmin();
827 xmax =
gPad->GetUxmax();
828 ymin =
gPad->GetUymin();
829 ymax =
gPad->GetUymax();
832 dxr = dx/(1 -
gPad->GetLeftMargin() -
gPad->GetRightMargin());
833 dyr = dy/(1 -
gPad->GetBottomMargin() -
gPad->GetTopMargin());
838 gPad->Range(xmin - dxr*
gPad->GetLeftMargin(),
839 ymin - dyr*
gPad->GetBottomMargin(),
840 xmax + dxr*
gPad->GetRightMargin(),
841 ymax + dyr*
gPad->GetTopMargin());
842 gPad->RangeAxis(xmin, ymin, xmax, ymax);
845 for(i=0;i<theNpoints;i++) {
846 if (badcase)
continue;
847 if (x) theX[i] =
gPad->PadtoX(
gPad->AbsPixeltoX(x[i]+dpx));
848 if (
y) theY[i] =
gPad->PadtoY(
gPad->AbsPixeltoY(
y[i]+dpy));
851 theX[ipoint] =
gPad->PadtoX(
gPad->AbsPixeltoX(pxold));
852 theY[ipoint] =
gPad->PadtoY(
gPad->AbsPixeltoY(pyold));
856 theX[theNpoints-1] = theX[0];
857 theY[theNpoints-1] = theY[0];
859 if (ipoint == theNpoints-1) {
860 theX[0] = theX[theNpoints-1];
861 theY[0] = theY[theNpoints-1];
916 gPad->PushSelectableObject(theGraph);
918 Int_t optionLine , optionAxis , optionCurve , optionStar , optionMark;
919 Int_t optionBar , optionR , optionOne , optionE;
920 Int_t optionFill , optionZ , optionCurveFill, optionIAxis;
924 Double_t barxmin, barxmax, barymin, barymax;
931 Error(
"PaintGraph",
"illegal number of points (%d)", npoints);
938 if (opt.
Contains(
"L")) optionLine = 1;
else optionLine = 0;
939 if (opt.
Contains(
"A")) optionAxis = 1;
else optionAxis = 0;
940 if (opt.
Contains(
"C")) optionCurve = 1;
else optionCurve = 0;
941 if (opt.
Contains(
"*")) optionStar = 1;
else optionStar = 0;
942 if (opt.
Contains(
"P")) optionMark = 1;
else optionMark = 0;
943 if (opt.
Contains(
"B")) optionBar = 1;
else optionBar = 0;
944 if (opt.
Contains(
"R")) optionR = 1;
else optionR = 0;
945 if (opt.
Contains(
"1")) optionOne = 1;
else optionOne = 0;
946 if (opt.
Contains(
"F")) optionFill = 1;
else optionFill = 0;
947 if (opt.
Contains(
"I")) optionIAxis = 1;
else optionIAxis = 0;
953 if (optionLine+optionFill+optionCurve+optionStar+optionMark+optionBar+optionE == 0) {
954 if (!chopt[0]) optionLine=1;
961 if (optionCurve && optionFill) {
967 Double_t rwxmin,rwxmax, rwymin, rwymax, maximum, minimum, dx, dy;
970 rwxmin =
gPad->GetUxmin();
971 rwxmax =
gPad->GetUxmax();
972 rwymin =
gPad->GetUymin();
973 rwymax =
gPad->GetUymax();
976 if (minimum == -1111) {
980 if (maximum == -1111) {
984 uxmin =
gPad->PadtoX(rwxmin);
985 uxmax =
gPad->PadtoX(rwxmax);
990 if (rwxmin == rwxmax) rwxmax += 1.;
991 if (rwymin == rwymax) rwymax += 1.;
992 dx = 0.1*(rwxmax-rwxmin);
993 dy = 0.1*(rwymax-rwymin);
996 minimum = rwymin - dy;
997 maximum = rwymax + dy;
1001 if (uxmin < 0 && rwxmin >= 0) uxmin = 0.9*rwxmin;
1002 if (uxmax > 0 && rwxmax <= 0) {
1003 if (
gPad->GetLogx()) uxmax = 1.1*rwxmax;
1006 if (minimum < 0 && rwymin >= 0) minimum = 0.9*rwymin;
1007 if (maximum > 0 && rwymax <= 0) {
1011 if (minimum <= 0 && gPad->GetLogy()) minimum = 0.001*maximum;
1012 if (uxmin <= 0 && gPad->GetLogx()) {
1013 if (uxmax > 1000) uxmin = 1;
1014 else uxmin = 0.001*uxmax;
1021 char chopth[8] =
" ";
1022 if (strstr(chopt,
"x+")) strncat(chopth,
"x+",2);
1023 if (strstr(chopt,
"y+")) strncat(chopth,
"y+",2);
1024 if (optionIAxis) strncat(chopth,
"A",1);
1031 if (theNpoints > npt) npt = theNpoints;
1042 if (
gPad->GetLogy()) {
1062 TIter next(functions);
1063 while ((f = (
TObject*) next())) {
1072 rwxmin =
gPad->GetUxmin();
1073 rwxmax =
gPad->GetUxmax();
1074 rwymin =
gPad->GetUymin();
1075 rwymax =
gPad->GetUymax();
1076 uxmin =
gPad->PadtoX(rwxmin);
1077 uxmax =
gPad->PadtoX(rwxmax);
1082 maximum =
gPad->PadtoY(rwymax);
1083 minimum =
gPad->PadtoY(rwymin);
1087 theGraph->TAttLine::Modify();
1088 theGraph->TAttFill::Modify();
1089 theGraph->TAttMarker::Modify();
1097 if (optionLine || optionFill) {
1103 if (optionFill && (xn != x1 || yn != y1)) nloop++;
1105 for (i=1;i<=nloop;i++) {
1146 if (optionCurveFill) {
1148 if (xn != x1 || yn != y1) nloop++;
1152 for (i=1;i<=nloop;i++) {
1177 for (i=1;i<=nloop;i++) {
1181 if (
y[i-1] < minimum ||
y[i-1] > maximum)
continue;
1182 if (
x[i-1] < uxmin ||
x[i-1] > uxmax)
continue;
1208 for (i=1;i<=npoints;i++) {
1223 for (i=1;i<=npoints;i++) {
1240 for (i=1;i<npoints;i++) {
1241 if (
x[i] < barxmin) barxmin =
x[i];
1242 if (
x[i] > barxmax) barxmax =
x[i];
1244 bdelta = (barxmax-barxmin)/
Double_t(npoints);
1248 for (i=1;i<npoints;i++) {
1249 if (
y[i] < barymin) barymin =
y[i];
1250 if (
y[i] > barymax) barymax =
y[i];
1252 bdelta = (barymax-barymin)/
Double_t(npoints);
1256 for (i=1;i<=npoints;i++) {
1257 xlow =
x[i-1] - dbar;
1258 xhigh =
x[i-1] + dbar;
1260 if (xlow < uxmin) xlow = uxmin;
1261 if (xhigh > uxmax) xhigh = uxmax;
1263 else ylow =
gPad->GetUymin();
1277 for (i=1;i<=npoints;i++) {
1279 ylow =
y[i-1] - dbar;
1280 yhigh =
y[i-1] + dbar;
1333 const char *where =
"PaintGrapHist";
1335 Int_t optionLine , optionAxis , optionCurve, optionStar, optionMark;
1336 Int_t optionBar , optionRot , optionOne , optionOff ;
1337 Int_t optionFill , optionZ;
1338 Int_t optionHist , optionBins , optionMarker;
1340 Int_t drawtype=0, drawborder, drawbordersav;
1346 Double_t xi, xi1, xj, xj1, yi1, yi, yj, yj1, xwmin, ywmin;
1350 char choptaxis[10] =
" ";
1353 Error(where,
"illegal number of points (%d)", npoints);
1358 if (opt.
Contains(
"H")) optionHist = 1;
else optionHist = 0;
1359 if (opt.
Contains(
"F")) optionFill = 1;
else optionFill = 0;
1360 if (opt.
Contains(
"C")) optionCurve= 1;
else optionCurve= 0;
1361 if (opt.
Contains(
"*")) optionStar = 1;
else optionStar = 0;
1362 if (opt.
Contains(
"R")) optionRot = 1;
else optionRot = 0;
1363 if (opt.
Contains(
"1")) optionOne = 1;
else optionOne = 0;
1364 if (opt.
Contains(
"B")) optionBar = 1;
else optionBar = 0;
1365 if (opt.
Contains(
"N")) optionBins = 1;
else optionBins = 0;
1366 if (opt.
Contains(
"L")) optionLine = 1;
else optionLine = 0;
1367 if (opt.
Contains(
"P")) optionMark = 1;
else optionMark = 0;
1368 if (opt.
Contains(
"A")) optionAxis = 1;
else optionAxis = 0;
1369 if (opt.
Contains(
"][")) optionOff = 1;
else optionOff = 0;
1370 if (opt.
Contains(
"P0")) optionMark = 10;
1372 Int_t optionFill2 = 0;
1374 optionFill = 0; optionFill2 = 1;
1401 Double_t rounding = (uxmax-uxmin)*1.
e-5;
1404 Int_t nx1, nx2, ndivx, ndivy, ndiv;
1417 if (ndivx < 0) strlcat(choptaxis,
"N",10);
1418 if (
gPad->GetGridx()) {
1420 strlcat(choptaxis,
"W",10);
1422 if (
gPad->GetLogx()) {
1426 strlcat(choptaxis,
"G",10);
1436 axis->
PaintAxis(rwxmin,rwymin,rwxmax,rwymin,rwmin,rwmax,ndiv,choptaxis);
1446 strlcat(choptaxis,
"N",10);
1449 if (
gPad->GetGridy()) {
1451 strlcat(choptaxis,
"W",10);
1453 if (
gPad->GetLogy()) {
1457 strlcat(choptaxis,
"G",10);
1466 axis->
PaintAxis(rwxmin,rwymin,rwxmin,rwymax,rwmin,rwmax,ndiv,choptaxis);
1472 theGraph->TAttLine::Modify();
1473 theGraph->TAttFill::Modify();
1474 theGraph->TAttMarker::Modify();
1478 if (!optionRot) {wmin =
x[0]; wmax =
x[1];}
1479 else {wmin =
y[0]; wmax =
y[1];}
1483 Int_t fwidth =
gPad->GetFrameLineWidth();
1486 if (optionOff) fwidth = 1;
1502 if (optionFill && !optionCurve) {
1510 for (j=
first; j<=last;j++) {
1517 xj1 =
x[j]; xj =
x[j-1];
1519 if (j != last)
Error(where,
"X must be in increasing order");
1520 else Error(where,
"X must have N+1 values with option N");
1525 gywork[npt-1] =
y[j-1];
1526 gywork[npt] =
y[j-1];
1527 if (gywork[npt] < vymin) {gywork[npt] = vymin; gywork[npt-1] = vymin;}
1528 if ((
gxwork[npt-1] >= uxmin-rounding &&
gxwork[npt-1] <= uxmax+rounding) ||
1529 (
gxwork[npt] >= uxmin-rounding &&
gxwork[npt] <= uxmax+rounding)) npt += 2;
1532 gywork[npt-1] = gywork[0];
1536 if (gywork[0] < vymin) {gywork[0] = vymin; gywork[npt-1] = vymin;}
1542 if (!fillarea)
gyworkl[0] = ylast;
1553 for (j=
first; j<=last;j++) {
1558 yj1 =
y[j]; yj =
y[j-1];
1560 if (j != last)
Error(where,
"Y must be in increasing order");
1561 else Error(where,
"Y must have N+1 values with option N");
1566 gxwork[npt-1] =
x[j-1]; gxwork[npt] =
x[j-1];
1567 if ((gxwork[npt-1] >= uxmin-rounding && gxwork[npt-1] <= uxmax+rounding) ||
1568 (gxwork[npt] >= uxmin-rounding && gxwork[npt] <= uxmax+rounding)) npt += 2;
1571 gxwork[npt-1] = gxwork[0];
1575 if (!fillarea)
gyworkl[0] = ylast;
1582 theGraph->TAttLine::Modify();
1583 theGraph->TAttFill::Modify();
1588 if ((optionHist) || !chopt[0]) {
1594 for (i=
first; i<=last;i++) {
1599 xi1 =
x[i]; xi =
x[i-1];
1601 if (i != last)
Error(where,
"X must be in increasing order");
1602 else Error(where,
"X must have N+1 values with option N");
1610 if ((
gxwork[npt-1] >= uxmin-rounding &&
gxwork[npt-1] <= uxmax+rounding) ||
1611 (
gxwork[npt] >= uxmin-rounding &&
gxwork[npt] <= uxmax+rounding)) npt += 2;
1623 Int_t nbpoints = npt-2;
1629 for (ip=point1; ip<=nbpoints; ip++) {
1636 Int_t point2 = nbpoints;
1637 for (ip=point2; ip>=point1; ip--) {
1643 nbpoints = point2-point1+1;
1647 if (
gxwork[0] >
gPad->GetUxmin()) { nbpoints++; point1 = 0; }
1648 if (
gxwork[nbpoints] <
gPad->GetUxmax()) nbpoints++;
1660 for (i=
first; i<=last;i++) {
1665 yi1 =
y[i]; yi =
y[i-1];
1667 if (i != last)
Error(where,
"Y must be in increasing order");
1668 else Error(where,
"Y must have N+1 values with option N");
1674 if ((
gxwork[npt-1] >= uxmin-rounding &&
gxwork[npt-1] <= uxmax+rounding) ||
1675 (
gxwork[npt] >= uxmin-rounding &&
gxwork[npt] <= uxmax+rounding)) npt += 2;
1694 if (!optionOne) drawtype = 2;
1699 for (i=
first; i<=last;i++) {
1704 xi1 =
x[i]; xi =
x[i-1];
1706 if (i != last)
Error(where,
"X must be in increasing order");
1707 else Error(where,
"X must have N+1 values with option N");
1710 gxwork[npt-1] =
x[i-1] + 0.5*(
x[i]-
x[i-1]);
1741 drawtype = drawtype+10;
1743 for (i=
first; i<=last;i++) {
1748 yi1 =
y[i]; yi =
y[i-1];
1750 if (i != last)
Error(where,
"Y must be in increasing order");
1751 else Error(where,
"Y must have N+1 values with option N");
1754 gywork[npt-1] =
y[i-1] + 0.5*(
y[i]-
y[i-1]);
1786 if ((optionStar) || (optionMark))optionMarker=1;
1787 if ((optionMarker) || (optionLine)) {
1788 wminstep = wmin + 0.5*delta;
1790 gPad->GetRangeAxis(ax1,ay1,ax2,ay2);
1794 for (i=
first; i<=last;i++) {
1799 xi1 =
x[i]; xi =
x[i-1];
1801 if (i != last)
Error(where,
"X must be in increasing order");
1802 else Error(where,
"X must have N+1 values with option N");
1805 gxwork[npt-1] =
x[i-1] + 0.5*(
x[i]-
x[i-1]);
1807 if (
gxwork[npt-1] < uxmin ||
gxwork[npt-1] > uxmax) { npt--;
continue;}
1808 if ((optionMark != 10) && (optionLine == 0)) {
1809 if (
y[i-1] <= rwymin) {npt--;
continue;}
1813 if ((
gywork[npt-1] < rwymin) || ((
gywork[npt-1] > rwymax) && !optionFill2)) {
1851 if (optionMarker && npt > 0) {
1855 if (optionLine && npt > 1) {
1866 for (i=
first; i<=last;i++) {
1869 gywork[npt-1] = wminstep+(i-
first)*delta+0.5*delta;
1871 yi1 =
y[i]; yi =
y[i-1];
1873 if (i != last)
Error(where,
"Y must be in increasing order");
1874 else Error(where,
"Y must have N+1 values with option N");
1877 gywork[npt-1] =
y[i-1] + 0.5*(
y[i]-
y[i-1]);
1880 if ((
gxwork[npt-1] < uxmin) || (
gxwork[npt-1] > uxmax)) {
1910 if (optionMarker && npt > 0) {
1914 if (optionLine != 0 && npt > 1) {
1925 offset = delta*baroffset; dbar = delta*barwidth;
1928 offset = (
x[1]-
x[0])*baroffset;
1929 dbar = (
x[1]-
x[0])*barwidth;
1931 offset = (
y[1]-
y[0])*baroffset;
1932 dbar = (
y[1]-
y[0])*barwidth;
1935 drawbordersav = drawborder;
1939 xhigh = wmin+offset+dbar;
1942 else ylow =
gPad->GetUymin();
1944 for (i=
first; i<=last;i++) {
1951 if (xlow < rwxmax && xhigh > rwxmin)
1955 xhigh = xhigh+delta;
1958 xi1 =
x[i]; xi =
x[i-1];
1960 Error(where,
"X must be in increasing order");
1963 offset = (
x[i+1]-
x[i])*baroffset;
1964 dbar = (
x[i+1]-
x[i])*barwidth;
1965 xlow =
x[i] + offset;
1966 xhigh =
x[i] + offset + dbar;
1971 ylow = wmin + offset;
1972 yhigh = wmin + offset + dbar;
1974 else xlow =
gPad->GetUxmin();
1975 for (i=
first; i<=last;i++) {
1983 gPad->PaintBox(xlow,ylow,xhigh,yhigh);
1985 ylow = ylow + delta;
1986 yhigh = yhigh + delta;
1989 yi1 =
y[i]; yi =
y[i-1];
1991 Error(where,
"Y must be in increasing order");
1994 offset = (
y[i+1]-
y[i])*baroffset;
1995 dbar = (
y[i+1]-
y[i])*barwidth;
1996 ylow =
y[i] + offset;
1997 yhigh =
y[i] + offset + dbar;
2025 const Int_t kBASEMARKER=8;
2026 Double_t s2x, s2y, symbolsize, sbase;
2027 Double_t x,
y, xl1, xl2, xr1, xr2, yup1, yup2, ylow1, ylow2, tx, ty;
2028 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};
2029 static Float_t cyy[15] = {1,1,1,1,1,1,1,1,1,0.5,0.6,1,1,1,1};
2038 if (strchr(option,
'X') || strchr(option,
'x')) {
PaintGraphSimple(theGraph, option);
return;}
2041 if (strstr(option,
"||") || strstr(option,
"[]")) {
2043 if (strstr(option,
"[]")) braticks =
kTRUE;
2046 if (strchr(option,
'z')) endLines =
kFALSE;
2047 if (strchr(option,
'Z')) endLines =
kFALSE;
2048 const char *arrowOpt = 0;
2049 if (strchr(option,
'>')) arrowOpt =
">";
2050 if (strstr(option,
"|>")) arrowOpt =
"|>";
2053 if (strchr(option,
'a')) axis =
kTRUE;
2054 if (strchr(option,
'A')) axis =
kTRUE;
2062 if (strchr(option,
'0')) option0 =
kTRUE;
2063 if (strchr(option,
'2')) option2 =
kTRUE;
2064 if (strchr(option,
'3')) option3 =
kTRUE;
2065 if (strchr(option,
'4')) {option3 =
kTRUE; option4 =
kTRUE;}
2066 if (strchr(option,
'5')) {option2 =
kTRUE; option5 =
kTRUE;}
2069 xline =
new Double_t[2*theNpoints];
2070 yline =
new Double_t[2*theNpoints];
2071 if (!xline || !yline) {
2072 Error(
"Paint",
"too many points, out of memory");
2079 theGraph->TAttLine::Modify();
2094 sbase = symbolsize*kBASEMARKER;
2098 if (mark >= 20 && mark <= 34) {
2107 tx =
gPad->PixeltoX(dxend) -
gPad->PixeltoX(0);
2108 ty =-
gPad->PixeltoY(dxend) +
gPad->PixeltoY(0);
2109 Float_t asize = 0.6*symbolsize*kBASEMARKER/
gPad->GetWh();
2112 for (
Int_t i=0;i<theNpoints;i++) {
2113 x =
gPad->XtoPad(theX[i]);
2114 y =
gPad->YtoPad(theY[i]);
2117 if (x < gPad->GetUxmin()) x =
gPad->GetUxmin();
2118 if (x >
gPad->GetUxmax()) x =
gPad->GetUxmax();
2119 if (y < gPad->GetUymin()) y =
gPad->GetUymin();
2120 if (y >
gPad->GetUymax()) y =
gPad->GetUymax();
2122 if (x < gPad->GetUxmin())
continue;
2123 if (x >
gPad->GetUxmax())
continue;
2124 if (y < gPad->GetUymin())
continue;
2125 if (y >
gPad->GetUymax())
continue;
2129 xl2 =
gPad->XtoPad(theX[i] - theEXlow[i]);
2133 x1b =
gPad->XtoPad(theX[i] - theEXlow[i]);
2134 y1b =
gPad->YtoPad(theY[i] - theEYlow[i]);
2135 x2b =
gPad->XtoPad(theX[i] + theEXhigh[i]);
2136 y2b =
gPad->YtoPad(theY[i] + theEYhigh[i]);
2137 if (x1b < gPad->GetUxmin()) x1b =
gPad->GetUxmin();
2138 if (x1b >
gPad->GetUxmax()) x1b =
gPad->GetUxmax();
2139 if (y1b < gPad->GetUymin()) y1b =
gPad->GetUymin();
2140 if (y1b >
gPad->GetUymax()) y1b =
gPad->GetUymax();
2141 if (x2b < gPad->GetUxmin()) x2b =
gPad->GetUxmin();
2142 if (x2b >
gPad->GetUxmax()) x2b =
gPad->GetUxmax();
2143 if (y2b < gPad->GetUymin()) y2b =
gPad->GetUymin();
2144 if (y2b >
gPad->GetUymax()) y2b =
gPad->GetUymax();
2145 if (option5) box.
PaintBox(x1b, y1b, x2b, y2b,
"l");
2146 else box.
PaintBox(x1b, y1b, x2b, y2b);
2154 yline[if1-1] =
gPad->YtoPad(theY[i] + theEYhigh[i]);
2155 yline[if2-1] =
gPad->YtoPad(theY[i] - theEYlow[i]);
2163 arrow.
PaintArrow(xl1,y,xl2,y,asize,arrowOpt);
2165 if (!brackets)
gPad->PaintLine(xl1,y,xl2,y);
2168 xb[0] = xl2+tx; yb[0] = y-ty;
2169 xb[1] = xl2; yb[1] = y-ty;
2170 xb[2] = xl2; yb[2] = y+ty;
2171 xb[3] = xl2+tx; yb[3] = y+ty;
2172 gPad->PaintPolyLine(4, xb, yb);
2174 gPad->PaintLine(xl2,y-ty,xl2,y+ty);
2180 xr2 =
gPad->XtoPad(theX[i] + theEXhigh[i]);
2183 arrow.
PaintArrow(xr1,y,xr2,y,asize,arrowOpt);
2185 if (!brackets)
gPad->PaintLine(xr1,y,xr2,y);
2188 xb[0] = xr2-tx; yb[0] = y-ty;
2189 xb[1] = xr2; yb[1] = y-ty;
2190 xb[2] = xr2; yb[2] = y+ty;
2191 xb[3] = xr2-tx; yb[3] = y+ty;
2192 gPad->PaintPolyLine(4, xb, yb);
2194 gPad->PaintLine(xr2,y-ty,xr2,y+ty);
2200 yup2 =
gPad->YtoPad(theY[i] + theEYhigh[i]);
2201 if (yup2 >
gPad->GetUymax()) yup2 =
gPad->GetUymax();
2204 arrow.
PaintArrow(x,yup1,x,yup2,asize,arrowOpt);
2206 if (!brackets)
gPad->PaintLine(x,yup1,x,yup2);
2209 xb[0] = x-tx; yb[0] = yup2-ty;
2210 xb[1] = x-tx; yb[1] = yup2;
2211 xb[2] = x+tx; yb[2] = yup2;
2212 xb[3] = x+tx; yb[3] = yup2-ty;
2213 gPad->PaintPolyLine(4, xb, yb);
2215 gPad->PaintLine(x-tx,yup2,x+tx,yup2);
2221 ylow2 =
gPad->YtoPad(theY[i] - theEYlow[i]);
2222 if (ylow2 < gPad->GetUymin()) ylow2 =
gPad->GetUymin();
2223 if (ylow2 < ylow1) {
2225 arrow.
PaintArrow(x,ylow1,x,ylow2,asize,arrowOpt);
2227 if (!brackets)
gPad->PaintLine(x,ylow1,x,ylow2);
2230 xb[0] = x-tx; yb[0] = ylow2+ty;
2231 xb[1] = x-tx; yb[1] = ylow2;
2232 xb[2] = x+tx; yb[2] = ylow2;
2233 xb[3] = x+tx; yb[3] = ylow2+ty;
2234 gPad->PaintPolyLine(4, xb, yb);
2236 gPad->PaintLine(x-tx,ylow2,x+tx,ylow2);
2250 if (option4)
PaintGraph(theGraph, 2*theNpoints, xline, yline,
"FC");
2251 else PaintGraph(theGraph, 2*theNpoints, xline, yline,
"F");
2252 gPad->SetLogx(logx);
2253 gPad->SetLogy(logy);
2272 const Int_t kBASEMARKER=8;
2273 Double_t s2x, s2y, symbolsize, sbase;
2274 Double_t x,
y, xl1, xl2, xr1, xr2, yup1, yup2, ylow1, ylow2, tx, ty;
2276 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};
2277 static Float_t cyy[15] = {1,1,1,1,1,1,1,1,1,0.5,0.6,1,1,1,1};
2290 if (strchr(option,
'X') || strchr(option,
'x')) {
PaintGraphSimple(theGraph, option);
return;}
2293 if (strstr(option,
"||") || strstr(option,
"[]")) {
2295 if (strstr(option,
"[]")) braticks =
kTRUE;
2298 if (strchr(option,
'z')) endLines =
kFALSE;
2299 if (strchr(option,
'Z')) endLines =
kFALSE;
2300 const char *arrowOpt = 0;
2301 if (strchr(option,
'>')) arrowOpt =
">";
2302 if (strstr(option,
"|>")) arrowOpt =
"|>";
2305 if (strchr(option,
'a')) axis =
kTRUE;
2306 if (strchr(option,
'A')) axis =
kTRUE;
2314 if (strchr(option,
'0')) option0 =
kTRUE;
2315 if (strchr(option,
'2')) option2 =
kTRUE;
2316 if (strchr(option,
'3')) option3 =
kTRUE;
2317 if (strchr(option,
'4')) {option3 =
kTRUE; option4 =
kTRUE;}
2318 if (strchr(option,
'5')) {option2 =
kTRUE; option5 =
kTRUE;}
2321 xline =
new Double_t[2*theNpoints];
2322 yline =
new Double_t[2*theNpoints];
2323 if (!xline || !yline) {
2324 Error(
"Paint",
"too many points, out of memory");
2331 theGraph->TAttLine::Modify();
2346 sbase = symbolsize*kBASEMARKER;
2350 if (mark >= 20 && mark <= 34) {
2359 tx =
gPad->PixeltoX(dxend) -
gPad->PixeltoX(0);
2360 ty =-
gPad->PixeltoY(dxend) +
gPad->PixeltoY(0);
2361 Float_t asize = 0.6*symbolsize*kBASEMARKER/
gPad->GetWh();
2364 for (
Int_t i=0;i<theNpoints;i++) {
2365 x =
gPad->XtoPad(theX[i]);
2366 y =
gPad->YtoPad(theY[i]);
2367 bxl =
gPad->YtoPad(theY[i]+theEXlowd[i]);
2368 bxh =
gPad->YtoPad(theY[i]+theEXhighd[i]);
2369 byl =
gPad->XtoPad(theX[i]+theEYlowd[i]);
2370 byh =
gPad->XtoPad(theX[i]+theEYhighd[i]);
2373 if (x < gPad->GetUxmin()) x =
gPad->GetUxmin();
2374 if (x >
gPad->GetUxmax()) x =
gPad->GetUxmax();
2375 if (y < gPad->GetUymin()) y =
gPad->GetUymin();
2376 if (y >
gPad->GetUymax()) y =
gPad->GetUymax();
2378 if (x < gPad->GetUxmin())
continue;
2379 if (x >
gPad->GetUxmax())
continue;
2380 if (y < gPad->GetUymin())
continue;
2381 if (y >
gPad->GetUymax())
continue;
2387 x1b =
gPad->XtoPad(theX[i] - theEXlow[i]);
2388 y1b =
gPad->YtoPad(theY[i] - theEYlow[i]);
2389 x2b =
gPad->XtoPad(theX[i] + theEXhigh[i]);
2390 y2b =
gPad->YtoPad(theY[i] + theEYhigh[i]);
2391 if (x1b < gPad->GetUxmin()) x1b =
gPad->GetUxmin();
2392 if (x1b >
gPad->GetUxmax()) x1b =
gPad->GetUxmax();
2393 if (y1b < gPad->GetUymin()) y1b =
gPad->GetUymin();
2394 if (y1b >
gPad->GetUymax()) y1b =
gPad->GetUymax();
2395 if (x2b < gPad->GetUxmin()) x2b =
gPad->GetUxmin();
2396 if (x2b >
gPad->GetUxmax()) x2b =
gPad->GetUxmax();
2397 if (y2b < gPad->GetUymin()) y2b =
gPad->GetUymin();
2398 if (y2b >
gPad->GetUymax()) y2b =
gPad->GetUymax();
2399 if (option5) box.
PaintBox(x1b, y1b, x2b, y2b,
"l");
2400 else box.
PaintBox(x1b, y1b, x2b, y2b);
2408 yline[if1-1] =
gPad->YtoPad(theY[i] + theEYhigh[i]);
2409 yline[if2-1] =
gPad->YtoPad(theY[i] - theEYlow[i]);
2416 xl2 =
gPad->XtoPad(theX[i] - theEXlow[i]);
2419 arrow.
PaintArrow(xl1,y,xl2,bxl,asize,arrowOpt);
2421 if (!brackets)
gPad->PaintLine(xl1,y,xl2,bxl);
2424 xb[0] = xl2+tx; yb[0] = bxl-ty;
2425 xb[1] = xl2; yb[1] = bxl-ty;
2426 xb[2] = xl2; yb[2] = bxl+ty;
2427 xb[3] = xl2+tx; yb[3] = bxl+ty;
2428 gPad->PaintPolyLine(4, xb, yb);
2430 gPad->PaintLine(xl2,bxl-ty,xl2,bxl+ty);
2436 xr2 =
gPad->XtoPad(theX[i] + theEXhigh[i]);
2439 arrow.
PaintArrow(xr1,y,xr2,bxh,asize,arrowOpt);
2441 if (!brackets)
gPad->PaintLine(xr1,y,xr2,bxh);
2444 xb[0] = xr2-tx; yb[0] = bxh-ty;
2445 xb[1] = xr2; yb[1] = bxh-ty;
2446 xb[2] = xr2; yb[2] = bxh+ty;
2447 xb[3] = xr2-tx; yb[3] = bxh+ty;
2448 gPad->PaintPolyLine(4, xb, yb);
2450 gPad->PaintLine(xr2,bxh-ty,xr2,bxh+ty);
2456 yup2 =
gPad->YtoPad(theY[i] + theEYhigh[i]);
2457 if (yup2 >
gPad->GetUymax()) yup2 =
gPad->GetUymax();
2460 arrow.
PaintArrow(x,yup1,byh,yup2,asize,arrowOpt);
2462 if (!brackets)
gPad->PaintLine(x,yup1,byh,yup2);
2465 xb[0] = byh-tx; yb[0] = yup2-ty;
2466 xb[1] = byh-tx; yb[1] = yup2;
2467 xb[2] = byh+tx; yb[2] = yup2;
2468 xb[3] = byh+tx; yb[3] = yup2-ty;
2469 gPad->PaintPolyLine(4, xb, yb);
2471 gPad->PaintLine(byh-tx,yup2,byh+tx,yup2);
2477 ylow2 =
gPad->YtoPad(theY[i] - theEYlow[i]);
2478 if (ylow2 < gPad->GetUymin()) ylow2 =
gPad->GetUymin();
2479 if (ylow2 < ylow1) {
2481 arrow.
PaintArrow(x,ylow1,byl,ylow2,asize,arrowOpt);
2483 if (!brackets)
gPad->PaintLine(x,ylow1,byl,ylow2);
2486 xb[0] = byl-tx; yb[0] = ylow2+ty;
2487 xb[1] = byl-tx; yb[1] = ylow2;
2488 xb[2] = byl+tx; yb[2] = ylow2;
2489 xb[3] = byl+tx; yb[3] = ylow2+ty;
2490 gPad->PaintPolyLine(4, xb, yb);
2492 gPad->PaintLine(byl-tx,ylow2,byl+tx,ylow2);
2506 if (option4)
PaintGraph(theGraph, 2*theNpoints, xline, yline,
"FC");
2507 else PaintGraph(theGraph, 2*theNpoints, xline, yline,
"F");
2508 gPad->SetLogx(logx);
2509 gPad->SetLogy(logy);
2528 const Int_t kBASEMARKER=8;
2529 Double_t s2x, s2y, symbolsize, sbase;
2530 Double_t x,
y,
ex,
ey, xl1, xl2, xr1, xr2, yup1, yup2, ylow1, ylow2, tx, ty;
2531 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};
2532 static Float_t cyy[15] = {1,1,1,1,1,1,1,1,1,0.5,0.6,1,1,1,1};
2539 if (strchr(option,
'X') || strchr(option,
'x')) {
PaintGraphSimple(theGraph, option);
return;}
2542 if (strstr(option,
"||") || strstr(option,
"[]")) {
2544 if (strstr(option,
"[]")) braticks =
kTRUE;
2547 if (strchr(option,
'z')) endLines =
kFALSE;
2548 if (strchr(option,
'Z')) endLines =
kFALSE;
2549 const char *arrowOpt = 0;
2550 if (strchr(option,
'>')) arrowOpt =
">";
2551 if (strstr(option,
"|>")) arrowOpt =
"|>";
2554 if (strchr(option,
'a')) axis =
kTRUE;
2555 if (strchr(option,
'A')) axis =
kTRUE;
2563 if (strchr(option,
'0')) option0 =
kTRUE;
2564 if (strchr(option,
'2')) option2 =
kTRUE;
2565 if (strchr(option,
'3')) option3 =
kTRUE;
2566 if (strchr(option,
'4')) {option3 =
kTRUE; option4 =
kTRUE;}
2567 if (strchr(option,
'5')) {option2 =
kTRUE; option5 =
kTRUE;}
2570 xline =
new Double_t[2*theNpoints];
2571 yline =
new Double_t[2*theNpoints];
2572 if (!xline || !yline) {
2573 Error(
"Paint",
"too many points, out of memory");
2580 theGraph->TAttLine::Modify();
2595 sbase = symbolsize*kBASEMARKER;
2599 if (mark >= 20 && mark <= 34) {
2608 tx =
gPad->PixeltoX(dxend) -
gPad->PixeltoX(0);
2609 ty =-
gPad->PixeltoY(dxend) +
gPad->PixeltoY(0);
2610 Float_t asize = 0.6*symbolsize*kBASEMARKER/
gPad->GetWh();
2613 for (
Int_t i=0;i<theNpoints;i++) {
2614 x =
gPad->XtoPad(theX[i]);
2615 y =
gPad->YtoPad(theY[i]);
2618 if (x < gPad->GetUxmin()) x =
gPad->GetUxmin();
2619 if (x >
gPad->GetUxmax()) x =
gPad->GetUxmax();
2620 if (y < gPad->GetUymin()) y =
gPad->GetUymin();
2621 if (y >
gPad->GetUymax()) y =
gPad->GetUymax();
2623 if (x < gPad->GetUxmin())
continue;
2624 if (x >
gPad->GetUxmax())
continue;
2625 if (y < gPad->GetUymin())
continue;
2626 if (y >
gPad->GetUymax())
continue;
2634 x1b =
gPad->XtoPad(theX[i] - ex);
2635 y1b =
gPad->YtoPad(theY[i] - ey);
2636 x2b =
gPad->XtoPad(theX[i] + ex);
2637 y2b =
gPad->YtoPad(theY[i] + ey);
2638 if (x1b < gPad->GetUxmin()) x1b =
gPad->GetUxmin();
2639 if (x1b >
gPad->GetUxmax()) x1b =
gPad->GetUxmax();
2640 if (y1b < gPad->GetUymin()) y1b =
gPad->GetUymin();
2641 if (y1b >
gPad->GetUymax()) y1b =
gPad->GetUymax();
2642 if (x2b < gPad->GetUxmin()) x2b =
gPad->GetUxmin();
2643 if (x2b >
gPad->GetUxmax()) x2b =
gPad->GetUxmax();
2644 if (y2b < gPad->GetUymin()) y2b =
gPad->GetUymin();
2645 if (y2b >
gPad->GetUymax()) y2b =
gPad->GetUymax();
2646 if (option5) box.
PaintBox(x1b, y1b, x2b, y2b,
"l");
2647 else box.
PaintBox(x1b, y1b, x2b, y2b);
2655 yline[if1-1] =
gPad->YtoPad(theY[i] + ey);
2656 yline[if2-1] =
gPad->YtoPad(theY[i] - ey);
2663 xl2 =
gPad->XtoPad(theX[i] - ex);
2666 arrow.
PaintArrow(xl1,y,xl2,y,asize,arrowOpt);
2668 if (!brackets)
gPad->PaintLine(xl1,y,xl2,y);
2671 xb[0] = xl2+tx; yb[0] = y-ty;
2672 xb[1] = xl2; yb[1] = y-ty;
2673 xb[2] = xl2; yb[2] = y+ty;
2674 xb[3] = xl2+tx; yb[3] = y+ty;
2675 gPad->PaintPolyLine(4, xb, yb);
2677 gPad->PaintLine(xl2,y-ty,xl2,y+ty);
2683 xr2 =
gPad->XtoPad(theX[i] + ex);
2686 arrow.
PaintArrow(xr1,y,xr2,y,asize,arrowOpt);
2688 if (!brackets)
gPad->PaintLine(xr1,y,xr2,y);
2691 xb[0] = xr2-tx; yb[0] = y-ty;
2692 xb[1] = xr2; yb[1] = y-ty;
2693 xb[2] = xr2; yb[2] = y+ty;
2694 xb[3] = xr2-tx; yb[3] = y+ty;
2695 gPad->PaintPolyLine(4, xb, yb);
2697 gPad->PaintLine(xr2,y-ty,xr2,y+ty);
2703 yup2 =
gPad->YtoPad(theY[i] + ey);
2704 if (yup2 >
gPad->GetUymax()) yup2 =
gPad->GetUymax();
2707 arrow.
PaintArrow(x,yup1,x,yup2,asize,arrowOpt);
2709 if (!brackets)
gPad->PaintLine(x,yup1,x,yup2);
2712 xb[0] = x-tx; yb[0] = yup2-ty;
2713 xb[1] = x-tx; yb[1] = yup2;
2714 xb[2] = x+tx; yb[2] = yup2;
2715 xb[3] = x+tx; yb[3] = yup2-ty;
2716 gPad->PaintPolyLine(4, xb, yb);
2718 gPad->PaintLine(x-tx,yup2,x+tx,yup2);
2724 ylow2 =
gPad->YtoPad(theY[i] - ey);
2725 if (ylow2 < gPad->GetUymin()) ylow2 =
gPad->GetUymin();
2726 if (ylow2 < ylow1) {
2728 arrow.
PaintArrow(x,ylow1,x,ylow2,asize,arrowOpt);
2730 if (!brackets)
gPad->PaintLine(x,ylow1,x,ylow2);
2733 xb[0] = x-tx; yb[0] = ylow2+ty;
2734 xb[1] = x-tx; yb[1] = ylow2;
2735 xb[2] = x+tx; yb[2] = ylow2;
2736 xb[3] = x+tx; yb[3] = ylow2+ty;
2737 gPad->PaintPolyLine(4, xb, yb);
2739 gPad->PaintLine(x-tx,ylow2,x+tx,ylow2);
2753 if (option4)
PaintGraph(theGraph, 2*theNpoints, xline, yline,
"FC");
2754 else PaintGraph(theGraph, 2*theNpoints, xline, yline,
"F");
2755 gPad->SetLogx(logx);
2756 gPad->SetLogy(logy);
2770 Double_t rwrmin, rwrmax, rwtmin, rwtmax;
2774 Int_t theNpoints = theGraphPolar->
GetN();
2780 if (theNpoints<1)
return;
2795 if (thePolargram)
if (!
gPad->FindObject(thePolargram->
GetName())) thePolargram=0;
2796 if (!thePolargram) {
2799 while (
TObject* AnyObj = padObjIter.Next()) {
2800 if (
TString(AnyObj->ClassName()).CompareTo(
"TGraphPolargram",
2809 if (!thePolargram) {
2811 rwrmin = theY[0]; rwrmax = theY[theNpoints-1];
2812 rwtmin = theX[0]; rwtmax = theX[theNpoints-1];
2814 for (ipt = 0; ipt < theNpoints; ipt++) {
2817 if (theX[ipt] -theEX[ipt] < rwtmin) rwtmin = theX[ipt]-theEX[ipt];
2818 if (theX[ipt] +theEX[ipt] > rwtmax) rwtmax = theX[ipt]+theEX[ipt];
2820 if (theX[ipt] < rwtmin) rwtmin=theX[ipt];
2821 if (theX[ipt] > rwtmax) rwtmax=theX[ipt];
2824 if (theY[ipt] -theEY[ipt] < rwrmin) rwrmin = theY[ipt]-theEY[ipt];
2825 if (theY[ipt] +theEY[ipt] > rwrmax) rwrmax = theY[ipt]+theEY[ipt];
2827 if (theY[ipt] < rwrmin) rwrmin=theY[ipt];
2828 if (theY[ipt] > rwrmax) rwrmax=theY[ipt];
2832 if (rwrmin == rwrmax) rwrmax += 1.;
2833 if (rwtmin == rwtmax) rwtmax += 1.;
2840 rwtmax += dt/theNpoints;
2842 rwrmin = thePolargram->
GetRMin();
2843 rwrmax = thePolargram->
GetRMax();
2844 rwtmin = thePolargram->
GetTMin();
2845 rwtmax = thePolargram->
GetTMax();
2850 thePolargram =
new TGraphPolargram(
"Polargram",rwrmin,rwrmax,rwtmin,rwtmax);
2854 if (nolabel) thePolargram->
Draw(
"N");
2855 else thePolargram->
Draw(
"");
2864 Double_t radiusNDC = rwrmax-rwrmin;
2871 for (i=0; i<theNpoints; i++) {
2872 Double_t eymin, eymax, exmin,exmax;
2873 exmin = (theY[i]-theEY[i]-rwrmin)/radiusNDC*
2875 eymin = (theY[i]-theEY[i]-rwrmin)/radiusNDC*
2877 exmax = (theY[i]+theEY[i]-rwrmin)/radiusNDC*
2879 eymax = (theY[i]+theEY[i]-rwrmin)/radiusNDC*
2881 theGraphPolar->TAttLine::Modify();
2882 if (exmin != exmax || eymin != eymax)
gPad->PaintLine(exmin,eymin,exmax,eymax);
2886 for (i=0; i<theNpoints; i++) {
2887 Double_t rad = (theY[i]-rwrmin)/radiusNDC;
2890 theGraphPolar->TAttLine::Modify();
2891 if (phimin != phimax) thePolargram->
PaintCircle(0,0,rad,phimin,phimax,0);
2897 if (!(
gPad->GetLogx()) && !(
gPad->GetLogy())) {
2898 Double_t a,
b,
c=1,
x1,
x2, y1, y2, discr, norm1, norm2, xts, yts;
2904 for (i=0; i<theNpoints; i++) {
2905 if (thePolargram->
IsRadian()) {c=1;}
2910 xt = (theY[i]-rwrmin)/radiusNDC*
TMath::Cos(c*(theX[i]-rwtmin)/thetaNDC);
2911 yt = (theY[i]-rwrmin)/radiusNDC*
TMath::Sin(c*(theX[i]-rwtmin)/thetaNDC);
2912 norm =
sqrt(xt*xt+yt*yt);
2917 if (!previouspointin) {
2922 a = (yt-yts)/(xt-xts);
2924 discr = 4*(a*a-b*b+1);
2925 x1 = (-2*a*b+
sqrt(discr))/(2*(a*a+1));
2926 x2 = (-2*a*b-
sqrt(discr))/(2*(a*a+1));
2929 norm1 =
sqrt((
x1-xt)*(
x1-xt)+(y1-yt)*(y1-yt));
2930 norm2 =
sqrt((x2-xt)*(x2-xt)+(y2-yt)*(y2-yt));
2931 previouspointin =
kFALSE;
2933 if (norm1 < norm2) {
2943 PaintGraph(theGraphPolar, j+1, theXpol, theYpol, opt);
2948 if (j>=1 && !previouspointin) {
2949 a = (yt-theYpol[j])/(xt-theXpol[j]);
2950 b = theYpol[j]-a*theXpol[j];
2951 previouspointin =
kTRUE;
2952 discr = 4*(a*a-b*b+1);
2953 x1 = (-2*a*b+
sqrt(discr))/(2*(a*a+1));
2954 x2 = (-2*a*b-
sqrt(discr))/(2*(a*a+1));
2957 norm1 =
sqrt((
x1-xt)*(
x1-xt)+(y1-yt)*(y1-yt));
2958 norm2 =
sqrt((x2-xt)*(x2-xt)+(y2-yt)*(y2-yt));
2960 if (norm1 < norm2) {
2967 PaintGraph(theGraphPolar, j+1, theXpol, theYpol, opt);
2974 PaintGraph(theGraphPolar, j+1, theXpol, theYpol, opt);
2977 for (i=0; i<theNpoints; i++) {
2981 PaintGraph(theGraphPolar, theNpoints, theXpol, theYpol,opt);
2990 TIter next(
gPad->GetListOfPrimitives());
2991 while ((obj = next())) {
2994 if (title->GetName())
2995 if (strcmp(title->GetName(),
"title")) {title = 0;
continue;}
2999 if (title)
delete title;
3005 if (ht <= 0) ht = 0.05;
3020 if (wt > 0) title->SetX2NDC(title->GetX1NDC()+wt);
3026 if (talh < 1) talh = 1;
else if (talh > 3) talh = 3;
3028 if (talv < 1) talv = 1;
else if (talv > 3) talv = 3;
3034 if (talh == 2) xpos = xpos-wt/2.;
3035 if (talh == 3) xpos = xpos-wt;
3036 if (talv == 2) ypos = ypos+ht/2.;
3037 if (talv == 1) ypos = ypos+ht;
3070 TF1 *theF = theGraphQQ->
GetF();
3073 Error(
"TGraphQQ::Paint",
"2nd dataset or theoretical function not specified");
3088 Double_t yxmin, xymin, yxmax, xymax;
3094 TLine line1, line2, line3;
3097 yxmin = (theYq2-theYq1)*(xmin-theXq1)/(theXq2-theXq1) + theYq1;
3099 xymin = (theXq2-theXq1)*(ymin-theYq1)/(theYq2-theYq1) + theXq1;
3100 line1.
PaintLine(xymin, ymin, xqmin, yqmin);
3103 line1.
PaintLine(xmin, yxmin, xqmin, yqmin);
3105 line2.
PaintLine(xqmin, yqmin, xqmax, yqmax);
3107 yxmax = (theYq2-theYq1)*(xmax-theXq1)/(theXq2-theXq1) + theYq1;
3109 xymax = (theXq2-theXq1)*(ymax-theYq1)/(theYq2-theYq1) + theXq1;
3110 line3.
PaintLine(xqmax, yqmax, xymax, ymax);
3113 line3.
PaintLine(xqmax, yqmax, xmax, yxmax);
3123 if (strstr(option,
"H") || strstr(option,
"h")) {
3132 if (!functions)
return;
3168 Double_t x1,
x2, y1, y2,
x3, y3, xm, ym,
a, a1, a2, a3;
3171 Int_t ix1,iy1,ix2,iy2;
3175 gPad->GetPadPar(x1p,y1p,x2p,y2p);
3176 ix1 = (
Int_t)(iw*x1p);
3177 iy1 = (
Int_t)(ih*y1p);
3178 ix2 = (
Int_t)(iw*x2p);
3179 iy2 = (
Int_t)(ih*y2p);
3191 gPad->GetRange(rx1,ry1,rx2,ry2);
3192 Double_t rx = (x2ndc-x1ndc)/(rx2-rx1);
3193 Double_t ry = (y2ndc-y1ndc)/(ry2-ry1);
3197 xf[0] = rx*(
x[0]-rx1)+x1ndc;
3198 yf[0] = ry*(y[0]-ry1)+y1ndc;
3200 for (i=1; i<
n; i++) {
3201 if (
x[i]==
x[i-1] && y[i]==y[i-1])
continue;
3203 xf[nf] = rx*(
x[i]-rx1)+x1ndc;
3204 if (xf[i]==xf[i-1]) xf[i] += 0.000001;
3205 yf[nf] = ry*(y[i]-ry1)+y1ndc;
3224 if (xf[nf]==xf[nf-1]) {
3227 a =
TMath::ATan((yf[nf]-yf[nf-1])/(xf[nf]-xf[nf-1]));
3229 if (xf[nf]>=xf[nf-1]) {
3238 for (i=1; i<nf; i++) {
3250 if (xi1<xi0) a1 = a1+3.14159;
3256 if (xi0<xi2) a2 = a2+3.14159;
3271 if ((xm-xi0)*(x3-xi0)<0 && (ym-yi0)*(y3-yi0)<0) {
3275 if ((xm==x1) && (ym==y1)) {
3284 if (xf[nf]==xf[0] && yf[nf]==yf[0]) {
3285 xm = (xt[nf]+xt[0])*0.5;
3286 ym = (yt[nf]+yt[0])*0.5;
3294 if ((xm-xf[0])*(x3-xf[0])<0 && (ym-yf[0])*(y3-yf[0])<0) {
3308 for (i=nf2; i>0; i--) {
3309 for (j=i-1; j>0; j--) {
3310 if (xt[i-1]==xt[i] || xt[j-1]==xt[j])
continue;
3311 c1 = (yt[i-1]-yt[i])/(xt[i-1]-xt[i]);
3312 b1 = yt[i]-c1*xt[i];
3313 c2 = (yt[j-1]-yt[j])/(xt[j-1]-xt[j]);
3314 b2 = yt[j]-c2*xt[j];
3316 xc = (b2-b1)/(c1-c2);
3322 nf++; xf[nf] = xt[i]; yf[nf] = yt[i];
3323 nf++; xf[nf] = xc ; yf[nf] = yc;
3341 nf++; xf[nf] = xt[0]; yf[nf] = yt[0];
3344 for (i=0; i<nf+1; i++) {
3345 xf[i] = (1/rx)*(xf[i]-x1ndc)+rx1;
3346 yf[i] = (1/ry)*(yf[i]-y1ndc)+ry1;
3350 gPad->PaintFillArea(nf+1,xf,yf);
3351 theGraph->TAttLine::Modify();
3369 TIter next(functions);
3371 while ((obj = next())) {
3381 if (!dofit) fit = 0;
3383 if (dofit == 1) dofit = 111;
3385 Int_t print_fval = dofit%10;
3386 Int_t print_ferrors = (dofit/10)%10;
3387 Int_t print_fchi2 = (dofit/100)%10;
3388 Int_t print_fprob = (dofit/1000)%10;
3389 Int_t nlinesf = print_fval + print_fchi2 + print_fprob;
3390 if (fit) nlinesf += fit->
GetNpar();
3428 if (print_fchi2) stats->
AddText(t);
3434 if (print_fval || print_ferrors) {
3436 if (print_ferrors) {
3449 if (!done) functions->
Add(stats);
3479 Int_t i, k, kp, km, npointsMax, banksize, n2, npt;
3480 Int_t maxiterations, finished;
3481 Int_t jtype, ktype, closed;
3482 Double_t sxmin, sxmax, symin, symax;
3485 Double_t ratio_signs, xratio, yratio;
3491 Double_t co, so, ct, st, ctu, stu, xnt;
3492 Double_t dx1, dy1, dx2, dy2, dk1, dk2;
3499 c = t = co = so = ct = st = ctu = stu = dx1 = dy1 = dx2 = dy2 = 0;
3500 xt = yt = xa = xb = ya = yb = u1 = u2 = u3 = tj = sb = 0;
3502 npointsMax = npoints*10;
3509 Error(
"Smooth",
"not enough space in memory");
3516 jtype = (drawtype%1000)-10;
3517 if (jtype > 0) { ktype = jtype; loptx =
kTRUE; }
3518 else ktype = drawtype%1000;
3547 for (i=1;i<npoints;i++) {
3549 if ((
x[i]-
x[i-1])*(
x[i-1]-
x[i-2]) < 0) six++;
3550 if ((
y[i]-
y[i-1])*(
y[i-1]-
y[i-2]) < 0) siy++;
3552 if (
x[i] < sxmin) sxmin =
x[i];
3553 if (
x[i] > sxmax) sxmax =
x[i];
3554 if (
y[i] < symin) symin =
y[i];
3555 if (
y[i] > symax) symax =
y[i];
3560 if (dx1n < 0.01*(sxmax-sxmin) && dy1n < 0.01*(symax-symin)) closed = 1;
3561 if (sxmin == sxmax) {
3564 if (six > 1) ratio_signs = siy/six;
3565 else ratio_signs = 20;
3566 xratio = ratio_signs/(sxmax-sxmin);
3568 if (symin == symax) yratio = 1;
3569 else yratio = 1/(symax-symin);
3573 for (i=0;i<npoints;i++) {
3574 x[i] = (
x[i]-sxmin)*xratio;
3575 y[i] = (
y[i]-symin)*yratio;
3594 if (
x[0] !=
x[npoints-1] ||
y[0] !=
y[npoints-1])
goto L40;
3595 if (
x[npoints-2] ==
x[npoints-1] &&
y[npoints-2] ==
y[npoints-1])
goto L40;
3596 if (
x[0] ==
x[1] &&
y[0] ==
y[1])
goto L40;
3619 if (npt > 1)
goto L310;
3623 if (
x[k-1] ==
x[k-2] &&
y[k-1] ==
y[k-2])
goto L50;
3628 if (npt > 1)
goto L310;
3631 if (k < npoints)
goto L90;
3632 if (!flgic) { kp = 2;
goto L130;}
3635 if (flgis)
goto L150;
3645 if (
x[k-1] ==
x[k] &&
y[k-1] ==
y[k])
goto L80;
3653 if (!flgis)
goto L50;
3668 dx1 =
x[k-1] -
x[km-1];
3669 dy1 =
y[k-1] -
y[km-1];
3670 dk1 = dx1*dx1 + dy1*dy1;
3671 dx2 = x[kp-1] - x[k-1];
3672 dy2 = y[kp-1] - y[k-1];
3673 dk2 = dx2*dx2 + dy2*dy2;
3674 ctu = dx1*dk2 + dx2*dk1;
3675 stu = dy1*dk2 + dy2*dk1;
3676 xnt = ctu*ctu + stu*stu;
3690 if (flgis)
goto L160;
3694 w3 = 2*(dx1*dy2-dx2*dy1);
3706 w3 = 2*(dx1*dy2-dx2*dy1);
3715 if (k <= 1)
goto L120;
3745 xa = (a*t-2*dx)/tcube;
3746 xb = (3*dx-(co+
a)*t)/tsquare;
3747 ya = (b*t-2*dy)/tcube;
3748 yb = (3*dy-(so+
b)*t)/tsquare;
3779 p2 = (u1*tj-u3)*3*tj+u2;
3809 z = s*sth*(s-s*sth)*(w1*sth+w1+w2);
3810 z = z*z/((a*a+b*
b)*(delta*delta));
3811 z = (z+2.642937)*z/((.3715652*z+3.063444)*z+.2441889)-cc;
3815 if (iw > 0)
goto L250;
3816 if (z > err)
goto L240;
3821 if (iw+2 == 0)
goto L190;
3822 if (iw+2 > 0)
goto L290;
3840 theGraph->
Zero(kp,0,sb,err,s,z,maxiterations);
3841 if (kp == 2)
goto L210;
3843 Error(
"Smooth",
"Attempt to plot outside plot limits");
3846 if (iw > 0)
goto L200;
3872 qlx[npt] = sxmin + xt/xratio;
3873 qly[npt] = symin + yt/yratio;
3880 if (npt < banksize)
goto L320;
3881 if (drawtype >= 1000 || ktype > 1) {
3882 Int_t newsize = banksize + n2;
3884 for (i=0;i<banksize;i++) qtemp[i] = qlx[i];
3887 for (i=0;i<banksize;i++) qlx[i] = qtemp[i];
3888 for (i=0;i<banksize;i++) qtemp[i] = qly[i];
3891 for (i=0;i<banksize;i++) qly[i] = qtemp[i];
3900 if (drawtype >= 1000) {
3901 gPad->PaintFillArea(npt,qlx,qly,
"B");
3905 qlx[npt] = qlx[npt-1];
3906 qlx[npt+1] = qlx[0];
3912 qly[npt] = qly[npt-1];
3913 qly[npt+1] = qly[0];
3915 gPad->PaintFillArea(npt+2,qlx,qly);
3918 gPad->PaintPolyLine(npt,qlx,qly);
3921 qlx[0] = sxmin + xt/xratio;
3922 qly[0] = symin + yt/yratio;
3924 if (finished > 0)
goto L390;
3925 if (finished < 0) { finished = 0;
goto L110;}
3926 if (s > 0)
goto L180;
3932 for (i=0;i<npoints;i++) {
3933 x[i] = sxmin + x[i]/xratio;
3934 y[i] = symin + y[i]/yratio;
virtual Bool_t IsEditable() const
virtual const char * GetName() const
Returns name of object.
virtual Double_t GetMaximumStored() const
virtual void SetLineWidth(Width_t lwidth)
Set the line width.
Color_t GetStatColor() const
double dist(Rotation3D const &r1, Rotation3D const &r2)
virtual Double_t GetMaximum(Double_t maxval=FLT_MAX) const
Return maximum value smaller than maxval of bins in the range, unless the value has been overridden b...
Style_t GetTitleFont(Option_t *axis="X") const
Return title font.
virtual void Paint(Option_t *option="")
Control routine to paint any kind of histograms.
Color_t GetLabelColor(Option_t *axis="X") const
Return the label color number in the axis.
void SetOptFit(Int_t fit=1)
Set the fit option.
virtual void SetName(const char *name="")
virtual void Draw(Option_t *option="")
Draw this pavetext with its current attributes.
virtual Double_t * GetEX() const
virtual void SetMaximum(Double_t maximum=-1111)
Float_t GetLabelSize(Option_t *axis="X") const
Return label size.
static double p3(double t, double a, double b, double c, double d)
virtual Int_t DistancetoPrimitiveHelper(TGraph *theGraph, Int_t px, Int_t py)
Compute distance from point px,py to a graph.
virtual void SetLimits(Double_t xmin, Double_t xmax)
virtual void ExecuteEventHelper(TGraph *theGraph, Int_t event, Int_t px, Int_t py)
Execute action corresponding to one event.
Color_t GetTitleTextColor() const
void PaintPolyLineHatches(TGraph *theGraph, Int_t n, const Double_t *x, const Double_t *y)
Paint a polyline with hatches on one side showing an exclusion zone.
void Smooth(TGraph *theGraph, Int_t npoints, Double_t *x, Double_t *y, Int_t drawtype)
Smooth a curve given by N points.
virtual Int_t DistancetoPrimitive(Int_t px, Int_t py)
Computes distance from point (px,py) to the object.
virtual void SetDirectory(TDirectory *dir)
By default when an histogram is created, it is added to the list of histogram objects in the current ...
static Int_t fgMaxPointsPerLine
Color_t GetAxisColor(Option_t *axis="X") const
Return the axis color number in the axis.
void PaintCircle(Double_t x, Double_t y, Double_t r, Double_t phimin, Double_t phimax, Double_t theta)
This is simplified from TEllipse::PaintEllipse.
virtual Double_t * GetEYlow() const
virtual Double_t GetMinimumStored() const
TString & ReplaceAll(const TString &s1, const TString &s2)
R__EXTERN TStyle * gStyle
Bool_t TestBit(UInt_t f) const
THist< 1, float, THistStatContent, THistStatUncertainty > TH1F
virtual Double_t * GetEXhighd() const
void Draw(Option_t *options="")
Draw Polargram.
TList * GetListOfFunctions() const
TAxis * GetYaxis() const
Get y axis of the graph.
virtual TText * AddText(Double_t x1, Double_t y1, const char *label)
Add a new Text line to this pavetext at given coordinates.
void ToUpper()
Change string to upper case.
virtual Double_t * GetEY() const
virtual void SetMinimum(Double_t minimum=-1111)
Float_t GetEndErrorSize() const
Option_t * GetOption() const
tomato 1-D histogram with a float per channel (see TH1 documentation)}
void PaintStats(TGraph *theGraph, TF1 *fit)
Paint the statistics box with the fit info.
Short_t Min(Short_t a, Short_t b)
void ToLower()
Change string to lower-case.
virtual void SetFillStyle(Style_t fstyle)
Set the fill area style.
void SetOptionAxis(Bool_t opt)
The histogram statistics painter class.
virtual Double_t GetParError(Int_t ipar) const
Return value of parameter number ipar.
void PaintGraphPolar(TGraph *theGraph, Option_t *option)
[Paint this TGraphPolar with its current attributes.]($GP04)
Float_t GetTitleY() const
static void SetMaxPointsPerLine(Int_t maxp=50)
Static function to set fgMaxPointsPerLine for graph painting.
virtual ~TGraphPainter()
Destructor.
void box(Int_t pat, Double_t x1, Double_t y1, Double_t x2, Double_t y2)
const char * GetFitFormat() const
virtual TVirtualPad * cd(Int_t subpadnumber=0)=0
virtual Width_t GetLineWidth() const
Return the line width.
Style_t GetLabelFont(Option_t *axis="X") const
Return label font.
Double_t Prob(Double_t chi2, Int_t ndf)
Computation of the probability for a certain Chi-squared (chi2) and number of degrees of freedom (ndf...
LongDouble_t Power(LongDouble_t x, LongDouble_t y)
void SetBit(UInt_t f, Bool_t set)
Set or unset the user status bits as specified in f.
Int_t GetOptFit() const
Return the fit option.
if object in a list can be deleted
This class allows to draw quantile-quantile plots.
TGraphPainter()
Default constructor.
virtual Style_t GetMarkerStyle() const
Return the marker style.
virtual void SetTextFont(Font_t tfont=62)
Set the text font.
virtual Int_t GetNDF() const
Return the number of degrees of freedom in the fit the fNDF parameter has been previously computed du...
static const double x2[5]
Double_t GetYsize()
Return size of the formula along Y in pad coordinates.
void PaintGraphAsymmErrors(TGraph *theGraph, Option_t *option)
Paint this TGraphAsymmErrors with its current attributes.
virtual void DrawPanelHelper(TGraph *theGraph)
Display a panel with all histogram drawing options.
Float_t GetTitleFontSize() const
static TVirtualPadEditor * GetPadEditor(Bool_t load=kTRUE)
Returns the pad editor dialog. Static method.
virtual void Paint(Option_t *option="")
Paint this pavetext with its current attributes.
virtual void SetStatFormat(const char *format="6.4g")
Change (i.e. set) the format for printing statistics.
To draw Mathematical Formula.
Double_t Log10(Double_t x)
void Zero(Int_t &k, Double_t AZ, Double_t BZ, Double_t E2, Double_t &X, Double_t &Y, Int_t maxiterations)
Find zero of a continuous function.
static double p2(double t, double a, double b, double c)
TGraphPolargram * GetPolargram()
virtual Size_t GetMarkerSize() const
Return the marker size.
virtual void Clear(Option_t *option="")
Clear all lines in this pavetext.
Base class for several text objects.
Float_t GetTitleX() const
Bool_t IsInside(T xp, T yp, Int_t np, T *x, T *y)
Float_t GetBarWidth() const
TVirtualPad is an abstract base class for the Pad and Canvas classes.
Style_t GetStatStyle() const
void SetLabelSize(Float_t labelsize)
virtual void SetTextAlign(Short_t align=11)
Set the text alignment.
virtual void PaintGrapHist(TGraph *theGraph, Int_t npoints, const Double_t *x, const Double_t *y, Option_t *chopt)
This is a service method used by THistPainter to paint 1D histograms.
virtual Option_t * GetDrawOption() const
Get option used by the graphics system to draw this object.
virtual char * GetObjectInfoHelper(TGraph *theGraph, Int_t px, Int_t py) const
virtual void PaintLine(Double_t x1, Double_t y1, Double_t x2, Double_t y2)
Draw this line with new coordinates.
virtual const char * GetParName(Int_t ipar) const
void PaintHelper(TGraph *theGraph, Option_t *option)
Paint a any kind of TGraph.
virtual Int_t DistancetoPrimitive(Int_t px, Int_t py)
Compute distance from point px,py to a line.
virtual Double_t * GetEYhighd() const
virtual void SetLineColor(Color_t lcolor)
Set the line color.
virtual void PaintAxis(Double_t xmin, Double_t ymin, Double_t xmax, Double_t ymax, Double_t &wmin, Double_t &wmax, Int_t &ndiv, Option_t *chopt="", Double_t gridlength=0, Bool_t drawGridOnly=kFALSE)
Control function to draw an axis.
void PaintGraphErrors(TGraph *theGraph, Option_t *option)
[Paint this TGraphErrors with its current attributes.]($GP03)
virtual TObject * First() const
Return the first object in the list. Returns 0 when list is empty.
Double_t GetXsize()
Return size of the formula along X in pad coordinates.
Float_t GetTitleH() const
void PaintGraphQQ(TGraph *theGraph, Option_t *option)
Paint this graphQQ. No options for the time being.
Style_t GetStatFont() const
virtual void SetFillColor(Color_t fcolor)
Set the fill area color.
virtual Bool_t InheritsFrom(const char *classname) const
Returns kTRUE if object inherits from class "classname".
void PaintGraphBentErrors(TGraph *theGraph, Option_t *option)
[Paint this TGraphBentErrors with its current attributes.]($GP03)
virtual void PaintArrow(Double_t x1, Double_t y1, Double_t x2, Double_t y2, Float_t arrowsize=0.05, Option_t *option=">")
Draw this arrow.
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
char * Form(const char *fmt,...)
virtual void SetMarkerStyle(Style_t mstyle=1)
Set the marker style.
static double p1(double t, double a, double b)
virtual void SetFitFormat(const char *format="5.4g")
Change (i.e. set) the format for printing fit parameters in statistics box.
virtual const char * GetFitFormat() const
don't draw the histogram title
if object destructor must call RecursiveRemove()
virtual void PaintBox(Double_t x1, Double_t y1, Double_t x2, Double_t y2, Option_t *option="")
Draw this box with new coordinates.
Double_t GetMaximum() const
Color_t GetTitleFillColor() const
virtual Double_t GetMinimum(Double_t minval=-FLT_MAX) const
Return minimum value larger than minval of bins in the range, unless the value has been overridden by...
TAxis * GetXaxis() const
Get x axis of the graph.
virtual Color_t GetLineColor() const
Return the line color.
virtual Double_t * GetEXlowd() const
void ComputeLogs(Int_t npoints, Int_t opt)
Compute the logarithm of global variables gxwork and gywork according to the value of Options and put...
Width_t GetTitleBorderSize() const
Float_t GetTitleW() const
Double_t GetChisquare() const
virtual void Paint(Option_t *option="")
This method must be overridden if a class wants to paint itself.
virtual Double_t * GetEYlowd() const
void SetLabelOffset(Float_t labeloffset)
static const double x1[5]
A Pave (see TPave) with text, lines or/and boxes inside.
TH1F * GetHistogram() const
Returns a pointer to the histogram used to draw the axis Takes into account the two following cases...
void SetDrawBorder(Int_t drawborder=1)
virtual Double_t * GetEXlow() const
Int_t GetDrawBorder() const
virtual Color_t GetFillColor() const
Return the fill area color.
Int_t DistancetoLine(Int_t px, Int_t py, Double_t xp1, Double_t yp1, Double_t xp2, Double_t yp2)
Compute distance from point px,py to a line.
Bool_t Contains(const char *pat, ECaseCompare cmp=kExact) const
you should not use this method at all Int_t Int_t Double_t Double_t Double_t e
Abstract base class used by ROOT graphics editor.
virtual void PaintGraph(TGraph *theGraph, Int_t npoints, const Double_t *x, const Double_t *y, Option_t *chopt)
[Control function to draw a graph.]($GP01)
Width_t GetStatBorderSize() const
virtual void SetLineStyle(Style_t lstyle)
Set the line style.
Mother of all ROOT objects.
you should not use this method at all Int_t Int_t z
TObject * GetObject() const
Float_t GetStatFontSize() const
virtual const char * GetTitle() const
Returns title of object.
virtual Int_t GetNpar() const
Float_t GetTickLength(Option_t *axis="X") const
Return tick length.
virtual void Add(TObject *obj)
virtual Double_t GetParameter(Int_t ipar) const
Short_t Max(Short_t a, Short_t b)
A Graph is a graphics object made of two arrays X and Y with npoints each.
you should not use this method at all Int_t Int_t Double_t Double_t Double_t Int_t Double_t Double_t Double_t Double_t b
void SetTickSize(Float_t ticksize)
Float_t GetLabelOffset(Option_t *axis="X") const
Return label offset.
Double_t * GetXpol()
Return points in polar coordinates.
virtual void SetTextColor(Color_t tcolor=1)
Set the text color.
virtual void SetHistogram(TH1F *h)
virtual void Paint(Option_t *option="")
Paint the pave stat.
Float_t GetBarOffset() const
Style_t GetTitleStyle() const
Double_t Sqrt(Double_t x)
virtual Style_t GetFillStyle() const
Return the fill area style.
virtual void SetTextSize(Float_t tsize=1)
Set the text size.
Color_t GetStatTextColor() const
virtual Double_t * GetEYhigh() const
virtual void ComputeRange(Double_t &xmin, Double_t &ymin, Double_t &xmax, Double_t &ymax) const
Compute the x/y range of the points in this graph.
Int_t GetNdivisions(Option_t *axis="X") const
Return number of divisions.
Draw all kinds of Arrows.
virtual const char * GetName() const
Returns name of object.
Double_t * GetYpol()
Return points in polar coordinates.
virtual void SetTitle(const char *title="")
Set the title of the TNamed.
Double_t GetMinimum() const
double norm(double *x, double *p)
virtual Double_t * GetEXhigh() const
void PaintGraphSimple(TGraph *theGraph, Option_t *option)
Paint a simple graph, without errors bars.
virtual void SetBorderSize(Int_t bordersize=4)
const char * GetStatFormat() const
virtual const char * GetTitle() const
Returns title of object.
void SetParent(TObject *obj)
void SetOptStat(Int_t stat=1)
Set the stat option.
Int_t GetOptTitle() const
static const double x3[11]
void SetPolargram(TGraphPolargram *p)