> Trying to find a way to plot the middle line of a multi plot XY graph.
> The plots don't start from 0 and are unevenly sampled, what I need to
> be able to do is at every 0.1 x (for example) look at the bottom curve
> and take a y value and then look at the upper curve and take a y
> value, subtract these and plot the middle point.
>
> Ive tried various things, interpolation requires x information from 0
> at a constant iteration i.e. 1, 2 ,3 etc.
>
> What would solve the problem is being able to programmatically place a
> cursor at an x axis and read back the two associated y values. The
> problem with the cursors is that they snap to point, not any point
> along the line.
>
You are looking to interpolate or resample your data. There are many
ways to
do this, and you will have to decide which makes the most sense
for what your data represents. Simplest is linear. Simply average the
two points, polymorphism works well here, and that will produce the
midpoint for two points. Loop as many times as is appropriate over your
existing array building a new array. If a different type of
interpolation makes more sense you can do anything from doing a curve
fit of the data and sampling the polynomial wherever you like, to using
N adjacent points to build up splines and interpolating to the spline,
to using sine wave segments. Many of these have been discussed in past
postings. Try searching for resampling or interpolation.
Greg McKaskle