[Kst] kdeextragear-2/kst/kst
Rick Chern
rchern at interchange.ubc.ca
Mon Aug 23 19:32:04 CEST 2004
CVS commit by rchern:
Fix y minor ticks in log mode.
M +2 -2 kst2dplot.cpp 1.242
--- kdeextragear-2/kst/kst/kst2dplot.cpp #1.241:1.242
@@ -4571,5 +4571,5 @@ void Kst2DPlot::plotAxes(QPainter& p, QR
}
for (j = 1; j < _yMinorTicks; j++) {
- Y2 = (YTick -(log10((double)j/((double)_yMinorTicks)*(pow(10,YTick)-1.0)+1.0)/YTick)) * (double)ytick_px + Y1;
+ Y2 = (1.0 - log10((double)j/((double)_yMinorTicks)*(pow(10,YTick)-1.0)+1.0)/YTick) * (double)ytick_px + Y1;
if (Y2 > ytop_bdr_px && Y2 < y_px - ybot_bdr_px) {
p.drawLine(d2i(xleft_bdr_px),
@@ -4747,5 +4747,5 @@ void Kst2DPlot::plotGridLines(QPainter&
//draw minor lines
for (j = 1; j < _yMinorTicks; j++) {
- Y2 = YTick - (log10((double)j/((double)_yMinorTicks)*(pow(10,YTick)-1.0)+1.0)/YTick) * (double)ytick_px + Y1;
+ Y2 = (1.0 - (log10((double)j/((double)_yMinorTicks)*(pow(10,YTick)-1.0)+1.0)/YTick)) * (double)ytick_px + Y1;
if (_yMinorGrid && Y2 > ytop_bdr_px && Y2 < y_px - ybot_bdr_px) {
p.setPen(QPen(_minorGridColor, 0, Qt::DotLine));
More information about the Kst
mailing list