Step functions

Have a suggestion for improving DPlot or a question about existing features? Let us know

Moderator: DPlotAdmin

Post Reply
aesculap
Posts: 15
Joined: Wed May 13, 2009 1:25 am

Step functions

Post by aesculap »

Hello,

I was wondering how to display step-function-data correcty.
Maybe an option to the "Equal Intervals" - interpolation dialog could be added to do no interpolation at all; so the missing data values would be added (if only changes are logged) and the resulting curve would look much more like an step function.
User avatar
DPlotAdmin
Posts: 2312
Joined: Tue Jun 24, 2003 9:34 pm
Location: Vicksburg, Mississippi
Contact:

Post by DPlotAdmin »

I'll add a "Draw as step function" option (which won't require you to double the number of points.)
Visualize Your Data
support@dplot.com
User avatar
DPlotAdmin
Posts: 2312
Joined: Tue Jun 24, 2003 9:34 pm
Location: Vicksburg, Mississippi
Contact:

Post by DPlotAdmin »

...which won't require you to double the number of points.

On the other hand, I can't imagine anybody wanting to draw a step plot with 100's of thousands of points (since you couldn't see the steps anyway) so memory considerations aren't all that important. Plus, using only the existing data to do this is easy enough to draw, but opens up a small can of worms for other operations (right-clicking on a curve, finding intersections, and other things I'm sure I haven't thought of).

So... I put together a plugin to replace your existing curve(s) with the stepped version(s). http://www.dplot.com/plugins/generate/stepplot.dll

Save that file to <dplot folder>\plugins\generate (if you used the default installation options that will be c:\Program Files\DPlot\plugins\generate). The next time you run DPlot you'll see "Make Step Plot" on the Generate menu. The plugin replaces all curves with the stepped version. If there's a demand for it I'll add a dialog box to pick and choose which curves you want to do this for. This plugin will work with any full version of DPlot, including the trial.

I'll most likely include this plugin with the next release, so if you have any suggestions for improvement... now would be a good time :-)
Visualize Your Data
support@dplot.com
aesculap
Posts: 15
Joined: Wed May 13, 2009 1:25 am

Post by aesculap »

Thank you for your quick and beneficial replies!

Your plugin works just fine. Basically all my data is sort of step-data so im fine with status quo - a dialog box to pick the curves is "nice to have".
Post Reply