DPlot Forum Index DPlot
http://www.dplot.com
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

New "High-Low Curve" plugin

 
Post new topic   Reply to topic    DPlot Forum Index -> General discussion
View previous topic :: View next topic  
Author Message
DPlotAdmin
Site Admin


Joined: 24 Jun 2003
Posts: 2310
Location: Vicksburg, Mississippi

PostPosted: Fri Feb 18, 2011 7:17 pm    Post subject: New "High-Low Curve" plugin Reply with quote

I'd appreciate any input any of you might have on a new plugin before it is released. If you're interested, download http://www.dplot.com/plugins/generate/hilo.dll and save to [dplot.exe folder]\plugins\generate. If you used the default installation path that will be c:\Program Files\DPlot\plugins\generate, or c:\Program Files (x86)\DPlot\plugins\generate on 64-bit versions of Windows. The next time you run DPlot you will see "High-Low Curve..." on the Generate menu.

This plugin creates a new document with Y values equal to the average Y for points that have the same X, along with Ymax-mean and mean-Ymin curves. The 2nd and 3rd curves are used as error bar extents. If there is only one point at a given X, then the "error" is 0 and no error bar is drawn.

Example input:


results in:


You can already do this same sort of thing with a dozen or so steps in DPlot, but if this interests you then you'll save a lot of time with the plugin.

Your comments, as always, are welcome.
_________________
Visualize Your Data
support@dplot.com
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Ashi



Joined: 30 Dec 2007
Posts: 28

PostPosted: Mon Feb 21, 2011 9:07 pm    Post subject: Add SEM! Reply with quote

This is a great feature, I actually just had to do this today using MATLAB, only what I needed was SEM! It's very common for me to do exactly what you did only to use SEM as the error bars. And I bet I'm not the only one, so if you add that as an option, it'll be really useful!
Back to top
View user's profile Send private message
DPlotAdmin
Site Admin


Joined: 24 Jun 2003
Posts: 2310
Location: Vicksburg, Mississippi

PostPosted: Mon Feb 21, 2011 9:27 pm    Post subject: Reply with quote

Pardon my ignorance, but I'm pretty sure you aren't talking about search engine marketing or scanning electron microscopes. What's SEM?
_________________
Visualize Your Data
support@dplot.com
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Ashi



Joined: 30 Dec 2007
Posts: 28

PostPosted: Mon Feb 21, 2011 9:35 pm    Post subject: Reply with quote

Standard Error of the Mean Smile

It's the Standard Deviation divided by the square root of the number of measurements. http://en.wikipedia.org/wiki/Standard_error_(statistics)

You should probably also include the option of just the standard deviation since that's often used for the error in medical fields.

Or one of my personal favorites... the option to display both on the same graph! (the result is a wider set of error bars and a narrower set inside it). But that's going too far, just give us the options of SEM and sample SD and I'm sure people will be happy Smile
Back to top
View user's profile Send private message
Ashi



Joined: 30 Dec 2007
Posts: 28

PostPosted: Mon Feb 21, 2011 9:48 pm    Post subject: Reply with quote

I think you should change the name of the feature to "Generate Averages Curve With Error Bars" or something like that, and then we can choose whichever kind of error bar we want with a clickthrough menu. This feature alone would justify people buying dplot at the new price! Of course, I bought dplot a few years ago, but I'll have a much easier time convincing others to buy it with this feature Smile
Back to top
View user's profile Send private message
Ashi



Joined: 30 Dec 2007
Posts: 28

PostPosted: Mon Feb 21, 2011 10:15 pm    Post subject: Reply with quote

I would also recommend adding "Boxcar averaging at ___ X-precision" in the same menu as when we are choosing the error bar type, because sometimes repeated measurements have slightly different x values. In case you don't know what boxcar averaging is, at 0.1 precision it would mean averaging all values with x between 0.0 and 0.1, then with x between 0.1 and 0.2, then with x between 0.2 and 0.3, ...

And if all of this is added, then I insist that you feature this issue in the dplot tutorials and webpage! Because I predict a dramatic increase in dplot usership, since this procedure is such a routine (and usually painful) process in science labs.
Back to top
View user's profile Send private message
DPlotAdmin
Site Admin


Joined: 24 Jun 2003
Posts: 2310
Location: Vicksburg, Mississippi

PostPosted: Mon Feb 21, 2011 11:07 pm    Post subject: Reply with quote

