134 const char* where =
"PaintAxis";
147 Double_t phil, phi, sinphi, cosphi, asinphi, acosphi;
148 Double_t binLow = 0., binLow2 = 0., binLow3 = 0.;
149 Double_t binHigh = 0., binHigh2 = 0., binHigh3 = 0.;
150 Double_t binWidth = 0., binWidth2 = 0., binWidth3 = 0.;
153 Double_t xtick0, xtick1, dxtick = 0;
161 xx0 = xx1 = yy0 = yy1 = 0;
162 Double_t xxmin, xxmax, yymin, yymax;
163 xxmin = xxmax = yymin = yymax = 0;
167 Double_t xmnlog, x00, x11, h2, h2sav, axmul,
y;
170 Int_t nlabels, nticks, nticks0, nticks1;
171 Int_t i, j, k,
l, decade, ltick;
175 Int_t iexe, if1, if2, na, nf, ih1, ih2, nbinin, nch, kmod;
176 Int_t optionLog, optionBlank, optionVert, optionPlus, optionMinus, optionUnlab, optionPara;
177 Int_t optionDown, optionRight, optionLeft, optionCent, optionEqual, optionDecimals = 0, optionDot;
178 Int_t optionY, optionText, optionGrid, optionSize, optionNoopt, optionInt, optionM, optionUp, optionX;
181 Int_t xalign, yalign;
182 Int_t nn1, nn2, nn3, n1a, n2a, n3a, nb2, nb3;
183 Int_t nbins = 10, n1aold, nn1old;
209 chtemp = &kchtemp[0];
229 if (strchr(chopt,
'G')) optionLog = 1;
231 if (strchr(chopt,
'B')) optionBlank = 1;
232 else optionBlank = 0;
233 if (strchr(chopt,
'V')) optionVert = 1;
235 if (strchr(chopt,
'+')) optionPlus = 1;
237 if (strchr(chopt,
'-')) optionMinus = 1;
238 else optionMinus = 0;
239 if (strchr(chopt,
'U')) optionUnlab = 1;
240 else optionUnlab = 0;
241 if (strchr(chopt,
'P')) optionPara = 1;
243 if (strchr(chopt,
'O')) optionDown = 1;
245 if (strchr(chopt,
'R')) optionRight = 1;
246 else optionRight = 0;
247 if (strchr(chopt,
'L')) optionLeft = 1;
249 if (strchr(chopt,
'C')) optionCent = 1;
251 if (strchr(chopt,
'=')) optionEqual = 1;
252 else optionEqual = 0;
253 if (strchr(chopt,
'Y')) optionY = 1;
255 if (strchr(chopt,
'T')) optionText = 1;
257 if (strchr(chopt,
'W')) optionGrid = 1;
259 if (strchr(chopt,
'S')) optionSize = 1;
261 if (strchr(chopt,
'N')) optionNoopt = 1;
262 else optionNoopt = 0;
263 if (strchr(chopt,
'I')) optionInt = 1;
265 if (strchr(chopt,
'M')) optionM = 1;
267 if (strchr(chopt,
'0')) optionUp = 1;
269 if (strchr(chopt,
'X')) optionX = 1;
271 if (strchr(chopt,
't')) optionTime = 1;
273 if (strchr(chopt,
'.')) optionDot = 1;
288 Error(where,
"Invalid number of divisions: %d", ndiv);
300 if (gridlength == 0) gridlength = 0.8;
301 linegrid =
new TLine();
332 Int_t year, mm, dd, hh, mi, ss;
333 if (sscanf(stringtimeoffset.
Data(),
"%d-%d-%d %d:%d:%d", &year, &mm, &dd, &hh, &mi, &ss) == 6) {
335 tp.tm_year = year - 1900;
347 timeoffset = mktime(&tp);
362 TString sdp = stringtimeoffset(ids + 1, lns);
363 sscanf(sdp.
Data(),
"%g", &dp);
368 Error(where,
"Time offset has not the right format");
374 wmin += timeoffset - (int)(timeoffset);
375 wmax += timeoffset - (int)(timeoffset);
379 time_t timetp = (time_t)((
Long_t)(timeoffset));
382 if (
range > 60) rangeBase = 60 * 20;
383 if (
range > 3600) rangeBase = 3600 * 20;
384 if (
range > 86400) rangeBase = 86400 * 20;
385 if (
range > 2419200) rangeBase = 31556736;
387 if (
range > 31536000) {
388 tp0 = gmtime(&timetp);
395 rangeBase = (timetp - mktime(tp0));
396 rangeOffset = (
Double_t)(rangeBase);
404 n2a = (ndiv % 10000 - n1a) / 100;
423 if (
wmin ==
wmax || ndiv == 0 || n1a <= 1 || optionLog) {
429 if ((
wmax -
wmin) < 1 && optionInt) {
430 Error(where,
"option I not available");
433 if (!optionNoopt || optionInt) {
441 if (binLow !=
Double_t(
int(binLow)) || binWidth !=
Double_t(
int(binWidth))) {
457 yymin = rtyw * (binLow -
wmin) +
ymin;
458 yymax = rtyw * (binHigh -
wmin) +
ymin;
462 xxmin = rtxw * (binLow -
wmin) +
xmin;
463 xxmax = rtxw * (binHigh -
wmin) +
xmin;
471 yymin = alfa * xxmin +
beta;
472 yymax = alfa * xxmax +
beta;
488 if (!optionNoopt && n2a > 1 && binWidth > 0) {
494 if (!optionNoopt && n3a > 1 && binWidth2 > 0) {
508 ratio1 = 1 / (rwxmax - rwxmin);
509 ratio2 = 1 / (rwymax - rwymin);
510 x0 = ratio1 * (
xmin - rwxmin);
511 x1 = ratio1 * (
xmax - rwxmin);
512 y0 = ratio2 * (
ymin - rwymin);
513 y1 = ratio2 * (
ymax - rwymin);
514 if (!optionNoopt || optionInt) {
515 xx0 = ratio1 * (xxmin - rwxmin);
516 xx1 = ratio1 * (xxmax - rwxmin);
517 yy0 = ratio2 * (yymin - rwymin);
518 yy1 = ratio2 * (yymax - rwymin);
521 if ((x0 ==
x1) && (y0 ==
y1)) {
522 Error(where,
"length of axis is 0");
533 if (
fAxis) maxDigits = fgMaxDigits;
540 if (!
gPad->IsBatch()) {
541 gVirtualX->GetCharacterUp(chupxvsav, chupyvsav);
547 if (axis_length == 0) {
548 Error(where,
"length of axis is 0");
551 if (!optionNoopt || optionInt) {
552 axis_lengthN =
TMath::Sqrt((xx1 - xx0) * (xx1 - xx0) + (yy1 - yy0) * (yy1 - yy0));
553 axis_length0 =
TMath::Sqrt((xx0 - x0) * (xx0 - x0) + (yy0 - y0) * (yy0 - y0));
564 wmin += timeoffset - (int)(timeoffset) + rangeOffset;
565 wmax += timeoffset - (int)(timeoffset) + rangeOffset;
602 if (x0 ==
x1 &&
y1 > y0) mside = -1;
603 if (optionPlus) mside = 1;
604 if (optionMinus) mside = -1;
605 if (optionPlus && optionMinus) mside = 0;
608 if (optionEqual) lside = mside;
609 if (optionPlus && optionMinus) {
611 if (optionEqual) lside = 1;
616 if (xmside >= 0) tick_side = 1;
618 if (optionSize) atick[0] = tick_side * axis_length *
fTickSize;
619 else atick[0] = tick_side * axis_length * 0.03;
621 atick[1] = 0.5 * atick[0];
622 atick[2] = 0.5 * atick[1];
625 if ((x0 ==
x1) && (
y1 > y0)) grid_side = -1;
649 if (!drawGridOnly && strlen(
GetTitle())) {
653 charheight = charheight /
gPad->GetWh();
657 if (
x1 == x0) ylabel = xlside * 1.6 * charheight * toffset;
658 else ylabel = xlside * 1.3 * charheight * toffset;
659 if (
y1 == y0) ylabel = xlside * 1.6 * charheight * toffset;
662 else axispos = axis_length;
667 Rotate(axispos, ylabel, cosphi, sinphi, x0, y0, xpl1, ypl1);
672 Rotate(axispos, ylabel, cosphi, sinphi, x0, y0, xpl1, ypl1);
676 phil = (
kPI + phil) * 180 /
kPI,
684 Rotate(axispos, ylabel, cosphi, sinphi, x0, y0, xpl1, ypl1);
689 Rotate(axispos, ylabel, cosphi, sinphi, x0, y0, xpl1, ypl1);
701 if (ndiv == 0)
goto L210;
713 if (optionText &&
GetLabelFont() % 10 != 3) charheight *= 0.66666;
723 if (!optionUp && !optionDown && !optionY && !optionUnlab) {
738 if (nl > 50)
angle = 90;
781 if (!
gPad->IsBatch()) {
782 if (cosphi > 0)
gVirtualX->SetCharacterUp(-sinphi, cosphi);
783 else gVirtualX->SetCharacterUp(sinphi, -cosphi);
785 if (optionVert)
gVirtualX->SetCharacterUp(0, 1);
786 if (optionPara)
gVirtualX->SetCharacterUp(-sinphi, cosphi);
787 if (optionDown)
gVirtualX->SetCharacterUp(cosphi, sinphi);
793 if (x0 ==
x1) xalign = 3;
794 if (y0 !=
y1) yalign = 2;
795 if (optionCent) xalign = 2;
796 if (optionRight) xalign = 3;
797 if (optionLeft) xalign = 1;
802 if (cosphi * sinphi > 0) xalign = 1;
803 if (cosphi * sinphi < 0) xalign = 3;
809 if (optionPlus && !optionMinus) {
815 if (lside < 0) ylabel += atick[0];
819 if (optionMinus && !optionPlus) {
832 if (mside <= 0) ylabel -=
TMath::Abs(atick[0]);
834 if (optionLog) ylabel -= 0.5 * charheight;
840 if (optionText) ylabel /= 2;
847 dxtick = (binHigh - binLow) /
Double_t(nticks - 1);
850 if (optionNoopt && !optionInt) dxtick = axis_length /
Double_t(nticks - 1);
851 else dxtick = axis_lengthN /
Double_t(nticks - 1);
854 for (k = 0; k < nticks; k++) {
856 if (k % nn3 == 0) ltick = 1;
857 if (k % nn2 == 0) ltick = 0;
861 xtick = zz * axis_length /
TMath::Abs(rwma - rwmi);
868 if (!mside) ytick -= atick[ltick];
869 if (optionNoopt && !optionInt) {
870 Rotate(xtick, ytick, cosphi, sinphi, x0, y0, xpl2, ypl2);
871 Rotate(xtick, atick[ltick], cosphi, sinphi, x0, y0, xpl1, ypl1);
874 Rotate(xtick, ytick, cosphi, sinphi, xx0, yy0, xpl2, ypl2);
875 Rotate(xtick, atick[ltick], cosphi, sinphi, xx0, yy0, xpl1, ypl1);
878 if ((x0 !=
x1) && (y0 !=
y1)) {
881 if (cosphi > 0) ypl1 = ypl2 + atick[ltick];
882 else ypl1 = ypl2 - atick[ltick];
885 xpl1 = 0.5 * (xpl1 + xpl2);
887 ypl1 = 0.5 * (ypl1 + ypl2) + atick[ltick];
888 ypl2 = 0.5 * (ypl1 + ypl2) - atick[ltick];
892 if (!drawGridOnly)
PaintLineNDC(xpl1, ypl1, xpl2, ypl2);
896 if (optionNoopt && !optionInt) {
897 Rotate(xtick, 0, cosphi, sinphi, x0, y0, xpl2, ypl2);
898 Rotate(xtick, grid_side * gridlength, cosphi, sinphi, x0, y0, xpl1, ypl1);
901 Rotate(xtick, 0, cosphi, sinphi, xx0, yy0, xpl2, ypl2);
902 Rotate(xtick, grid_side * gridlength, cosphi, sinphi, xx0, yy0, xpl1, ypl1);
912 if ((!optionNoopt || optionInt) && axis_length0) {
913 nticks0 =
Int_t(axis_length0 / dxtick);
914 if (nticks0 > 1000) nticks0 = 1000;
915 for (k = 0; k <= nticks0; k++) {
917 if (k % nn3 == 0) ltick = 1;
918 if (k % nn2 == 0) ltick = 0;
920 if (!mside) ytick0 -= atick[ltick];
925 Rotate(xtick0, ytick0, cosphi, sinphi, xx0, yy0, xpl2, ypl2);
926 Rotate(xtick0, atick[ltick], cosphi, sinphi, xx0, yy0, xpl1, ypl1);
928 if ((x0 !=
x1) && (y0 !=
y1)) {
931 if (cosphi > 0) ypl1 = ypl2 + atick[ltick];
932 else ypl1 = ypl2 - atick[ltick];
935 xpl1 = 0.5 * (xpl1 + xpl2);
937 ypl1 = 0.5 * (ypl1 + ypl2) + atick[ltick];
938 ypl2 = 0.5 * (ypl1 + ypl2) - atick[ltick];
942 if (!drawGridOnly)
PaintLineNDC(xpl1, ypl1, xpl2, ypl2);
946 Rotate(xtick0, 0, cosphi, sinphi, xx0, yy0, xpl2, ypl2);
947 Rotate(xtick0, grid_side * gridlength, cosphi, sinphi, xx0, yy0, xpl1, ypl1);
956 if ((!optionNoopt || optionInt) && axis_length1) {
957 nticks1 = int(axis_length1 / dxtick);
958 if (nticks1 > 1000) nticks1 = 1000;
959 for (k = 0; k <= nticks1; k++) {
961 if (k % nn3 == 0) ltick = 1;
962 if (k % nn2 == 0) ltick = 0;
964 if (!mside) ytick1 -= atick[ltick];
969 Rotate(xtick1, ytick1, cosphi, sinphi, xx0, yy0, xpl2, ypl2);
970 Rotate(xtick1, atick[ltick], cosphi, sinphi, xx0, yy0, xpl1, ypl1);
972 if ((x0 !=
x1) && (y0 !=
y1)) {
975 if (cosphi > 0) ypl1 = ypl2 + atick[ltick];
976 else ypl1 = ypl2 - atick[ltick];
979 xpl1 = 0.5 * (xpl1 + xpl2);
981 ypl1 = 0.5 * (ypl1 + ypl2) + atick[ltick];
982 ypl2 = 0.5 * (ypl1 + ypl2) - atick[ltick];
986 if (!drawGridOnly)
PaintLineNDC(xpl1, ypl1, xpl2, ypl2);
989 Rotate(xtick1, 0, cosphi, sinphi, xx0, yy0, xpl2, ypl2);
990 Rotate(xtick1, grid_side * gridlength, cosphi, sinphi, xx0, yy0, xpl1, ypl1);
1001 if (!drawGridOnly && !optionUnlab) {
1005 if ((
wmin ==
wmax) || (ndiv == 0)) {
1006 Error(where,
"wmin (%f) == wmax (%f), or ndiv == 0",
wmin,
wmax);
1011 if (optionNoopt && !optionInt) dxlabel = axis_length /
Double_t(n1a);
1012 else dxlabel = axis_lengthN /
Double_t(n1a);
1015 if (!optionText && !optionTime) {
1037 if (iexe % 3 == 1) iexe += 2;
1038 else if (iexe % 3 == 2) iexe += 1;
1039 if (nexe < 0) nexe = -iexe;
1044 if2 = maxDigits - 2;
1052 if (!noExponent && nf > maxDigits) flexpo =
kTRUE;
1053 if (!noExponent && nf < -maxDigits) flexne =
kTRUE;
1064 if (nexe % 3 == 0 && ww <=
TMath::Power(10, maxDigits - 1))
break;
1076 if (nexe % 3 == 0 && ww >= rne)
break;
1081 for (i = maxDigits - 1; i > 0; i--) {
1087 if (wdyn <= 0.999 && na < maxDigits - 2) {
1105 coded = &chcoded[0];
1106 if (if1 > 14) if1 = 14;
1107 if (if2 > 14) if2 = 14;
1108 if (if2)
snprintf(coded, 8,
"%%%d.%df", if1, if2);
1109 else snprintf(coded, 8,
"%%%d.%df", if1 + 1, 1);
1114 snprintf(chtemp, 256,
"%g", dwlabel);
1115 Int_t ndecimals = 0;
1116 if (optionDecimals) {
1117 char* dot = strchr(chtemp,
'.');
1119 ndecimals = chtemp + strlen(chtemp) - dot;
1123 exp = strstr(chtemp,
"e-");
1125 sscanf(&
exp[2],
"%d", &ndecimals);
1130 if (optionM) nlabels = n1a - 1;
1134 for (k = 0; k <= nlabels; k++) {
1139 xlabel = zz * axis_length /
TMath::Abs(rwma - rwmi);
1143 else xlabel = dxlabel * k;
1145 if (optionM) xlabel += 0.5 * dxlabel;
1147 if (!optionText && !optionTime) {
1148 snprintf(label, 256, &chcoded[0], wlabel);
1156 if (label[
first] ==
'.') {
1157 strncpy(chtemp,
"0", 256);
1158 strlcat(chtemp, &label[
first], 256);
1159 strncpy(label, chtemp, 256);
1161 last = strlen(label);
1163 if (label[
first] ==
'-' && label[
first + 1] ==
'.') {
1164 strncpy(chtemp,
"-0", 256);
1165 strlcat(chtemp, &label[
first + 1], 256);
1166 strncpy(label, chtemp, 256);
1168 last = strlen(label);
1173 char* adot = strchr(label,
'.');
1174 if (adot) adot[ndecimals] = 0;
1177 while (label[last] ==
'0') {
1184 if (label[last] ==
'.') {
1193 && label[last] ==
'0') {
1194 strncpy(label,
"0", 256);
1203 timed = wlabel + (int)(timeoffset) - rangeOffset;
1204 timelabel = (time_t)((
Long_t)(timed));
1205 if (optionTime == 1) {
1206 utctis = localtime(&timelabel);
1209 utctis = gmtime(&timelabel);
1212 if (timeformat.
Length() < 220) timeformattmp = timeformat;
1213 else timeformattmp =
"#splitline{Format}{too long}";
1216 if (dwlabel < 0.9) {
1219 snprintf(label, 256,
"%%S%7.5f", modf(timed, &tmpdb));
1220 tmplast = strlen(label) - 1;
1223 while (label[tmplast] ==
'0') {
1234 strftime(label, 256, timeformattmp.
Data(), utctis);
1235 strncpy(chtemp, &label[0], 256);
1237 last = strlen(label) - 1;
1238 wlabel = wTimeIni + (k + 1) * dwlabel;
1244 if (optionNoopt && !optionInt)
1245 Rotate(xlabel, ylabel, cosphi, sinphi, x0, y0, xx, yy);
1246 else Rotate(xlabel, ylabel, cosphi, sinphi, xx0, yy0, xx, yy);
1247 if (y0 ==
y1 && !optionDown && !optionUp) {
1248 yy -= 0.80 * charheight;
1251 if (x0 !=
x1 && y0 !=
y1) {
1252 if (optionNoopt && !optionInt)
1253 Rotate(xlabel, 0, cosphi, sinphi, x0, y0, xx, yy);
1254 else Rotate(xlabel, 0, cosphi, sinphi, xx0, yy0, xx, yy);
1255 if (cosphi > 0) yy += ylabel;
1256 if (cosphi < 0) yy -= ylabel;
1259 if (!optionY || (x0 ==
x1)) {
1261 if (
first > last) strncpy(chtemp,
" ", 256);
1262 else strncpy(chtemp, &label[
first], 256);
1281 if (!optionText) lnlen = last -
first + 1;
1283 if (k + 1 > nhilab) lnlen = 0;
1285 for (
l = 1;
l <= lnlen;
l++) {
1286 if (!optionText) *chtemp = label[
first +
l - 2];
1288 if (lnlen == 0) strncpy(chtemp,
" ", 256);
1289 else strncpy(chtemp,
"1", 256);
1296 yy -= charheight * 1.3;
1303 if (flexe && !optionText && nexe) {
1304 snprintf(label, 256,
"#times10^{%d}", nexe);
1306 xfactor =
x1 - x0 + 0.1 * charheight;
1310 xfactor =
y1 - y0 + 0.1 * charheight;
1313 Rotate(xfactor, yfactor, cosphi, sinphi, x0, y0, xx, yy);
1329 if (optionLog && ndiv) {
1330 UInt_t xi1 = 0, xi2, wi, yi1 = 0, yi2,
hi, xl, xh;
1332 if ((
wmin ==
wmax) || (ndiv == 0)) {
1333 Error(where,
"wmin (%f) == wmax (%f), or ndiv == 0",
wmin,
wmax);
1337 Error(where,
"negative logarithmic axis");
1341 Error(where,
"negative logarithmic axis");
1345 if (xmnlog > 0) xmnlog += 1.E-6;
1346 else xmnlog -= 1.E-6;
1351 if (h2 > 0) h2 += 1.E-6;
1355 nbinin = ih2 - ih1 + 1;
1356 axmul = (x11 - x00) / (h2sav - xmnlog);
1361 if (xmnlog > 0 && (xmnlog -
Double_t(ih1) > 0)) labelnumber++;
1362 for (j = 1; j <= nbinin; j++) {
1367 if (x0 ==
x1 && j == 1) ylabel += charheight * 0.33;
1368 if (y0 ==
y1 && j == 1) ylabel -= charheight * 0.65;
1369 xone = x00 + axmul * (
Double_t(decade) - xmnlog);
1371 if (j < 0) printf(
"j=%d\n", j);
1372 if (x00 > xone)
goto L160;
1373 if ((xone - x11) >
epsilon)
break;
1376 if (!mside)
y -= atick[0];
1377 Rotate(xone,
y, cosphi, sinphi, x0, y0, xpl2, ypl2);
1378 Rotate(xtwo, atick[0], cosphi, sinphi, x0, y0, xpl1, ypl1);
1380 if ((x0 !=
x1) && (y0 !=
y1)) {
1383 if (cosphi > 0) ypl1 = ypl2 + atick[0];
1384 else ypl1 = ypl2 - atick[0];
1387 xpl1 = 0.5 * (xpl1 + xpl2);
1389 ypl1 = 0.5 * (ypl1 + ypl2) + atick[0];
1390 ypl2 = 0.5 * (ypl1 + ypl2) - atick[0];
1394 if (!drawGridOnly)
PaintLineNDC(xpl1, ypl1, xpl2, ypl2);
1397 Rotate(xone, 0, cosphi, sinphi, x0, y0, xpl2, ypl2);
1398 Rotate(xone, grid_side * gridlength, cosphi, sinphi, x0, y0, xpl1, ypl1);
1402 if (!drawGridOnly && !optionUnlab) {
1410 while (last >
first) {
1411 if (label[last] !=
'0')
break;
1415 if (label[last] ==
'.') {
1421 snprintf(label, 256,
"%d", labelnumber);
1424 Rotate(xone, ylabel, cosphi, sinphi, x0, y0, xx, yy);
1425 if ((x0 ==
x1) && !optionPara) {
1428 if (labelnumber == 0) nch = 1;
1430 xx += nch * charheight;
1433 xx += 0.25 * charheight;
1436 xx += 0.25 * charheight;
1438 if ((y0 ==
y1) && !optionDown && !optionUp) {
1439 if (noExponent) yy += 0.33 * charheight;
1441 if (n1a == 0)
goto L210;
1442 kmod = nbinin / n1a;
1443 if (kmod == 0) kmod = 1000000;
1444 if ((nbinin <= n1a) || (j == 1) || (j == nbinin) || ((nbinin > n1a)
1445 && (j % kmod == 0))) {
1446 if (labelnumber == 0) {
1449 else if (labelnumber == 1) {
1457 snprintf(chtemp, 256,
"10^{%d}", labelnumber);
1468 for (k = 2; k < 10; k++) {
1472 if (x00 > xone)
continue;
1473 if (xone > x11)
goto L200;
1475 if (!mside)
y -= atick[1];
1477 Rotate(xone,
y, cosphi, sinphi, x0, y0, xpl2, ypl2);
1478 Rotate(xtwo, atick[1], cosphi, sinphi, x0, y0, xpl1, ypl1);
1480 if ((x0 !=
x1) && (y0 !=
y1)) {
1483 if (cosphi > 0) ypl1 = ypl2 + atick[1];
1484 else ypl1 = ypl2 - atick[1];
1487 xpl1 = 0.5 * (xpl1 + xpl2);
1489 ypl1 = 0.5 * (ypl1 + ypl2) + atick[1];
1490 ypl2 = 0.5 * (ypl1 + ypl2) - atick[1];
1495 if ((nbinin <= idn) || ((nbinin > idn) && (k == 5))) {
1496 if (!drawGridOnly)
PaintLineNDC(xpl1, ypl1, xpl2, ypl2);
1500 if (moreLogLabels && !optionUnlab && !drawGridOnly && !overlap) {
1506 if (labelnumber - 1 == 0) {
1509 else if (labelnumber - 1 == 1) {
1510 snprintf(chtemp, 256,
"%d", 10 * k);
1513 snprintf(chtemp, 256,
"%d#times10^{%d}", k, labelnumber - 1);
1516 Rotate(xone, ylabel, cosphi, sinphi, x0, y0, xx, yy);
1517 if ((x0 ==
x1) && !optionPara) {
1520 if (labelnumber == 0) nch = 1;
1522 xx += nch * charheight;
1525 if (labelnumber >= 0) xx += 0.25 * charheight;
1526 else xx += 0.50 * charheight;
1529 xx += 0.25 * charheight;
1531 if ((y0 ==
y1) && !optionDown && !optionUp) {
1532 if (noExponent) yy += 0.33 * charheight;
1535 if ((x0 !=
x1) && (y0 !=
y1)) {
1536 Rotate(xone, ylabel, cosphi, sinphi, x0, y0, xx, yy);
1537 if (cosphi > 0) yy += ylabel;
1548 xi1 =
gPad->XtoAbsPixel(u);
1549 yi1 =
gPad->YtoAbsPixel(
v);
1554 xi2 =
gPad->XtoAbsPixel(u);
1555 yi2 =
gPad->YtoAbsPixel(
v);
1558 if ((x0 ==
x1 && yi1 -
hi <= yi2) || (y0 ==
y1 && xl + wi >= xh)) {
1573 if (optionGrid && nbinin <= 5 && ndiv > 100) {
1574 Rotate(xone, 0, cosphi, sinphi, x0, y0, xpl2, ypl2);
1575 Rotate(xone, grid_side * gridlength, cosphi, sinphi, x0, y0, xpl1, ypl1);
1588 if (optionGrid)
delete linegrid;