+ Reply to Thread
Results 1 to 6 of 6

difference between 2 lines in a scatter chart

  1. #1
    Registered User
    Join Date
    08-01-2005
    Posts
    3

    difference between 2 lines in a scatter chart

    I have created a scatter chart with two lines. The x axis is divided up into 10 parts and labeled 10, 20, 30, 40, etc. What I want to do is calculate the distance between the two lines between the x values of 40 and 60. Does anyone know how to to that? Thank you in advance.

  2. #2
    bj
    Guest

    RE: difference between 2 lines in a scatter chart

    How did you generate the lines?
    Are they from the data directly ot trendlines?

    When you say you want to calculate the difference between x =40 to X=60,
    Do you want the average difference?
    do you want the difference at 40, at 60?

    "prd02003" wrote:

    >
    > I have created a scatter chart with two lines. The x axis is divided up
    > into 10 parts and labeled 10, 20, 30, 40, etc. What I want to do is
    > calculate the distance between the two lines between the x values of 40
    > and 60. Does anyone know how to to that? Thank you in advance.
    >
    >
    > --
    > prd02003
    > ------------------------------------------------------------------------
    > prd02003's Profile: http://www.excelforum.com/member.php...o&userid=25762
    > View this thread: http://www.excelforum.com/showthread...hreadid=391727
    >
    >


  3. #3
    Registered User
    Join Date
    08-01-2005
    Posts
    3
    The lines are those generated by the smooth line effect in the scatter chart options in excel. They are not trendlines. Basically I want to measure the area between the two lines between the x values of 40 and 60. I have a bunch of really similar graphs and I want to see which graph has the two lines that are the closest together between the x values of 40 and 60. Does that help?

  4. #4
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP and 2007
    Posts
    15,810
    The chart itself is not going to readily be able to do this. The "smooth curve" is just a spline, and may or may not represent reality. I'm also not aware of any way to extract interpolated values from Excel's spline. Best bet, IMO, will be to obtain the area between the curves in the spreadsheet from which the data were plotted. Do you have data points between 40 and 60? What kind of curve (linear, exponential, etc.) do you expect?

  5. #5
    Registered User
    Join Date
    08-01-2005
    Posts
    3
    I do have data points for one of the lines between 40 and 60 but not for the other. The line I don't have a data points for is linear (intercept = 0, slope=1, data points 0 and 100) it represents an "ideal" and I am measureing how close the other data fits to the ideal. Moreover, the data is not linear in whole, but could be considered linear between 40 and 60. Does that help?







    Quote Originally Posted by MrShorty
    The chart itself is not going to readily be able to do this. The "smooth curve" is just a spline, and may or may not represent reality. I'm also not aware of any way to extract interpolated values from Excel's spline. Best bet, IMO, will be to obtain the area between the curves in the spreadsheet from which the data were plotted. Do you have data points between 40 and 60? What kind of curve (linear, exponential, etc.) do you expect?

  6. #6
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP and 2007
    Posts
    15,810
    So your reference line is defined as y=x (technically, then, you do have data points for this line in the 40 to 60 range, you just haven't used them to plot the line in the chart).

    If we can assume that the curve of interest is linear over the region of interest (x=40 to 60), then the problem reduces very quickly to finding the area of a trapezoid, [l1+l2]*h/2. l1=f(40)-40, L2=f(60)-60, h=x2-x1=60-40=20.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1