|
From: Philipp K. J. <ja...@ie...> - 2014-10-26 17:15:24
|
The "plot smooth" facility has grown over time; currently it has eleven (11) suboptions, and I can see this number to grow even more. What's more, these suboptions do quite different things. I can identify four major groups: 1) smooth interpolations: csplines, acsplines, mcsplines, bezier, sbezier 2) visualization of point distributions kdens, cumulative, cnormal 3) dedupe frequency, unique 4) unwrap (which I have not yet figured out how to use) The only reason that they all are presented to the user as "smooth" options is that they all are implemented using similar facilities, but not because they are logically similar. (In particular items 1 and 2 do quite different things. And it's not even as if all of the suboptions add a "smooth curve" to the data - items 3 and 4 do not!). Question: would it make sense to break this up now, before it gets any bigger? And if yes: how? Since introducing new keyword(s) would imply a possibly non-backwards compatible change, now is the time to think about it! Here is one suggestion (total strawman - just to get the discussion going): item 1: plot smooth ... (interpolations) item 2: plot distrib ... (point distributions) item 3: plot dedupe ... (?) item 4: plot unwrap ... Full plot commands would then look like: plot "data" u 1:2 smooth csplines plot "data" u 1:2 distrib kdens plot "data" u 1:2 dedupe unique and so on. Question: is this a good idea? And: is this worth it? More importantly: is there some refactoring that could/should occur at the same time on the implementation side? One thing I foresee is that people will continue to add additional algorithms (3 have been added since I last looked) - for instance, I am toying with an algorithm to do LOWESS interpolation, and I can also see the desire to add new smoothing kernels to kdens. And on and on. Would it make sense to pull things apart now, both from the user-interface point of view, and on the implementation side? Best, Ph. |