+ Reply to Thread
Results 1 to 5 of 5

Combine xy Scatter plot

  1. #1
    Registered User
    Join Date
    10-05-2013
    Location
    Lancaster, CA
    MS-Off Ver
    Excel 2010
    Posts
    13

    Combine xy Scatter plot

    On an xy scatter plot, how can I combine multiple series where the x values aren't the same into a combined line? I've attached a sample spreadsheet demonstrating what I'm asking. The yellow and blue data would be the only data present. The green data/line is the desired output.
    Attached Files Attached Files

  2. #2
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP and 2007
    Posts
    15,829

    Re: Combine xy Scatter plot

    Excel charts do not analyze our data for us, so we have to do the data analysis part.

    What does "combine" mean to you in this case? It looks to me like it means "add the two functions together", is that correct? Here's how I see this analysis happening:

    1) A linear interpolation step to determine y2 at the points that are in between the given points, and to determine y1 at points in between given points.
    2) Once the linear interpolation is done, it should be a simple addition.

    The most difficult part is the linear interpolation step, are you familiar with strategies for programming linear interpolation into Excel?
    Quote Originally Posted by shg
    Mathematics is the native language of the natural world. Just trying to become literate.

  3. #3
    Forum Expert dflak's Avatar
    Join Date
    11-24-2015
    Location
    North Carolina
    MS-Off Ver
    365
    Posts
    7,920

    Re: Combine xy Scatter plot

    The answer probably lies in potting named ranges where the named range contains the formula for computing the combined values. I've looked at it and I understand 0,0 and 6,6. I have no idea what How you get 1,4 from 1,3 or 2,7 from 2,2, etc.
    One spreadsheet to rule them all. One spreadsheet to find them. One spreadsheet to bring them all and at corporate, bind them.

    A picture is worth a thousand words, but a sample spreadsheet is more likely to be worked on.

  4. #4
    Registered User
    Join Date
    10-05-2013
    Location
    Lancaster, CA
    MS-Off Ver
    Excel 2010
    Posts
    13

    Re: Combine xy Scatter plot

    Here's another version of the spreadsheet showing how I get to the manually combined data. The source data is so erratic that a curve could not be fit to it (e.g. trendline interpolation).
    Attached Files Attached Files

  5. #5
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP and 2007
    Posts
    15,829

    Re: Combine xy Scatter plot

    The source data is so erratic that a curve could not be fit to it (e.g. trendline interpolation).
    Perhaps not a "full data set" regression, but it appears to me that you are using "piecewise regression" or "linear interpolation". Am I correct? If not, you will need to explain how you are determining the intermediate points before we can program Excel to do it.

    Sometimes, I think it's too bad that Quattro Pro is not easier to come by. In QuattroPro, this would be easy using the @LINTERP() function. With your X values in column E, column F would be a simple @LINTERP($B$3:$B$9,$A$3:$A$9,E3)+@LINTERP($D$3:$D$9,$C$3:$C$9,E3). [Except for F9, because most linear interpolation algorithms will not default to y1=0 at x=6). But Excel does not have a built in linear interpolation function, so you have to program the linear interpolation in.

    The basic strategy I recommend for linear interpolation is illustrated in this post: http://www.excelforum.com/showthread...=1#post3904113 You build a lookup table with the "slope" and "intercept" for each "segment" of each line. Then you can use a simple lookup function to return those parameters and compute the intermediate points. You will probably need to adapt it a little to make sure you get 0 for the points outside of the defined points.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Converting Scatter plot to Line plot and back
    By SPDavern in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 04-26-2015, 10:49 AM
  2. Excel 2010 - X Y scatter plot will not plot empty cells as gap
    By bjeffers0306 in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 08-12-2013, 12:56 AM
  3. Combine data from several rows in one series in scatter plot
    By marikladd in forum Excel Charting & Pivots
    Replies: 0
    Last Post: 12-07-2012, 08:11 AM
  4. Replies: 2
    Last Post: 07-26-2012, 09:27 AM
  5. Recording Macro to generate scatter plot: Plot from Macro different from recorded.
    By VaPiano in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 03-09-2012, 05:41 AM
  6. [SOLVED] Can I copy x-y scatter plot data direct from one plot to another?
    By Chris in forum Excel Charting & Pivots
    Replies: 2
    Last Post: 06-03-2005, 09:05 AM
  7. [SOLVED] How do I plot a scatter plot in 3 axies?
    By banderson in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-05-2005, 12:06 AM
  8. Converting XY Scatter plot to Line Plot and back
    By SPDavern in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-09-2005, 10:06 PM

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