Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Line of Best Fit for 3D scatter plot?

  1. Sep 29, 2011 #1
    Hi all,

    I'm having problems with something I'd like to do.

    Basically I have a 3D scatter plot and would like to add a line of best fit to it, I've googled this but most of the answers I get are incomprehensible to me (I'm a chemistry PhD student and my maths isn't amazing).

    Does anyone know a program or a method for doing this? The easier the better! (I have access to GUNplot and MATLAB if that helps but am not that familiar with either)

    Many thanks in advance.
  2. jcsd
  3. Sep 29, 2011 #2


    User Avatar
    Science Advisor

    You'd probably find something like excel spreadsheet the most accessible.

    Use the "LinEst" function (should be listed under "statistical functions").

    Hint. Highlight two cells in adjacent columns before selecting "LinEst" and also hold both "ctrl" and "shift" when you click the final ok (needed to make a function return two values, gradient and y-intercept in this case).
  4. Sep 29, 2011 #3


    User Avatar
    Science Advisor
    Homework Helper
    Gold Member

    Maybe you have already found this:


    Or maybe not. :smile:
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook