Bug 272578 - Wrong intervals between points when density < all
Summary: Wrong intervals between points when density < all
Status: RESOLVED FIXED
Alias: None
Product: kst
Classification: Applications
Component: general (show other bugs)
Version: 2.0.3
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: kst
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-05-05 23:50 UTC by Nicolas Brisset
Modified: 2011-05-23 23:23 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments
Test case (7.06 KB, application/octet-stream)
2011-05-05 23:51 UTC, Nicolas Brisset
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Nicolas Brisset 2011-05-05 23:50:13 UTC
Version:           2.0.3
OS:                Linux

There are a few issues with point density:
- the low setting sometimes results in far too few points being drawn
- the medium setting has strange intervals
- maybe other issues...

Reproducible: Always

Steps to Reproduce:
Load the attached test file, to be used with the TWIN1 sample data file in the source tree. 
1) The medium setting has strange intervals (particularly on the left part of the plot)
2) Change the green curve's density to "Low": you get only one point!
3) Zoom maximum with medium: you get almost no point!


Expected Results:  
- The points should be evenly spaced (with the question of what to do when the x data points aren't evenly spaced: try to have the points evenly spaced in terms of abscissa, or in terms of number of samples? I prefer the first option) 
- There should be a few points with the low density in all cases, unless we've zoomed in so much that there really is only one data point left in the viewport. I think density should relate more to the number of visible points on screen than the number of samples skipped between two points. The rule could be something like:
- all: clear
- high: strive for 20 points for the curve (number possibly dependent on plot width in pixels?)
- medium: try to get 10 points
- low: 5 points

I think it'll take some experimenting to get it right, possibly we could remove one level. But it can't stay as is.

OS: all
Comment 1 Nicolas Brisset 2011-05-05 23:51:11 UTC
Created attachment 59667 [details]
Test case
Comment 2 Netterfield 2011-05-23 23:23:57 UTC
SVN commit 1233286 by netterfield:

BUG: 272578 

Fix point density:
  -points are evenly spaced in X.  Window size or aspect ratio are ignored.
  -low: 9  med: 27 high: 81

Seems to work ok(is) though I find this an odd feature.



 M  +5 -2      curve.cpp  
 M  +0 -1      equation.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1233286