+ Reply to Thread
Results 1 to 14 of 14

Excel 2007 : X-Y graph

  1. #1
    Registered User
    Join Date
    06-19-2010
    Location
    Loughborough
    MS-Off Ver
    Excel 2000
    Posts
    15

    X-Y graph

    I have two cols of results which I want to graph as X against Y.
    Graph with x and y as the axes NOT chart which is all that there appears to be on offer with excel.
    I hope this is clear, I want to graph x to y which gives a single line, not chart which gives two lines.
    thanks

  2. #2
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,601

    Re: X-Y graph

    Select data and use Scatter graph

  3. #3
    Registered User
    Join Date
    06-19-2010
    Location
    Loughborough
    MS-Off Ver
    Excel 2000
    Posts
    15

    Re: X-Y graph

    a scatter graph is still the same thing, two series.
    I want to plot x against y, x on the hor axis y on the vert giving ONE line joining the points

  4. #4
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,601

    Re: X-Y graph

    In that case you did something wrong.
    Try again.

    Select both X and Y data
    Insert -> Scatter with Smooth lines
    OK
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    06-19-2010
    Location
    Loughborough
    MS-Off Ver
    Excel 2000
    Posts
    15

    Re: X-Y graph

    thanks
    That's it, it was the smooth lines that reduced the data to one curve.

    Now what I have is a curve that goes through the points.

    I'm trying to do something this way because there is no formula linking x to y.

    Now I want to read off a value for y from a given x. This is somewhere on the curve between the points. How do I extrapolate this value?

  6. #6
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,601

    Re: X-Y graph

    Right click on your curve.
    Add Trendline.
    Check Display Equation on chart and choose best fitted curve from the Type above

  7. #7
    Registered User
    Join Date
    06-19-2010
    Location
    Loughborough
    MS-Off Ver
    Excel 2000
    Posts
    15

    Re: X-Y graph

    Thanks, looks like just the job; just one more question is there some automatic way I can get an equation like this into a formula?

    y = 0.3583x5 - 6.375x4 + 42.125x3 - 127.12x2 + 173.02x - 80

  8. #8
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: X-Y graph

    You can get the coefficients directly on the worksheet.

    Select, say, A1:F1, paste this in the formula bar, and confirm with Ctrl+Shift+Enter rather than just Enter:

    =LINEST(yRange, xRange^{1,2,3,4,5,6})

    Then to reconstruct the fit from the coefficients

    =SERIESSUM(xValue, 5, -1, $A$1:$E$1) + $F$1
    Last edited by shg; 09-06-2011 at 02:14 PM.
    Entia non sunt multiplicanda sine necessitate

  9. #9
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,422

    Re: X-Y graph

    I think the first formula needs a curly bracket:

    =LINEST(yRange, xRange^{1,2,3,4,5,6})

    =LINEST(C4:C8, B4:B8^{1,2,3,4,5,6})


    Regards
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  10. #10
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: X-Y graph

    Corrected, thanks TMS.

  11. #11
    Registered User
    Join Date
    06-19-2010
    Location
    Loughborough
    MS-Off Ver
    Excel 2000
    Posts
    15

    Re: X-Y graph

    If any member's response has helped to solve your problem, please use the scales icon on the top right of their post to show your appreciation

    sorry guys I cannot see this icon anywhere in the post

  12. #12
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,601

    Re: X-Y graph

    Look here:
    Attached Images Attached Images

  13. #13
    Registered User
    Join Date
    06-19-2010
    Location
    Loughborough
    MS-Off Ver
    Excel 2000
    Posts
    15

    Re: X-Y graph

    i found this now that you pointed me to SERIESSUM

    How to use the SERIESUM() function:

    Type "=SERIESSUM(".
    Enter the coordinate of the "x" value "1"
    Type a comma.
    Enter the coordinate of the "n" value "1".
    Tyep a comma.
    Enter the coordinate for the "m" value "1".
    Type a comma.
    Enter the coordinates for the range of "coefficients", "C2:C4".
    Type ")" then press the "Enter" key

    this is my data
    10000 50
    50000 200
    200000 1800
    350000 3500

    and this is the formula from a 3rd order poly
    y = -1E-13x3 + 6E-08x2 + 0.0003x + 40.755

    Does the above mean that I have to type the coords manually? I was hoping that the formula could be inserted such that if the data was tweaked this would be updated behind the scenes.

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

    Re: X-Y graph

    There's no reason I can see why this can't be set up to automatically update. As shg showed you, use the LINEST function to generate the polynomial coefficients from the raw data. Then use the SERIESSUM function to find y at some arbitrary x. If the "coefficients" argument is pointing to the cells with the LINEST output, then any change in the raw data should cause the spreadsheet to update automatically. The "x", "n", and "m" arguments can also be references to other cells, if you want to be readily able to change those values.

+ 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