767 Error(
"TGaxis",
"calling constructor with an unknown function: %s", funcname);
801 fGridLength(ax.fGridLength),
802 fTickSize(ax.fTickSize),
803 fLabelOffset(ax.fLabelOffset),
804 fLabelSize(ax.fLabelSize),
805 fTitleOffset(ax.fTitleOffset),
806 fTitleSize(ax.fTitleSize),
808 fLabelColor(ax.fLabelColor),
809 fLabelFont(ax.fLabelFont),
810 fNModLabs(ax.fNModLabs),
814 fTimeFormat(ax.fTimeFormat),
815 fFunctionName(ax.fFunctionName),
816 fFunction(ax.fFunction),
833 TAttText::operator=(ax);
1014 const char *where =
"PaintAxis";
1016 Double_t alfa, beta, ratio1, ratio2, grid_side;
1024 Double_t phil, phi, sinphi, cosphi;
1025 Double_t binLow = 0., binLow2 = 0., binLow3 = 0.;
1026 Double_t binHigh = 0., binHigh2 = 0., binHigh3 = 0.;
1027 Double_t binWidth = 0., binWidth2 = 0., binWidth3 = 0.;
1032 Double_t wlabel, dwlabel, axis_value;
1038 xx0 = xx1 = yy0 = yy1 = 0;
1039 Double_t xxmin, xxmax, yymin, yymax;
1040 xxmin = xxmax = yymin = yymax = 0;
1044 Double_t xmnlog, x00, x11, h2, h2sav, axmul,
y;
1047 Int_t nlabels, nticks, nticks0, nticks1;
1048 Int_t i, j, k,
l, decade, ltick;
1052 Int_t iexe, if1, if2, na, nf, ih1, ih2, nbinin, nch, kmod;
1053 Int_t optionLog,optionBlank,optionVert,optionPlus,optionMinus,optionUnlab,optionPara;
1054 Int_t optionDown,optionRight,optionLeft,optionCent,optionEqual,optionDecimals=0,optionDot;
1055 Int_t optionY,optionText,optionGrid,optionSize,optionNoopt,optionInt,optionM,optionUp,optionX;
1056 Int_t optionTime, optionArrow;
1057 Int_t first=0,last=0,labelnumber;
1058 Int_t xalign, yalign;
1059 Int_t nn1, nn2, nn3, n1a, n2a, n3a, nb2, nb3;
1060 Int_t nbins=10, n1aold, nn1old;
1062 n1aold = nn1old = 0;
1086 chtemp = &kchtemp[0];
1087 label = &chlabel[0];
1106 if(strchr(chopt,
'G')) optionLog = 1;
else optionLog = 0;
1107 if(strchr(chopt,
'B')) optionBlank= 1;
else optionBlank= 0;
1108 if(strchr(chopt,
'V')) optionVert = 1;
else optionVert = 0;
1109 if(strchr(chopt,
'+')) optionPlus = 1;
else optionPlus = 0;
1110 if(strchr(chopt,
'-')) optionMinus= 1;
else optionMinus= 0;
1111 if(strchr(chopt,
'U')) optionUnlab= 1;
else optionUnlab= 0;
1112 if(strchr(chopt,
'P')) optionPara = 1;
else optionPara = 0;
1113 if(strchr(chopt,
'O')) optionDown = 1;
else optionDown = 0;
1114 if(strchr(chopt,
'R')) optionRight= 1;
else optionRight= 0;
1115 if(strchr(chopt,
'L')) optionLeft = 1;
else optionLeft = 0;
1116 if(strchr(chopt,
'C')) optionCent = 1;
else optionCent = 0;
1117 if(strchr(chopt,
'=')) optionEqual= 1;
else optionEqual= 0;
1118 if(strchr(chopt,
'Y')) optionY = 1;
else optionY = 0;
1119 if(strchr(chopt,
'T')) optionText = 1;
else optionText = 0;
1120 if(strchr(chopt,
'W')) optionGrid = 1;
else optionGrid = 0;
1121 if(strchr(chopt,
'S')) optionSize = 1;
else optionSize = 0;
1122 if(strchr(chopt,
'N')) optionNoopt= 1;
else optionNoopt= 0;
1123 if(strchr(chopt,
'I')) optionInt = 1;
else optionInt = 0;
1124 if(strchr(chopt,
'M')) optionM = 1;
else optionM = 0;
1125 if(strchr(chopt,
'0')) optionUp = 1;
else optionUp = 0;
1126 if(strchr(chopt,
'X')) optionX = 1;
else optionX = 0;
1127 if(strchr(chopt,
't')) optionTime = 1;
else optionTime = 0;
1128 if(strchr(chopt,
'.')) optionDot = 1;
else optionDot = 0;
1135 if(strchr(chopt,
'>')) optionArrow = 1;
1136 if(strchr(chopt,
'<')) optionArrow = optionArrow+2;
1154 Error(where,
"Invalid number of divisions: %d",ndiv);
1161 if (gridlength == 0) gridlength = 0.8;
1191 Int_t year, mm, dd, hh, mi, ss;
1192 if (sscanf(stringtimeoffset.
Data(),
"%d-%d-%d %d:%d:%d", &year, &mm, &dd, &hh, &mi, &ss) == 6) {
1195 tp.tm_year = year-1900;
1209 TString sdp = stringtimeoffset(ids+1,lns);
1210 sscanf(sdp.
Data(),
"%g",&dp);
1214 Error(where,
"Time offset has not the right format");
1219 wmin += timeoffset - (
int)(timeoffset);
1220 wmax += timeoffset - (
int)(timeoffset);
1224 time_t timetp = (time_t)((
Long_t)(timeoffset));
1227 if (range>60) rangeBase = 60*20;
1228 if (range>3600) rangeBase = 3600*20;
1229 if (range>86400) rangeBase = 86400*20;
1230 if (range>2419200) rangeBase = 31556736;
1232 if (range>31536000) {
1233 tp0 = gmtime(&timetp);
1240 rangeBase = (timetp-mktime(tp0));
1241 rangeOffset = (
Double_t) (rangeBase);
1243 wmax += rangeOffset;
1244 wmin += rangeOffset;
1249 n2a = (ndiv%10000 - n1a)/100;
1250 n3a = (ndiv%1000000 - n2a -n1a)/10000;
1255 maxDigits = (ndiv/1000000);
1264 if (
wmin ==
wmax || ndiv == 0 || n1a <= 1 || optionLog) {
1270 if ( (
wmax-
wmin) < 1 && optionInt) {
1271 Error(where,
"option I not available");
1274 if (!optionNoopt || optionInt ) {
1282 if (binLow !=
Double_t(
int(binLow)) || binWidth !=
Double_t(
int(binWidth))) {
1286 if ((
wmin-binLow) > epsilon) { binLow += binWidth; nbins--; }
1287 if ((binHigh-
wmax) > epsilon) { binHigh -= binWidth; nbins--; }
1293 yymax = rtyw*(binHigh-
wmin) +
ymin;
1298 xxmax = rtxw*(binHigh-
wmin) +
xmin;
1306 yymin = alfa*xxmin + beta;
1307 yymax = alfa*xxmax + beta;
1322 if (!optionNoopt && n2a > 1 && binWidth > 0) {
1328 if (!optionNoopt && n3a > 1 && binWidth2 > 0) {
1342 ratio1 = 1/(rwxmax-rwxmin);
1343 ratio2 = 1/(rwymax-rwymin);
1344 x0 = ratio1*(
xmin-rwxmin);
1345 x1 = ratio1*(
xmax-rwxmin);
1346 y0 = ratio2*(
ymin-rwymin);
1347 y1 = ratio2*(
ymax-rwymin);
1348 if (!optionNoopt || optionInt ) {
1349 xx0 = ratio1*(xxmin-rwxmin);
1350 xx1 = ratio1*(xxmax-rwxmin);
1351 yy0 = ratio2*(yymin-rwymin);
1352 yy1 = ratio2*(yymax-rwymin);
1355 if ((x0 ==
x1) && (y0 ==
y1)) {
1356 Error(where,
"length of axis is 0");
1363 if (toffset==0 &&
x1 == x0) autotoff =
kTRUE;
1376 if (!
gPad->IsBatch()) {
1377 gVirtualX->GetCharacterUp(chupxvsav, chupyvsav);
1383 if (axis_length == 0) {
1384 Error(where,
"length of axis is 0");
1387 if (!optionNoopt || optionInt) {
1388 axis_lengthN =
TMath::Sqrt((xx1-xx0)*(xx1-xx0)+(yy1-yy0)*(yy1-yy0));
1389 axis_length0 =
TMath::Sqrt((xx0-x0)*(xx0-x0)+(yy0-y0)*(yy0-y0));
1391 if (axis_lengthN < epsilon) {
1400 wmin += timeoffset - (
int)(timeoffset) + rangeOffset;
1401 wmax += timeoffset - (
int)(timeoffset) + rangeOffset;
1407 if (
y1>=y0) phi = 0.5*
kPI;
1432 if (x0 ==
x1 &&
y1 > y0) mside = -1;
1433 if (optionPlus) mside = 1;
1434 if (optionMinus) mside = -1;
1435 if (optionPlus && optionMinus) mside = 0;
1438 if (optionEqual) lside = mside;
1439 if (optionPlus && optionMinus) {
1441 if (optionEqual) lside=1;
1446 if(xmside >= 0) tick_side = 1;
1447 else tick_side = -1;
1448 if (optionSize) atick[0] = tick_side*axis_length*
fTickSize;
1449 else atick[0] = tick_side*axis_length*0.03;
1451 atick[1] = 0.5*atick[0];
1452 atick[2] = 0.5*atick[1];
1455 if ((x0 ==
x1) && (
y1 > y0)) grid_side =-1;
1482 if (optionArrow==1)
a.PaintArrowNDC(xpl1, ypl1, xpl2, ypl2, as,
"|>");
1483 if (optionArrow==2)
a.PaintArrowNDC(xpl1, ypl1, xpl2, ypl2, as,
"<|");
1484 if (optionArrow==3)
a.PaintArrowNDC(xpl1, ypl1, xpl2, ypl2, as,
"<|>");
1492 if (ndiv == 0)
return;
1504 if (optionText &&
GetLabelFont()%10 != 3) charheight *= 0.66666;
1514 if (!optionUp && !optionDown && !optionY && !optionUnlab) {
1529 if (nl > 50)
angle = 90;
1561 double scale=
gPad->GetWw()*
gPad->GetWNDC();
1562 if (scale>0.0) toffset =
TMath::Max(toffset,(
double)
w/scale);
1587 if (!
gPad->IsBatch()) {
1588 if (cosphi > 0)
gVirtualX->SetCharacterUp(-sinphi,cosphi);
1589 else gVirtualX->SetCharacterUp(sinphi,-cosphi);
1591 if (optionVert)
gVirtualX->SetCharacterUp(0,1);
1592 if (optionPara)
gVirtualX->SetCharacterUp(-sinphi,cosphi);
1593 if (optionDown)
gVirtualX->SetCharacterUp(cosphi,sinphi);
1599 if (x0 ==
x1) xalign = 3;
1600 if (y0 !=
y1) yalign = 2;
1601 if (optionCent) xalign = 2;
1602 if (optionRight) xalign = 3;
1603 if (optionLeft) xalign = 1;
1607 if (cosphi*sinphi > 0) xalign = 1;
1608 if (cosphi*sinphi < 0) xalign = 3;
1614 if (optionPlus && !optionMinus) {
1619 if (lside < 0) ylabel += atick[0];
1621 }
else if (y0 ==
y1) {
1622 if (optionMinus && !optionPlus) {
1633 if (mside <= 0) ylabel -=
TMath::Abs(atick[0]);
1635 if (optionLog) ylabel -= 0.5*charheight;
1640 if (optionText) ylabel /= 2;
1646 dxtick=(binHigh-binLow)/
Double_t(nticks-1);
1648 if (optionNoopt && !optionInt) dxtick=axis_length/
Double_t(nticks-1);
1649 else dxtick=axis_lengthN/
Double_t(nticks-1);
1651 for (k=0;k<nticks; k++) {
1653 if (k%nn3 == 0) ltick = 1;
1654 if (k%nn2 == 0) ltick = 0;
1658 xtick = zz* axis_length /
TMath::Abs(rwma-rwmi);
1663 if (!mside) ytick -= atick[ltick];
1664 if ( optionNoopt && !optionInt) {
1665 Rotate(xtick,ytick,cosphi,sinphi,x0,y0,xpl2,ypl2);
1666 Rotate(xtick,atick[ltick],cosphi,sinphi,x0,y0,xpl1,ypl1);
1669 Rotate(xtick,ytick,cosphi,sinphi,xx0,yy0,xpl2,ypl2);
1670 Rotate(xtick,atick[ltick],cosphi,sinphi,xx0,yy0,xpl1,ypl1);
1673 if ((x0 !=
x1) && (y0 !=
y1)) {
1676 if (cosphi > 0) ypl1 = ypl2 + atick[ltick];
1677 else ypl1 = ypl2 - atick[ltick];
1680 xpl1 = 0.5*(xpl1 + xpl2);
1682 ypl1 = 0.5*(ypl1 + ypl2) + atick[ltick];
1683 ypl2 = 0.5*(ypl1 + ypl2) - atick[ltick];
1687 if (!drawGridOnly) {
1691 if (optionArrow==1) {
1698 if (optionArrow==2) {
1705 if (optionArrow==3) {
1717 if (optionNoopt && !optionInt) {
1718 Rotate(xtick,0,cosphi,sinphi,x0,y0 ,xpl2,ypl2);
1719 Rotate(xtick,grid_side*gridlength ,cosphi,sinphi,x0,y0 ,xpl1,ypl1);
1722 Rotate(xtick,0,cosphi ,sinphi,xx0,yy0 ,xpl2,ypl2);
1723 Rotate(xtick,grid_side*gridlength ,cosphi,sinphi,xx0,yy0 ,xpl1,ypl1);
1733 if ((!optionNoopt || optionInt) && axis_length0) {
1734 nticks0 =
Int_t(axis_length0/dxtick);
1735 if (nticks0 > 1000) nticks0 = 1000;
1736 for (k=0; k<=nticks0; k++) {
1738 if (k%nn3 == 0) ltick = 1;
1739 if (k%nn2 == 0) ltick = 0;
1741 if (!mside) ytick0 -= atick[ltick];
1746 Rotate(xtick0,ytick0,cosphi,sinphi,xx0,yy0 ,xpl2,ypl2);
1747 Rotate(xtick0,atick[ltick],cosphi,sinphi,xx0,yy0 ,xpl1,ypl1);
1749 if ((x0 !=
x1) && (y0 !=
y1)) {
1752 if (cosphi > 0) ypl1 = ypl2 + atick[ltick];
1753 else ypl1 = ypl2 - atick[ltick];
1756 xpl1 = 0.5*(xpl1 + xpl2);
1758 ypl1 = 0.5*(ypl1 + ypl2) + atick[ltick];
1759 ypl2 = 0.5*(ypl1 + ypl2) - atick[ltick];
1763 if (!drawGridOnly)
PaintLineNDC(xpl1, ypl1, xpl2, ypl2);
1767 Rotate(xtick0,0,cosphi,sinphi,xx0,yy0,xpl2,ypl2);
1768 Rotate(xtick0,grid_side*gridlength ,cosphi,sinphi,xx0,yy0 ,xpl1,ypl1);
1777 if ((!optionNoopt || optionInt) && axis_length1) {
1778 nticks1 =
int(axis_length1/dxtick);
1779 if (nticks1 > 1000) nticks1 = 1000;
1780 for (k=0; k<=nticks1; k++) {
1782 if (k%nn3 == 0) ltick = 1;
1783 if (k%nn2 == 0) ltick = 0;
1785 if (!mside) ytick1 -= atick[ltick];
1790 Rotate(xtick1,ytick1,cosphi,sinphi,xx0,yy0 ,xpl2,ypl2);
1791 Rotate(xtick1,atick[ltick],cosphi,sinphi,xx0,yy0 ,xpl1,ypl1);
1793 if ((x0 !=
x1) && (y0 !=
y1)) {
1796 if (cosphi > 0) ypl1 = ypl2 + atick[ltick];
1797 else ypl1 = ypl2 - atick[ltick];
1800 xpl1 = 0.5*(xpl1 + xpl2);
1802 ypl1 = 0.5*(ypl1 + ypl2) + atick[ltick];
1803 ypl2 = 0.5*(ypl1 + ypl2) - atick[ltick];
1807 if (!drawGridOnly)
PaintLineNDC(xpl1, ypl1, xpl2, ypl2);
1810 Rotate(xtick1,0,cosphi,sinphi,xx0,yy0 ,xpl2,ypl2);
1811 Rotate(xtick1,grid_side*gridlength,cosphi,sinphi,xx0,yy0,xpl1,ypl1);
1822 if (!drawGridOnly && !optionUnlab) {
1826 if ((
wmin ==
wmax) || (ndiv == 0)) {
1827 Error(where,
"wmin (%f) == wmax (%f), or ndiv == 0",
wmin,
wmax);
1832 if (optionNoopt && !optionInt) dxlabel = axis_length/
Double_t(n1a);
1833 else dxlabel = axis_lengthN/
Double_t(n1a);
1835 if (!optionText && !optionTime) {
1857 if (iexe%3 == 1) iexe += 2;
1858 else if(iexe%3 == 2) iexe += 1;
1859 if (nexe < 0) nexe = -iexe;
1872 if (!noExponent && nf > maxDigits) flexpo =
kTRUE;
1873 if (!noExponent && nf < -maxDigits) flexne =
kTRUE;
1884 if (nexe%3 == 0 && ww <=
TMath::Power(10,maxDigits-1))
break;
1896 if (nexe%3 == 0 && ww >= rne)
break;
1901 for (i=maxDigits-1; i>0; i--) {
1907 if (wdyn <= 0.999 && na < maxDigits-2) {
1927 if (if1 > 14) if1 = 14;
1928 if (if2 > 14) if2 = 14;
1929 if (if1 < 0) if1 = 0;
1932 len =
snprintf(chcoded,
sizeof(chcoded),
"%%%d.%df",if1,if2);
1934 len =
snprintf(chcoded,
sizeof(chcoded),
"%%%d.%df",if1+1,1);
1937 if ((
len < 0) || (
len >= (
int)
sizeof(chcoded)))
1938 strcpy(chcoded,
"%7.3f");
1944 Int_t ndecimals = 0;
1945 if (optionDecimals) {
1946 char *dot = strchr(chtemp,
'.');
1948 ndecimals = chtemp + strlen(chtemp) -dot;
1951 exp = strstr(chtemp,
"e-");
1953 sscanf(&exp[2],
"%d",&ndecimals);
1958 if (optionM) nlabels = n1a-1;
1961 for ( k=0; k<=nlabels; k++) {
1966 xlabel = zz* axis_length /
TMath::Abs(rwma-rwmi);
1970 if (optionM) xlabel += 0.5*dxlabel;
1972 axis_value = wlabel;
1974 if (!optionText && !optionTime) {
1975 snprintf(label,256,chcoded,wlabel);
1982 if (label[first] ==
'.') {
1983 strncpy(chtemp,
"0", 256);
1984 strlcat(chtemp, &label[first],256);
1985 strlcpy(label, chtemp, 256);
1986 first = 1; last = strlen(label);
1988 if (label[first] ==
'-' && label[first+1] ==
'.') {
1989 strncpy(chtemp,
"-0",256);
1990 strlcat(chtemp, &label[first+1],256);
1991 strlcpy(label, chtemp, 256);
1992 first = 1; last = strlen(label);
1997 char *adot = strchr(label,
'.');
1998 if (adot) adot[ndecimals] = 0;
2000 while (label[last] ==
'0') { label[last] = 0; last--;}
2004 if (label[last] ==
'.') {
2005 if (!optionDot) { label[last] = 0; last--;}
2009 if (last-first == 1 && label[first] ==
'-'
2010 && label[last] ==
'0') {
2011 strncpy(label,
"0", 256);
2019 timed = wlabel + (
int)(timeoffset) - rangeOffset;
2020 timelabel = (time_t)((
Long_t)(timed));
2021 if (optionTime == 1) {
2022 utctis = localtime(&timelabel);
2024 utctis = gmtime(&timelabel);
2027 if (timeformat.
Length() < 220) timeformattmp = timeformat;
2028 else timeformattmp =
"#splitline{Format}{too long}";
2034 snprintf(label, 256,
"%%S%7.5f", modf(timed,&tmpdb));
2035 tmplast = strlen(label)-1;
2038 while (label[tmplast] ==
'0') {
2039 label[tmplast] = 0; tmplast--;
2048 if (utctis !=
nullptr) {
2049 strftime(label, 256, timeformattmp.
Data(), utctis);
2051 strncpy(label,
"invalid", 256);
2053 strlcpy(chtemp, &label[0], 256);
2054 first = 0; last=strlen(label)-1;
2055 wlabel = wTimeIni + (k+1)*dwlabel;
2060 if (optionNoopt && !optionInt)
2061 Rotate (xlabel,ylabel,cosphi,sinphi,x0,y0,xx,yy);
2062 else Rotate (xlabel,ylabel,cosphi,sinphi,xx0,yy0,xx,yy);
2063 if (y0 ==
y1 && !optionDown && !optionUp) {
2064 yy -= 0.80*charheight;
2067 if (x0 !=
x1 && y0 !=
y1) {
2068 if (optionNoopt && !optionInt)
2069 Rotate (xlabel,0,cosphi,sinphi,x0,y0,xx,yy);
2070 else Rotate (xlabel,0,cosphi,sinphi,xx0,yy0,xx,yy);
2071 if (cosphi > 0 ) yy += ylabel;
2072 if (cosphi < 0 ) yy -= ylabel;
2075 if (!optionY || (x0 ==
x1)) {
2077 if (first > last) strncpy(chtemp,
" ", 256);
2078 else strlcpy(chtemp, &label[first], 255);
2081 if (!optionTime) typolabel.
ReplaceAll(
"-",
"#minus");
2086 double scale=
gPad->GetWw()*
gPad->GetWNDC();
2087 if (scale>0.0) toffset =
TMath::Max(toffset,(
double)
w/scale);
2108 if (!optionText) lnlen = last-first+1;
2110 if (k+1 > nhilab) lnlen = 0;
2112 for (
l=1;
l<=lnlen;
l++) {
2113 if (!optionText) *chtemp = label[first+
l-2];
2115 if (lnlen == 0) strncpy(chtemp,
" ", 256);
2116 else strncpy(chtemp,
"1", 256);
2125 yy -= charheight*1.3;
2132 if (flexe && !optionText && nexe) {
2133 snprintf(label,256,
"#times10^{%d}", nexe);
2134 if (x0 !=
x1) { xfactor = axis_length+0.1*charheight; yfactor = 0; }
2135 else { xfactor =
y1-y0+0.1*charheight; yfactor = 0; }
2136 Rotate (xfactor,yfactor,cosphi,sinphi,x0,y0,xx,yy);
2166 if (optionLog && ndiv) {
2167 UInt_t xi1=0,xi2=0,wi=0,yi1=0,yi2=0,
hi=0,xl=0,xh=0;
2169 if ((
wmin ==
wmax) || (ndiv == 0)) {
2170 Error(where,
"wmin (%f) == wmax (%f), or ndiv == 0",
wmin,
wmax);
2174 Error(where,
"negative logarithmic axis");
2178 Error(where,
"negative logarithmic axis");
2182 if (xmnlog > 0) xmnlog += 1.E-6;
2183 else xmnlog -= 1.E-6;
2188 if (h2 > 0) h2 += 1.E-6;
2193 axmul = (x11-x00)/(h2sav-xmnlog);
2198 if ( xmnlog > 0 && (xmnlog-
Double_t(ih1) > 0) ) labelnumber++;
2199 Int_t changelablogid = 0;
2200 Int_t changelablognum = 0;
2201 for (j=1; j<=nbinin; j++) {
2206 if (x0 ==
x1 && j == 1) ylabel += charheight*0.33;
2207 if (y0 ==
y1 && j == 1) ylabel -= charheight*0.65;
2208 xone = x00+axmul*(
Double_t(decade)-xmnlog);
2210 if (j < 0) printf(
"j=%d\n",j);
2211 if (x00 > xone)
goto L160;
2212 if ((xone-x11)>epsilon)
break;
2215 if (!mside)
y -= atick[0];
2216 Rotate(xone,
y,cosphi,sinphi,x0,y0,xpl2,ypl2);
2217 Rotate(xtwo,atick[0],cosphi,sinphi,x0,y0,xpl1,ypl1);
2219 if ((x0 !=
x1) && (y0 !=
y1)) {
2222 if (cosphi > 0) ypl1 = ypl2 + atick[0];
2223 else ypl1 = ypl2 - atick[0];
2226 xpl1 = 0.5*(xpl1 + xpl2);
2228 ypl1 = 0.5*(ypl1 + ypl2) + atick[0];
2229 ypl2 = 0.5*(ypl1 + ypl2) - atick[0];
2233 if (!drawGridOnly)
PaintLineNDC(xpl1, ypl1, xpl2, ypl2);
2236 Rotate(xone,0,cosphi,sinphi,x0,y0,xpl2,ypl2);
2237 Rotate(xone,grid_side*gridlength,cosphi,sinphi,x0,y0,xpl1,ypl1);
2241 if (!drawGridOnly && !optionUnlab) {
2249 while (last > first) {
2250 if (label[last] !=
'0')
break;
2254 if (label[last] ==
'.') {label[last] = 0; last--;}
2256 snprintf(label,256,
"%d", labelnumber);
2259 Rotate (xone,ylabel,cosphi,sinphi,x0,y0,xx,yy);
2260 if ((x0 ==
x1) && !optionPara) {
2263 if (labelnumber == 0) nch=1;
2265 xx += nch*charheight;
2267 xx += 0.25*charheight;
2270 xx += 0.25*charheight;
2272 if ((y0 ==
y1) && !optionDown && !optionUp) {
2273 if (noExponent) yy += 0.33*charheight;
2275 if (n1a == 0)
return;
2277 if (kmod == 0) kmod=1000000;
2278 if ((nbinin <= n1a) || (j == 1) || (j == nbinin) || ((nbinin > n1a) && (j%kmod == 0))) {
2279 if (labelnumber == 0) {
2281 }
else if (labelnumber == 1) {
2285 chtemp = &label[first];
2287 snprintf(chtemp,256,
"10^{%d}", labelnumber);
2291 if (changelablogid == 0) changelablognum = nbinin-j;
2301 double scale=
gPad->GetWw()*
gPad->GetWNDC();
2302 if (scale>0.0) toffset =
TMath::Max(toffset,(
double)
w/scale);
2312 for (k=2;k<10;k++) {
2316 if (x00 > xone)
continue;
2317 if (xone > x11)
goto L200;
2319 if (!mside)
y -= atick[1];
2321 Rotate(xone,
y,cosphi,sinphi,x0,y0,xpl2,ypl2);
2322 Rotate(xtwo,atick[1],cosphi,sinphi,x0,y0,xpl1,ypl1);
2324 if ((x0 !=
x1) && (y0 !=
y1)) {
2327 if (cosphi > 0) ypl1 = ypl2 + atick[1];
2328 else ypl1 = ypl2 - atick[1];
2331 xpl1 = 0.5*(xpl1+xpl2);
2333 ypl1 = 0.5*(ypl1+ypl2) + atick[1];
2334 ypl2 = 0.5*(ypl1+ypl2) - atick[1];
2339 if ((nbinin <= idn) || ((nbinin > idn) && (k == 5))) {
2340 if (!drawGridOnly)
PaintLineNDC(xpl1, ypl1, xpl2, ypl2);
2344 if (moreLogLabels && !optionUnlab && !drawGridOnly && !overlap) {
2350 if (labelnumber-1 == 0) {
2352 }
else if (labelnumber-1 == 1) {
2355 snprintf(chtemp,256,
"%d#times10^{%d}", k, labelnumber-1);
2358 Rotate (xone,ylabel,cosphi,sinphi,x0,y0,xx,yy);
2359 if ((x0 ==
x1) && !optionPara) {
2362 if (labelnumber == 0) nch=1;
2364 xx += nch*charheight;
2366 if (labelnumber >= 0) xx += 0.25*charheight;
2367 else xx += 0.50*charheight;
2370 xx += 0.25*charheight;
2372 if ((y0 ==
y1) && !optionDown && !optionUp) {
2373 if (noExponent) yy += 0.33*charheight;
2376 if ((x0 !=
x1) && (y0 !=
y1)) {
2377 Rotate(xone,ylabel,cosphi,sinphi,x0,y0,xx,yy);
2378 if (cosphi > 0) yy += ylabel;
2387 xi1 =
gPad->XtoAbsPixel(u);
2388 yi1 =
gPad->YtoAbsPixel(
v);
2399 xi2 =
gPad->XtoAbsPixel(u);
2400 yi2 =
gPad->YtoAbsPixel(
v);
2403 if ((x0 ==
x1 && yi1-
hi <= yi2) || (y0 ==
y1 && xl+wi >= xh)){
2422 if (optionGrid && nbinin <= 5 && ndiv > 100) {
2423 Rotate(xone,0,cosphi,sinphi,x0,y0,xpl2, ypl2);
2424 Rotate(xone,grid_side*gridlength,cosphi,sinphi,x0,y0, xpl1,ypl1);
2431 Int_t dummy = 0;
if (dummy) { }
2435 if (!drawGridOnly && strlen(
GetTitle())) {
2439 charheight /= ((
x1==x0) ? padw : padh);
2443 if (toffset) ylabel = xlside*charheight+toffset;
2444 else ylabel = xlside*1.6*charheight;
2446 ylabel = xlside*1.6*charheight*toffset;
2449 ylabel = xlside*1.3*charheight*toffset;
2453 ylabel = xlside*1.6*charheight*toffset;
2457 else axispos = axis_length;
2476 Rotate(axispos,ylabel,cosphi,sinphi,x0,y0,xpl1,ypl1);
2503 if (binWidth <= 1) { binWidth = 1; binLow =
int(A1); }
2507 binLow =
int(A1/binWidth)*binWidth;
2513 for (
Int_t ic=0; ic<1000; ic++) {
2516 if ( (rbl-ibl) == 0 || ic >
width) { binLow -= 5;
break;}
2523 while (xb <= binHigh) {
2527 binHigh = xb - binWidth;
2535 last = strlen(label)-1;
2536 for (
Int_t i=0; i<=last; i++) {
2537 if (strchr(
"1234567890-+.", label[i]) ) { first = i;
return; }
2539 Error(
"LabelsLimits",
"attempt to draw a blank label");
2563 out<<
"gaxis = new TGaxis("<<
fX1<<
","<<
fY1<<
","<<
fX2<<
","<<
fY2
2565 out<<
" gaxis->SetLabelOffset("<<
GetLabelOffset()<<
");"<<std::endl;
2566 out<<
" gaxis->SetLabelSize("<<
GetLabelSize()<<
");"<<std::endl;
2567 out<<
" gaxis->SetTickSize("<<
GetTickSize()<<
");"<<std::endl;
2568 out<<
" gaxis->SetGridLength("<<
GetGridLength()<<
");"<<std::endl;
2569 out<<
" gaxis->SetTitleOffset("<<
GetTitleOffset()<<
");"<<std::endl;
2570 out<<
" gaxis->SetTitleSize("<<
GetTitleSize()<<
");"<<std::endl;
2571 out<<
" gaxis->SetTitleColor("<<
GetTextColor()<<
");"<<std::endl;
2572 out<<
" gaxis->SetTitleFont("<<
GetTextFont()<<
");"<<std::endl;
2575 out<<
" gaxis->SetName("<<quote<<
GetName()<<quote<<
");"<<std::endl;
2578 out<<
" gaxis->SetTitle("<<quote<<
GetTitle()<<quote<<
");"<<std::endl;
2583 out<<
" gaxis->SetLabelColor(ci);" << std::endl;
2585 out<<
" gaxis->SetLabelColor("<<
GetLabelColor()<<
");"<<std::endl;
2589 out<<
" gaxis->SetLineColor(ci);" << std::endl;
2591 out<<
" gaxis->SetLineColor("<<
GetLineColor()<<
");"<<std::endl;
2594 out<<
" gaxis->SetLineStyle("<<
GetLineStyle()<<
");"<<std::endl;
2597 out<<
" gaxis->SetLineWidth("<<
GetLineWidth()<<
");"<<std::endl;
2600 out<<
" gaxis->SetLabelFont("<<
GetLabelFont()<<
");"<<std::endl;
2603 out<<
" gaxis->SetMoreLogLabels();"<<std::endl;
2606 out<<
" gaxis->SetNoExponent();"<<std::endl;
2611 if (ml->GetLabNum() == 0)
2612 out<<
" gaxis->ChangeLabelByValue("<<ml->GetLabValue()<<
",";
2614 out<<
" gaxis->ChangeLabel("<<ml->GetLabNum()<<
",";
2615 out<<ml->GetAngle()<<
","
2616 <<ml->GetSize()<<
","
2617 <<ml->GetAlign()<<
","
2618 <<ml->GetColor()<<
","
2619 <<ml->GetFont()<<
","
2620 <<quote<<ml->GetText()<<quote<<
");"<<std::endl;
2624 out<<
" gaxis->Draw();"<<std::endl;
2646 if (!funcname || !funcname[0]) {
2652 Error(
"SetFunction",
"unknown function: %s", funcname);
2670 if (ml->GetLabNum() == 0) {
2673 }
else if (indx != 0) {
2674 Bool_t match = ml->GetLabNum() == indx;
2675 if (!match && (ml->GetLabNum() < 0) && (indx > 0) && (numlabels > 0)) {
2677 Error(
"FindModLab",
"reverse numbering in ChangeLabel doesn't work when more log labels are requested");
2681 match = indx == (ml->GetLabNum() + 2 + numlabels);
2683 if (match)
return ml;
2866 if (ml->GetAngle()>=0.) t->
SetTextAngle(ml->GetAngle());
2867 if (ml->GetSize()>=0.) t->
SetTextSize(ml->GetSize());
2869 if (ml->GetColor()>=0) t->
SetTextColor(ml->GetColor());
2870 if (ml->GetFont()>0) t->
SetTextFont(ml->GetFont());
2871 if (!ml->GetText().IsNull()) strlcpy(
c, ml->GetText().Data(), 256);
2973 if (timeformat.
Index(
"%F")>=0 || timeformat.
IsNull()) {
3005 timeoff = (time_t)((
Long_t)(toffset));
3009 utctis = gmtime(&timeoff);
3011 if (utctis !=
nullptr) {
3012 strftime(tmp, 20,
"%Y-%m-%d %H:%M:%S",utctis);
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t wmin
Option_t Option_t SetLineColor
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void value
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h Atom_t Int_t ULong_t ULong_t unsigned char prop_list Atom_t Atom_t Atom_t Time_t UChar_t len
Option_t Option_t TPoint TPoint const char x2
Option_t Option_t TPoint TPoint const char x1
Option_t Option_t SetTextFont
Option_t Option_t TPoint TPoint angle
Option_t Option_t TPoint TPoint const char y2
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t wmax
Option_t Option_t TPoint TPoint const char y1
static TAttText SavedAttText
Global variable saving the current label's text angle. Used by TGaxis::ChangeLabelAttributes.
R__EXTERN TStyle * gStyle
Draw all kinds of Arrows.
virtual Color_t GetTitleColor() const
virtual Color_t GetLabelColor() const
virtual Color_t GetAxisColor() const
virtual Style_t GetTitleFont() const
virtual Float_t GetLabelOffset() const
virtual Style_t GetLabelFont() const
virtual Float_t GetTitleSize() const
virtual Float_t GetLabelSize() const
virtual Float_t GetTickLength() const
virtual Float_t GetTitleOffset() const
virtual Color_t GetLineColor() const
Return the line color.
virtual void SetLineStyle(Style_t lstyle)
Set the line style.
virtual Width_t GetLineWidth() const
Return the line width.
virtual void SetLineWidth(Width_t lwidth)
Set the line width.
Width_t fLineWidth
Line width.
virtual void SetLineColor(Color_t lcolor)
Set the line color.
virtual Style_t GetLineStyle() const
Return the line style.
Style_t fLineStyle
Line style.
Color_t fLineColor
Line color.
virtual Float_t GetTextSize() const
Return the text size.
virtual void SetTextAlign(Short_t align=11)
Set the text alignment.
virtual Font_t GetTextFont() const
Return the text font.
Color_t fTextColor
Text color.
Float_t fTextAngle
Text angle.
virtual Color_t GetTextColor() const
Return the text color.
virtual void Streamer(TBuffer &)
virtual void SetTextAngle(Float_t tangle=0)
Set the text angle.
virtual Float_t GetTextAngle() const
Return the text angle.
virtual void SetTextColor(Color_t tcolor=1)
Set the text color.
virtual void SetTextFont(Font_t tfont=62)
Set the text font.
Font_t fTextFont
Text font.
virtual void SetTextSize(Float_t tsize=1)
Set the text size.
Short_t fTextAlign
Text alignment.
void Copy(TAttText &atttext) const
Copy this text attributes to a new TAttText.
Float_t fTextSize
Text size.
TAxis helper class used to store the modified labels.
void SetColor(Int_t c=-1)
Set modified label color.
void SetSize(Double_t s=-1.)
Set modified label size.
void SetFont(Int_t f=-1)
Set modified label font.
void SetText(TString t="")
Set modified label text.
void SetLabValue(Double_t v=0.)
Set modified label value.
void SetAlign(Int_t a=-1)
Set modified label alignment.
void SetLabNum(Int_t n=0)
Set modified label number.
void SetAngle(Double_t a=-1.)
Set modified label angle.
Class to manage histogram axis.
const char * GetTitle() const override
Returns title of object.
virtual Double_t GetBinCenter(Int_t bin) const
Return center of bin.
@ kCenterLabels
Bit 13 is used by TObject.
const char * GetBinLabel(Int_t bin) const
Return label for bin.
Bool_t GetDecimals() const
Int_t GetLast() const
Return last bin on the axis i.e.
TList * GetModifiedLabels() const
virtual const char * GetTimeFormat() const
Int_t GetFirst() const
Return first bin on the axis i.e.
THashList * GetLabels() const
Buffer base class used for serializing objects.
virtual Version_t ReadVersion(UInt_t *start=nullptr, UInt_t *bcnt=nullptr, const TClass *cl=nullptr)=0
virtual Int_t CheckByteCount(UInt_t startpos, UInt_t bcnt, const TClass *clss)=0
virtual Int_t ReadClassBuffer(const TClass *cl, void *pointer, const TClass *onfile_class=nullptr)=0
virtual Int_t WriteClassBuffer(const TClass *cl, void *pointer)=0
virtual void SetOwner(Bool_t enable=kTRUE)
Set whether this collection is the owner (enable==true) of its content.
TObject * Clone(const char *newname="") const override
Make a clone of an collection using the Streamer facility.
virtual Int_t GetSize() const
Return the capacity of the collection, i.e.
static Bool_t SaveColor(std::ostream &out, Int_t ci)
Save a color with index > 228 as a C++ statement(s) on output stream out.
virtual Double_t GetXmax() const
virtual Double_t Eval(Double_t x, Double_t y=0, Double_t z=0, Double_t t=0) const
Evaluate this function.
virtual Double_t GetXmin() const
virtual void SetNoExponent(Bool_t noExponent=kTRUE)
Set the NoExponent flag.
void SetTimeFormat(const char *tformat)
Change the format used for time plotting.
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.
TGaxis()
TGaxis default constructor.
void SetTitleOffset(Float_t titleoffset=1)
void ChangeLabelAttributes(Int_t i, Int_t nlabels, TLatex *t, char *c, Double_t value=0., Double_t eps=-1.)
Helper method used by TGaxis::ChangeLabel.
Float_t fTitleSize
Size of title in NDC.
Float_t GetGridLength() const
void SetLabelFont(Int_t labelfont)
void SetTitleSize(Float_t titlesize)
void Streamer(TBuffer &) override
Stream an object of class TGaxis.
Float_t fTitleOffset
Offset of title wrt axis.
TString fTitle
Axis title.
Int_t fLabelFont
Font for labels.
TAxisModLab * FindModLab(Int_t indx, Int_t numlabels=0, Double_t v=0., Double_t eps=-1.) const
Search for axis modifier by index or value.
virtual void SetTitle(const char *title="")
Change the title of the axis.
Int_t fLabelColor
Color for labels.
TAxis * fAxis
! Pointer to original TAxis axis (if any)
TString fTimeFormat
Time format, ex: 09/12/99 12:34:00.
void SavePrimitive(std::ostream &out, Option_t *option="") override
Save primitive as a C++ statement(s) on output stream out.
TString fFunctionName
Name of mapping function pointed by fFunction.
void SetLabelOffset(Float_t labeloffset)
virtual void Rotate(Double_t X, Double_t Y, Double_t CFI, Double_t SFI, Double_t XT, Double_t YT, Double_t &U, Double_t &V)
Internal method to rotate axis coordinates.
Float_t GetLabelOffset() const
void SetTimeOffset(Double_t toffset, Option_t *option="local")
Change the time offset. If option = "gmt", set display mode to GMT.
Float_t fTickSize
Size of primary tick mark in NDC.
void ChangeLabelByValue(Double_t labValue, Double_t labAngle=-1., Double_t labSize=-1., Int_t labAlign=-1, Int_t labColor=-1, Int_t labFont=-1, const TString &labText="")
Define new text attributes for the label value "labValue".
~TGaxis() override
TGaxis default destructor.
virtual void ImportAxisAttributes(TAxis *axis)
Internal method to import TAxis attributes to this TGaxis.
Int_t GetLabelFont() const
Float_t fLabelOffset
Offset of label wrt axis.
static void SetMaxDigits(Int_t maxd=5)
Static function to set fgMaxDigits for axis.
Float_t fLabelSize
Size of labels in NDC.
Int_t fNdiv
Number of divisions.
const char * GetTitle() const override
Returns title of object.
TString fChopt
Axis options.
TGaxis & operator=(const TGaxis &)
Assignment operator.
Float_t GetTitleOffset() const
TF1 * fFunction
! Pointer to function computing axis values
Float_t GetTitleSize() const
static Int_t GetMaxDigits()
Static function returning gStyle->GetAxisMaxDigits().
virtual void CenterLabels(Bool_t center=kTRUE)
If center = kTRUE axis labels are centered in the center of the bin.
const char * GetName() const override
Returns name of object.
void SetLabelColor(Int_t labelcolor)
virtual void AdjustBinSize(Double_t A1, Double_t A2, Int_t nold, Double_t &BinLow, Double_t &BinHigh, Int_t &nbins, Double_t &BinWidth)
Internal method for axis labels optimisation.
Float_t fGridLength
Length of the grid in NDC.
Int_t GetLabelColor() const
virtual void SetDecimals(Bool_t dot=kTRUE)
Set the decimals flag.
virtual void CenterTitle(Bool_t center=kTRUE)
If center = kTRUE axis title will be centered. The default is right adjusted.
TList * fModLabs
List of modified labels.
void ChangeLabel(Int_t labNum=0, Double_t labAngle=-1., Double_t labSize=-1., Int_t labAlign=-1, Int_t labColor=-1, Int_t labFont=-1, const TString &labText="")
Define new text attributes for the label number "labNum".
void CleanupModLabs()
Correctly cleanup fModLabs - delete content when owned by TGaxis.
Double_t fWmax
Highest value on the axis.
Float_t GetTickSize() const
virtual TGaxis * DrawAxis(Double_t xmin, Double_t ymin, Double_t xmax, Double_t ymax, Double_t wmin, Double_t wmax, Int_t ndiv=510, Option_t *chopt="", Double_t gridlength=0)
Draw this axis with new attributes.
virtual void SetMoreLogLabels(Bool_t more=kTRUE)
Set the kMoreLogLabels bit flag.
void SetTickSize(Float_t ticksize)
void Paint(Option_t *chopt="") override
Draw this axis with its current attributes.
Int_t fNModLabs
Number of modified labels.
Double_t fWmin
Lowest value on the axis.
void SetLabelSize(Float_t labelsize)
void SetFunction(const char *funcname="")
Specify a function to map the axis values.
virtual void SetName(const char *name)
Change the name of the axis.
static void SetExponentOffset(Float_t xoff=0., Float_t yoff=0., Option_t *axis="xy")
Static method to set X and Y offset of the axis 10^n notation.
void LabelsLimits(const char *label, Int_t &first, Int_t &last)
Internal method to find first and last character of a label.
Bool_t IsOwnedModLabs() const
Returns kTRUE when fModLabs owned by TGaxis and should be cleaned up.
void ResetLabelAttributes(TLatex *t)
Helper method used by TGaxis::ChangeLabel.
Float_t GetLabelSize() const
void SetOption(Option_t *option="")
To set axis options.
TClass * IsA() const override
static void Optimize(Double_t A1, Double_t A2, Int_t nold, Double_t &BinLow, Double_t &BinHigh, Int_t &nbins, Double_t &BWID, Option_t *option="")
Static function to compute reasonable axis limits.
To draw Mathematical Formula.
Double_t GetXsize()
Return size of the formula along X in pad coordinates when the text precision is smaller than 3.
void GetBoundingBox(UInt_t &w, UInt_t &h, Bool_t angle=kFALSE) override
Return text size in pixels.
virtual void PaintLatex(Double_t x, Double_t y, Double_t angle, Double_t size, const char *text)
Main drawing function.
Use the TLine constructor to create a simple line.
Double_t fY1
Y of 1st point.
Double_t fX1
X of 1st point.
Double_t fX2
X of 2nd point.
TLine & operator=(const TLine &src)
Assignment operator.
Double_t fY2
Y of 2nd point.
virtual void PaintLineNDC(Double_t u1, Double_t v1, Double_t u2, Double_t v2)
Draw this line with new coordinates in NDC.
void Streamer(TBuffer &) override
Stream an object of class TLine.
void Add(TObject *obj) override
void Delete(Option_t *option="") override
Remove all objects from the list AND delete all heap based objects.
virtual void SetTitle(const char *title="")
Set the title of the TNamed.
const char * GetName() const override
Returns name of object.
R__ALWAYS_INLINE Bool_t TestBit(UInt_t f) const
virtual void AppendPad(Option_t *option="")
Append graphics object to current pad.
void SetBit(UInt_t f, Bool_t set)
Set or unset the user status bits as specified in f.
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
@ kCanDelete
if object in a list can be deleted
void ToLower()
Change string to lower-case.
const char * Data() const
TString & ReplaceAll(const TString &s1, const TString &s2)
TString & Remove(Ssiz_t pos)
virtual void Streamer(TBuffer &)
Stream a string object.
TString & Append(const char *cs)
Bool_t Contains(const char *pat, ECaseCompare cmp=kExact) const
Ssiz_t Index(const char *pat, Ssiz_t i=0, ECaseCompare cmp=kExact) const
Double_t GetTimeOffset() const
Int_t GetAxisMaxDigits() const
Method returns maximum number of digits permitted for the axis labels above which the notation with 1...
Color_t GetGridColor() const
Style_t GetGridStyle() const
void SetExponentOffset(Float_t xoff=0., Float_t yoff=0., Option_t *axis="XY")
Method set X and Y offset of the axis 10^n notation.
Float_t GetTitleOffset(Option_t *axis="X") const
Return title offset.
void SetAxisMaxDigits(Int_t maxd=5)
Method set maximum number of digits permitted for the axis labels above which the notation with 10^N ...
Width_t GetGridWidth() const
Int_t GetStripDecimals() const
void GetExponentOffset(Float_t &xoff, Float_t &yoff, Option_t *axis="X") const
Method returns X and Y offset of the axis 10^n notation.
virtual void SetText(Double_t x, Double_t y, const char *text)
static time_t MktimeFromUTC(tm_t *tmstruct)
Equivalent of standard routine "mktime" but using the assumption that tm struct is filled with UTC,...
Short_t Max(Short_t a, Short_t b)
Returns the largest of a and b.
Double_t ATan2(Double_t y, Double_t x)
Returns the principal value of the arc tangent of y/x, expressed in radians.
Double_t Sqrt(Double_t x)
Returns the square root of x.
LongDouble_t Power(LongDouble_t x, LongDouble_t y)
Returns x raised to the power y.
Short_t Min(Short_t a, Short_t b)
Returns the smallest of a and b.
Double_t Cos(Double_t)
Returns the cosine of an angle of x radians.
Double_t Sin(Double_t)
Returns the sine of an angle of x radians.
Double_t Log10(Double_t x)
Returns the common (base-10) logarithm of x.
Short_t Abs(Short_t d)
Returns the absolute value of parameter Short_t d.