Version: (using KDE KDE 3.2.3KDE 1.2) Installed from: Mac OS X (Fink) PackagesMac OS X (Fink) Packages Compiler: gcc version 3.3 OS: Other NAN samples do not break lines anymore. The points are not shown (if point symbols are selected) but a line is drawn between the valide samples. Expected behavior: the line should break so that it is easy to detect NAN samples.
CVS commit by arwalker: Do not interpolate across NaN values. CCMAIL: 90932-done@bugs.kde.org M +147 -139 kst2dplot.cpp 1.279 --- kdeextragear-2/kst/kst/kst2dplot.cpp #1.278:1.279 @@ -1826,5 +1826,4 @@ void Kst2DPlot::resize(const QSize& size void Kst2DPlot::updateTieBox(QPainter& p) { - //kdDebug() << "Update tie box for " << tagName() << endl; QRect tr = GetTieBoxRegion(); p.setPen(foregroundColor()); @@ -1862,5 +1861,7 @@ void Kst2DPlot::paint(KstPaintType type, } - /* check for optimizations */ + // + // check for optimizations + // QSize sizeNew = size(); QRect alignment = KST::alignment.limits(geometry()); @@ -1928,5 +1929,7 @@ void Kst2DPlot::draw() { void Kst2DPlot::draw(QPainter &p, KstPaintType type, double resolutionEnhancement) { - /* Draws to the buffer */ + // + // draws to the buffer + // if (_zoomPaused) { @@ -2865,9 +2868,9 @@ void Kst2DPlot::highlightNearestDataPoin } if (found) { - QString comma; if (!msg.isEmpty()) { - comma = ", "; + msg = QString("%5, %4 (%1, %2, %3)").arg(xpos,0,'G').arg(ypos,0,'G').arg(Z,0,'G').arg(_images[i+1]->tagName()).arg(msg); + } else { + msg = QString("%4 (%1, %2, %3)").arg(xpos,0,'G').arg(ypos,0,'G').arg(Z,0,'G').arg(_images[i+1]->tagName()); } - msg += comma + QString("%4 (%1, %2, %3)").arg(xpos,0,'G').arg(ypos,0,'G').arg(Z,0,'G').arg(_images[i+1]->tagName()); } } @@ -4782,4 +4785,5 @@ void Kst2DPlot::plotCurves(QPainter& p, if (c->hasLines()) { QPointArray points(MAX_NUM_POLYLINES); + bool foundNan; int lastPlottedX = 0; int lastPlottedY = 0; @@ -4825,4 +4829,5 @@ void Kst2DPlot::plotCurves(QPainter& p, c->point(++i_pt, rX, rY); + foundNan = false; // @@ -4831,4 +4836,5 @@ void Kst2DPlot::plotCurves(QPainter& p, while ((isnan(rX) || isnan(rY)) && i_pt < iN) { #undef isnan + foundNan = true; c->point(++i_pt, rX, rY); } @@ -4847,4 +4853,5 @@ void Kst2DPlot::plotCurves(QPainter& p, last_y1 = Y1; + if (!foundNan) { if (floor(X1) == floor(X2)) { if (overlap) { @@ -5005,4 +5012,5 @@ void Kst2DPlot::plotCurves(QPainter& p, } } // end if (X1 == X2) + } // end if (!foundNan) } // end if (i_pt <= iN) } // end while