smooth - Smoothing Zedgraph linegraphs without 'bumps' -


when use zedgraph linegraphs , set issmooth true, lines nicely curved instead of having hard corners/angles.

while looks better graphs -in humble opinion- there small catch. smoothing algorithm makes line take little 'dive' or 'bump' before going upwards or downwards.

in cases, if datapoint smooth, isn't problem, if datapoints go 0 15, 'dive' makes line go under x-axis, makes seems though there datapoints below 0 (which not case).

how can fix (prefably ;)

no simple answer this. keeping tension near 0 simplest solution.

zedgraph uses gdi's drawcurve tension parameter apply smoothness, hermite interpolation. can try implement own cosine interpolation, keep local extremes because of nature. can @ link see why: http://local.wasp.uwa.edu.au/~pbourke/miscellaneous/interpolation/

edit: website down. here cached version of page: http://web.archive.org/web/20090920093601/http://local.wasp.uwa.edu.au/~pbourke/miscellaneous/interpolation/


Comments

Popular posts from this blog

c++ - How do I get a multi line tooltip in MFC -

asp.net - In javascript how to find the height and width -

c# - DataTable to EnumerableRowCollection -