Jump to content
Software FX Community

Line of Best Fit


User (Legacy)

Recommended Posts

"Shoba Thamma" <sthamma@hotmail.com> wrote in message

news:ea4Gy7boFHA.1724@webserver3.softwarefx.com...

> Hello all,

>

> Is it possible to generate a line of best fit on a scatterplot (XY Plot)

on

> ChartFX graphs? If so, could a kind reader of this message please share

such

> code?

>

> Many thanks.

> :~)Shoba.

>

That's called linear regression analysis, or "least squares". You'll need

to do the math yourself - the formula calculates the slope and Y-intercept

of the best fit line. Using that, you'll need to manually add another

series (as a Line), with one X-Y point for each X position.

It's not rocket science...but, it's close.

Alternatively, I think there's a plug-in for ChartFX that supports that

requirement without your having to do the calculations yourself.

GG

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...