Extract Excel Scatter Plot with connected by smooth lines Points

AmazingTrans

New Member
Joined
Mar 5, 2007
Messages
44
Office Version
  1. 365
Platform
  1. Windows
Hi there,

I have a couple of points, and when i do a scatter plot with connected by smooth line plot, it seems like excel does a bezier splines interpolation. I am wondering am i able to extract the data plots from the data chart?
for example if i have
X - Y
0 - 5
180 - 0
360 - 5

i would like to have all datas of Y from X (0 - 360 degree every degree)

Hope someone know how i can do this.

Thanks!
 
Lori,

I am trying to put all this equations into a vb. Not sure how I can implement the IIR, offset & match. That is why it would be great for me to understand the whole concept how it work theoretically then prorammatically how the excel functions work then put it into a vb / C#...
More help from ya will be much appreciated.

thanks!
 
Upvote 0

Excel Facts

Waterfall charts in Excel?
Office 365 customers have access to Waterfall charts since late 2016. They were added to Excel 2019.
Lori,

I am trying to put all this equations into a vb. Not sure how I can implement the IIR, offset & match. That is why it would be great for me to understand the whole concept how it work theoretically then prorammatically how the excel functions work then put it into a vb / C#...
More help from ya will be much appreciated.

thanks!

I'd suggest a different approach if you're looking to code this up, I used that method only as it was manageable with Excel functions. Once you have understood the concepts (as in Wikipedia for example) start with existing code - there are many open source numerical libraries to choose from - then step through with your example data.

For Excel specific information have a look at this link: http://newtonexcelbach.wordpress.com/2011/09/04/spline-interpolation-alternatives/ which has a CardSplineA function that is replicating the worksheet formula functionality. There is lots more useful info on this site too.

Also have a look at the Excel drawing tool curve under Insert > Shapes > Lines > Curve which allows you to create Bezier curves. You can edit the control points by right-clicking the line you created and choosing Edit Points and clicking and dragging points. These shapes can be edited through VBA or C# code too.
 
Upvote 0
My last question:

If i have 13 points, and i know the smoothing function works on 4 points at a time. Do i calculate the polynomials for the points in such a way it is like:

1-2-3-4
3-4-5-6
5-6-7-8
7-8-9-10
9-10-11-12
10-11-12-13

?

Thanks!
 
Upvote 0
My last question:

If i have 13 points, and i know the smoothing function works on 4 points at a time. Do i calculate the polynomials for the points in such a way it is like:

1-2-3-4
3-4-5-6
5-6-7-8
7-8-9-10
9-10-11-12
10-11-12-13

?

Thanks!

For C-R splines discussed above the sets of four points are consecutive i.e. 1,2,3,4...2,3,4,5...etc. and the curve is drawn between the middle two points (marked in Bold).

In the cubic Bezier curve configuration the points consist of two end points (2,3) and two control points (2',3'). For the C-R case, the control points are derived from the neighboring points using 2' = 2 + (3 - 1)/6 , 3' = 3 - (4 - 2)/6.

B-Splines are a generalization that allow more flexibility in choosing control points by relaxing the condition that the curve need to pass through each point.
 
Upvote 0
For C-R splines discussed above the sets of four points are consecutive i.e. 1,2,3,4...2,3,4,5...etc. and the curve is drawn between the middle two points (marked in Bold).

In the cubic Bezier curve configuration the points consist of two end points (2,3) and two control points (2',3'). For the C-R case, the control points are derived from the neighboring points using 2' = 2 + (3 - 1)/6 , 3' = 3 - (4 - 2)/6.

B-Splines are a generalization that allow more flexibility in choosing control points by relaxing the condition that the curve need to pass through each point.

Lori,

You've explained this so well, i feel dumb to still have to ask a few questions. I am trying to port your implementation, or your fine description of it, into VB.

I have been referring to your links and also this one, Catmull-Rom Splines

I understand incrementing t from 0 to 1. I understand needing to have four points. My question is given the example above of x and y values,

20.75
51.5
150.45
200.15

<tbody>
</tbody>

Where do i plug in my new x values (do i x increment to get the next value) and do i plug in the y values into the equation above?

Also the source code i have seen has a lot of libraries that i would have to bring over, in either case i'd like to get my own head around this.

I hope you can help, sorry for still being dense on this. I had implemented the Bezier method but ran into the problems you pointed out, so i wanted to try this!

Thanks,


Russ
 
Upvote 0

Forum statistics

Threads
1,216,152
Messages
6,129,168
Members
449,490
Latest member
TheSliink

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top