[Kst] extragear/graphics/kst/src/libkstapp
Andrew Walker
arwalker at sumusltd.com
Tue Feb 28 00:41:15 CET 2006
SVN commit 514321 by arwalker:
CCBUG:121534 Make existing code clearer in its intent
M +9 -5 kst2dplot.cpp
--- trunk/extragear/graphics/kst/src/libkstapp/kst2dplot.cpp #514320:514321
@@ -2937,15 +2937,19 @@
auto_tick = _autoTickYLast;
} else if (is_log) {
if (max - min <= (double)majorDensity && max - min > 1.5) {
+ // show in logarithmic mode with major ticks nicely labelled and 9 minor ticks
+ // between each major label...
auto_tick = 9;
tick = 1.0;
} else if (max - min >= (double)majorDensity) {
+ // show in logarithmic mode with major ticks nicely labelled and no minor ticks...
auto_tick = 0;
tick = floor((max - min) / (double)majorDensity);
if (tick == 1.0) {
auto_tick = 9;
}
} else {
+ // show in "linear" mode with major ticks linearly spaced and no minor ticks...
auto_tick = 0;
Exp = pow(10.0, floor(log10(St)));
@@ -2960,16 +2964,16 @@
// determine tick interval...
Exp = 0;
if (base == 60) {
- if ((b60_ticks[0]*0.7<St) &&
- (b60_ticks[n_b60_ticks-1]>St*0.7)) {
+ if ((b60_ticks[0]*0.7 < St) &&
+ (b60_ticks[n_b60_ticks-1] > St*0.7)) {
Exp = 1.0;
ticks = b60_ticks;
autominor = b60_autominor;
nt = n_b60_ticks;
}
} else if (base == 24) {
- if ((b24_ticks[0]*0.7<St) &&
- (b24_ticks[n_b24_ticks-1]>St*0.7)) {
+ if ((b24_ticks[0]*0.7 < St) &&
+ (b24_ticks[n_b24_ticks-1] > St*0.7)) {
Exp = 1.0;
ticks = b24_ticks;
autominor = b24_autominor;
@@ -2977,7 +2981,7 @@
}
}
- if (Exp<0.5) {
+ if (Exp < 0.5) {
Exp = pow(10.0, floor(log10(St)));
}
More information about the Kst
mailing list