Bug 346243 - plot created from wizard does not display first and last point of two columns of data containing header line
Summary: plot created from wizard does not display first and last point of two columns...
Status: RESOLVED WORKSFORME
Alias: None
Product: kst
Classification: Applications
Component: plotting (show other bugs)
Version: 2.0.6
Platform: macOS (DMG) macOS
: NOR major
Target Milestone: ---
Assignee: kst
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-04-15 23:09 UTC by Roger Wehage
Modified: 2022-11-13 05:14 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Roger Wehage 2015-04-15 23:09:57 UTC
Following the simple.dat example in the Kst manual, the file contains one line with x y header, The file contains eleven additional lines with the first column consisting of integers ranging from -5 to 5 and the second column consisting of numbers ranging from 6.25 down to 0 and back up to 6.25. All numbers are space separated. The DataWizard is used to load the file and set up the plot. The resulting plot starts not with the first data point -5 6.25 as expected but with the second data point -4 4. And it ends not with the last data point 5 6.25 as expected but with the next to last data point 4 4.

Reproducible: Always

Steps to Reproduce:
1. Started with the simple.dat file created by hand in Sublime Text to insure that there were no hidden characters that might cause problems.
2. Launched the Kst2 application Kst 2.0.6 - A data viewing program. Revision 1307223
3. Selected Data Wizard.
4. Located /Users/raw915/kst_data/simple.dat file and clicked on  ASCII file Configure...
5. Window on left shows 12 lines exactly as in file.
6. Set data starts at line: 2 and Read field names from line: 1.
7. All else left as default. Set Interpret INDEX As INDEX.
8. Clicked OK and then CONTINUE.
9. Moved y column to Selected data: and hit Continue.
10. Under Data range set start at 1 and Read to end.
11. Set Create XY plots and Create from field: x
12. All else left as default and clicked Continue.
13. Used all default values except set Points only (Also tested Lines only and Points and Lines)
14. Clicked on the Done button, and the faulty plot appeared.

Actual Results:  
The plot appears with the displayed x-axis from -4 to 4 and the displayed y-axis from 0 to 4. The x-axis is labeled x and the y-axis is labeled y as expected. Nine points are drawn corresponding to rows 3 through 11 in the file. The first point -5 6.25 in row 2 and the last point 5 6.25 in row 12 are not drawn. When lines are drawn, they do not extend left beyond the -4 4 or extend right right beyond the 4 4 points. This indicates that points -5 6.25 and 5 6.25 have not been included in the plot. I dragged the plot and zoomed out, and was is clear that the endpoints have not been included in the plot.

Expected Results:  
The software should have included the first point -5 6.25 in row 2 and the last point 5 6.25 in row 12 of the data file in the plot. Markers for the two points should appear in the plot when markers are selected, and lines joining these two points to their respective neighbor points should be drawn when lines are selected.

This version of Kst was installed using the downloaded dmg file. It is running on a MacBook Pro (15-inch, Mid 2012) 2.6 GHz Intel Core i7 with 8 GB 1600 MHz DDR3. The latest OS X Yosemite Version 10.10.3 and Xcode Version 6.3 (6D570) are installed.
Comment 1 Roger Wehage 2015-04-16 00:18:22 UTC
There is a point of confusion on the index number assigned to the first data point. In the Configure ASCII file window of  Data Wizard it was required to set Data starts at line: 2 and Read field names from line: 1. In the next window the user is given the option of setting Start: under Data Range. The Start: number defaults to 0, but it isn't clear that it should not start at 1, because the previous window indicated that the first data point was numbered 1. And read to end is the only option. So changing Start: to 0 and selecting Read to end gives the correct starting results byt not the correct ending results. In this case the first point is included, but the last point is not.
Comment 2 Roger Wehage 2015-04-16 12:27:21 UTC
There is a point of confusion on the index number assigned to the first data point. In the Configure ASCII file window of  Data Wizard it was required to set Data starts at line: 2 and Read field names from line: 1. In the next window the user is given the option of setting Start: under Data Range. The Start: number defaults to 0, but it isn't clear whether numbering should start from 0 or 1, because the previous window implied that lines were numbered starting from 1. Thus setting Start: to 0 will include the first point. However, Read to end is the only option for the the last point. Thus changing Start: to 0 and selecting Read to end will give the correct starting results but not the correct ending results. In this case the first point is included, but the last point is not.

A workaround is to include a blank line at the end of the data file. In this case the Sublime Text editor shows 13 lines in the simple.dat file instead of the original 12. In essence, a hidden \n was added to the end of the last line. The key, apparently, is that each valid line must be terminated with a \n (in Linux and Unix) presumably. Not sure what Windows would require.
Comment 3 Justin Zobel 2022-10-14 05:46:52 UTC
Thank you for reporting this bug in KDE software. As it has been a while since this issue was reported and confirmed, can we please ask you to see if you can reproduce the issue with a recent software version?

If you can reproduce the issue, please change the status to "CONFIRMED" when replying. Thank you!
Comment 4 Bug Janitor Service 2022-10-29 05:02:22 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 5 Bug Janitor Service 2022-11-13 05:14:38 UTC
This bug has been in NEEDSINFO status with no change for at least
30 days. The bug is now closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

Thank you for helping us make KDE software even better for everyone!