Version: 1.1.0_devel (using KDE 3.3.0, SuSE) Compiler: gcc version 3.3.4 (pre 3.3.5 20040809) OS: Linux (i686) release 2.6.8-24.11-default skip is borked. Demo: make a plot of a dirfile_maker file 2 curves both with points but no lines for clarity 10 frames of sine, no skip 10 frames of sine, with skip set. (need a second INDEX vector for X) We will change starting frame and the skip value for curve 2 Case 1: starting frame = 0 and skip = 1 for both vectors of curve 2 everything seems fine: curve 2 has the 1st sample of each frame Case 2: starting frame = 10 (anything !=0), curve 2 skip = 1 The X (INDEX) vector seems to have the correct value, but the Y (sine) vector seems to be shifted by by ~19 samples Case 3: starting frame = 10 (anything !=0), curve 2 skip = 2 X and Y vectors are both shifted, so the points are correct, but start 1 frame early, and end 1 frame early
Created attachment 9413 [details] case 1
Created attachment 9414 [details] case 2
Created attachment 9415 [details] case 3
Investigating
Note: this is specific to SPF!=1 right?
Created attachment 9472 [details] What I have for skip This is what I see. Everything appears to line up just right. Those curves are with no skip, and skip=1, 2, 3. Can you attach your data file so I can try to reproduce this with it?
Yup. That is case 1 above. "Everything seems fine". Try starting at a frame other than frame 0 (case 2 and 3). I was using the dirfile_writer output.
CVS commit by staikos: seems to fix Skip alignment errors? Please reopen with a new testcase if there are still problems BUG: 98515 M +1 -1 kstrvector.cpp 1.79 --- kdeextragear-2/kst/kst/kstrvector.cpp #1.78:1.79 @@ -468,5 +468,5 @@ KstObject::UpdateType KstRVector::doUpda // new_f0 == 0 results in (new_f0 - 1)/Skip being -0.x which rounds the // wrong way on us. Therefore new_f0 == 0 is a special case. - new_f0 = new_f0 == 0 ? 0 : (((new_f0 - 1)/Skip) + 1) * Skip - 1; + new_f0 = new_f0 == 0 ? 0 : (((new_f0 - 1)/Skip) + 1) * Skip; new_nf = tmp_fn - new_f0 + 1; }