Thanks for all of your input.
_________________
Visualize Your Data
support@dplot.com
Back to top
View user's profile Send private message Send e-mail Visit poster's website
DPlotAdmin
Site Admin


Joined: 24 Jun 2003
Posts: 2310
Location: Vicksburg, Mississippi

PostPosted: Wed Feb 23, 2011 6:32 pm    Post subject: Reply with quote

I've updated the plugin. The link is still http://www.dplot.com/plugins/generate/hilo.dll. Again, save to the \plugins\generate folder below dplot.exe. This time the plugin will show as "Average Curve with Error Bars" on the Generate menu. We may end up tussling over this as some folks tend to argue about the definition of standard deviation, but in this case it is consistent with the usage elsewhere in DPlot: st. dev. = sqrt( sum((Yi-mean)^2)/(N-1) ), where N is the number of points at the given X, Yi is the amplitude for 1-N points that have the same X, and mean of course is the average value for those N Yi's. Standard error is <standard deviation>/N. (For only one point the standard deviation and standard error are both 0.)

I'm reasonably sure I've done this correctly but if you try either "standard error" or "standard deviation" and get results you don't agree with, of course please let me know (with example data).

I haven't yet incorporated your "gather all points with a <= x <= b" thing but most likely will, with the default interval being 0. If you aren't aware of it you can do this now before using this plugin with Edit>Operate on X and either X=MROUND(X,<multiple>) or X=ROUND(X,<num_digits>). I'll most likely opt for something like MROUND once this is done.

Quote:
And if all of this is added, then I insist that you feature this issue in the dplot tutorials and webpage!

Point taken, thanks. That's the main reason for adding a Help button, which currently brings up a not-especially-helpful Help screen with DPlot's Help file for the Generate menu but will of course be improved in the next release.
_________________
Visualize Your Data
support@dplot.com
Back to top
View user's profile Send private message Send e-mail Visit poster's website
DPlotAdmin
Site Admin


Joined: 24 Jun 2003
Posts: 2310
Location: Vicksburg, Mississippi

PostPosted: Wed Feb 23, 2011 7:24 pm    Post subject: Reply with quote

I can probably justifiably be accused of being hyperactive here, but that's OK. The NEW plugin (same link as before) includes a "Group X values within interval:" entry. This rounds all input X values to the closest <interval> (or leaves them alone for interval=0).
_________________
Visualize Your Data
support@dplot.com
Back to top
View user's profile Send private message Send e-mail Visit poster's website
DPlotAdmin
Site Admin


Joined: 24 Jun 2003
Posts: 2310
Location: Vicksburg, Mississippi

PostPosted: Thu Feb 24, 2011 6:31 pm    Post subject: Reply with quote

Whoops! The last update calculated standard error as standard deviation divided by the number of points, rather than standard deviation divided by the square root of the number of points. This one is fixed:
http://www.dplot.com/plugins/generate/hilo.dll
_________________
Visualize Your Data
support@dplot.com
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Ashi



Joined: 30 Dec 2007
Posts: 28

PostPosted: Fri Feb 25, 2011 5:28 pm    Post subject: Reply with quote

Quote:
I can probably justifiably be accused of being hyperactive here...


No complaints about that here Smile

Quote:
Whoops! The last update calculated standard error as standard deviation divided by the number of points, rather than standard deviation divided by the square root of the number of points.


I was just about to point that out Smile

Quote:
And if all of this is added, then I insist that you feature this issue in the dplot tutorials and webpage!


I only insist on this from a marketing perspective, not because I think the feature is complicated to use Smile I think it should be part of the standard installation and that should be shown high up on the below page for example (with as a two part image, before generate and after generate, like in this post):

http://www.dplot.com/features.htm

Sorry for not replying sooner, I just thought it'd take you a few days before you got the box-carring in Smile
Back to top
View user's profile Send private message
DPlotAdmin
Site Admin


Joined: 24 Jun 2003
Posts: 2310
Location: Vicksburg, Mississippi

PostPosted: Fri Feb 25, 2011 6:21 pm    Post subject: Reply with quote

Thanks for the reply.

