Version: 0.94 (using KDE KDE 3.1.1) Installed from: RedHat RPMs OS: Linux I am new to using KST. I noticed that there is a problem when reading in ascii data. If the data is written in scientific notation with a capital E (ie. 1E-2) then kst cannot read it. If it comes from stdin with a capital E, then kst reads it just fine. Here's an example. I have three data files that should all result in the same plot. ==> test1.dat <== 1 0.1 2 0.3 3 0.2 ==> test2.dat <== 1 1e-1 2 3e-1 3 2e-1 ==> test3.dat <== 1 1E-1 2 3E-1 3 2E-1 Typing >> kst -x 1 -y 2 test1.dat works just fine. The plot comes up and looks good. Typing >> kst -x 1 -y 2 test2.dat still works just fine. Typing >> kst -x 1 -y 2 test3.dat doesn't give anything and kst exits. However, if I get test3.dat from stdin, >> cat test3.dat|kst -x 1 -y 2 stdin then it works just fine. I am working with some FORTRAN programs that output in the capital E scientific notation format. Also, on a side note, kst doesn't seem to plot the last data point in the file. Any fixes or help that you could provide on these issues would be greatly appreciated. Thanks, Karl
Argh, it's a 1 character regression that resulted from the datasources change. Will commit a fix shortly. Meanwhile there is a second bug reported here so I can't close the report yet.
Subject: kdeextragear-2/kst/kst/datasources/ascii CVS commit by staikos: Properly detect ascii files that use E instead of e for scientific notation. CCMAIL: 69645@bugs.kde.org M +1 -1 ascii.cpp 1.8 --- kdeextragear-2/kst/kst/datasources/ascii/ascii.cpp #1.7:1.8 @@ -259,5 +259,5 @@ bool understands_ascii(const QString& fi if (rc >= 2) { // FIXME: comments - if (QRegExp("^[\\s]*([0-9\\-\\.e]+[\\s]+)+[\\n]*$").exactMatch(s)) { + if (QRegExp("^[\\s]*([0-9\\-\\.eE]+[\\s]+)+[\\n]*$").exactMatch(s)) { return true; }
Subject: kdeextragear-2/kst/kst CVS commit by staikos: draw the last point in graphs. I'm not sure if this is entirely correct, but it definitely fixes this bug. The problem is that there might be unexpected consequences, so this needs lots of testing before release. CCMAIL: 69645-done@bugs.kde.org M +1 -1 kstplot.cpp 1.27 --- kdeextragear-2/kst/kst/kstplot.cpp #1.26:1.27 @@ -1195,5 +1195,5 @@ void KstPlot::paint(QPainter &p, double last_y1 = Y1; - for (i_pt = i0+1; i_pt < iN; i_pt++) { + for (i_pt = i0 + 1; i_pt <= iN; i_pt++) { X2 = last_x1;