Quote:
I only insist on this from a marketing perspective, not because I think the feature is complicated to use I think it should be part of the standard installation and that should be shown high up on the below page for example (with as a two part image, before generate and after generate...


I think it is probably useful enough that it should be included in the trial version and given prominence on the Features page. Weirdly (to me, at least) moving the 3D stuff and background images up several months ago resulted in more sales, so this sort of thing does actually occur to me every now and then. On the other hand, if I take this to its logical extreme the Excel Add-In will be the first thing mentioned on every single page... which doesn't seem quite right, somehow Very Happy. In any case, your point is taken. I think a lot of people might like this, even though the operations were previously possible with (admittedly many) more steps.

Quote:
Sorry for not replying sooner, I just thought it'd take you a few days before you got the box-carring in.


No reason to be sorry - I sent e-mail only because I genuinely wasn't sure how the "Topic Reply Notification" gizmo worked (and truthfully, I'm still not sure even though I've had this forum for 8 years). As for boxcar stuff - I've looked around and as far as I can tell the term refers to averaging over N points, not necessarily a fixed interval in X. With a constant spacing in X the two are roughly equivalent, but to me what I'm doing now makes more sense. If for some reason that hasn't occurred to me you think averaging over N points rather than an interval in X would be useful, please say so. It is a fairly easy change if you think it would be useful.
_________________
Visualize Your Data
support@dplot.com
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Ashi



Joined: 30 Dec 2007
Posts: 28

PostPosted: Sat Feb 26, 2011 3:33 am    Post subject: Reply with quote

I actually don't remember how the forum works either Smile I think it's any post on the topic but I'm not sure.

I completely agree that over x intervals is the way to go, regardless of what boxcar-ing actually means. I think you should call it "average x values..." rather than "group x values..." but I"m not sure what would be less confusing. Maybe just "in intervals of ___" with no mention of a verb! One thing to consider adding is "starting at ___", because we might want the intervals that don't start at 0. E.g., intervals of one but starting a 1.5, or intervals of 20 starting at 170 (170, 190, 210).

I was pleasantly surprised that it operated over multiple curves at the same time! Awesome!!!

Using these new powers and Equal intervals combined... I will rule the world! (... I mean we will rule the world!)
Back to top
View user's profile Send private message
DPlotAdmin
Site Admin


Joined: 24 Jun 2003
Posts: 2310
Location: Vicksburg, Mississippi

PostPosted: Sun Feb 27, 2011 3:54 pm    Post subject: Reply with quote

One more, again at http://www.dplot.com/plugins/generate/hilo.dll.

I don't think "average x values" is right, because nothing is really being averaged here - at least not X. Having said that, the new label "Start at X=" entry isn't strictly correct either, because (using your example) the output might be at X=-2.5,-1.5,-0.5,0.5, etc. But I can probably live with this one.

I'm not really all that interested in ruling the world, so I'll go ahead and cede my rights to you in advance of when the moment comes Smile
_________________
Visualize Your Data
support@dplot.com
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Ashi



Joined: 30 Dec 2007
Posts: 28

PostPosted: Sun Feb 27, 2011 4:07 pm    Post subject: Reply with quote

DPlotAdmin wrote:
I don't think "average x values" is right, because nothing is really being averaged here - at least not X.


Good point!

DPlotAdmin wrote:
... the new label "Start at X=" entry isn't strictly correct either...


That depends on the user's input relative to their data set. Smile

DPlotAdmin wrote:
I'm not really all that interested in ruling the world, so I'll go ahead and cede my rights to you in advance of when the moment comes Smile


Thank you for your loyalty, in advance Smile
Back to top
View user's profile Send private message
DPlotAdmin
Site Admin


Joined: 24 Jun 2003
Posts: 2310
Location: Vicksburg, Mississippi

PostPosted: Sun Mar 06, 2011 1:17 pm    Post subject: Reply with quote

Done, though you already have everything you need aside from the Help topic. Thanks for all of your input on this. If you have a good example you wouldn't mind sharing with the world, send along the DPlot file and I'll put it in the blog. (Everything I've come up with has been pretty obviously a simple function with some randomness added - a real world example would be better.)
_________________
Visualize Your Data
support@dplot.com
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Ashi



Joined: 30 Dec 2007
Posts: 28

PostPosted: Mon Mar 07, 2011 3:50 am    Post subject: Reply with quote

I didn't have anything handy, but this is such a great feature that I took the time to put something together for you Smile Emailed!
Back to top
View user's profile Send private message
DPlotAdmin
Site Admin


Joined: 24 Jun 2003
Posts: 2310
Location: Vicksburg, Mississippi

PostPosted: Mon Mar 07, 2011 7:51 am    Post subject: Reply with quote

Thanks!
_________________
Visualize Your Data
support@dplot.com
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    DPlot Forum Index -> General discussion All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group