+ Reply to Thread
Results 1 to 7 of 7

Need to make a graph with 1 y-axis and 1 x-axis - but from multiple datasets

  1. #1
    Registered User
    Join Date
    07-18-2023
    Location
    India
    MS-Off Ver
    16.75
    Posts
    3

    Need to make a graph with 1 y-axis and 1 x-axis - but from multiple datasets

    Hello, I am trying to make a graph on excel where I have distance on the x-axis and velocity on the y-axis. However, I have 10 different datasets that compare distance and velocity each with different values. I want to combine all of these into one graph so I have 10 lines on 1 graph comparing distance and velocity. My data is below, I hope you can help!
    data for excel forum.xlsx
    data for excel forum.xlsx

  2. #2
    Forum Contributor
    Join Date
    09-03-2016
    Location
    Catania, Italy
    MS-Off Ver
    Excel 2019
    Posts
    164

    Re: Need to make a graph with 1 y-axis and 1 x-axis - but from multiple datasets

    HI
    If I understand correctly, you need a Scatterplot and VBA.
    Assign, with VBA, the minimum and maximum of the X axis, the minimum and maximum of the Y axis (see cells W1:W4).
    Then enter the various series making sure that the X values ​​must be the minimum and maximum that you have calculated.
    I attach your file in which I have entered ONLY 4 series.
    Let know. HI,
    Mario
    Attached Files Attached Files

  3. #3
    Registered User
    Join Date
    07-18-2023
    Location
    India
    MS-Off Ver
    16.75
    Posts
    3

    Re: Need to make a graph with 1 y-axis and 1 x-axis - but from multiple datasets

    Hi Marius!
    Thanks so much for that.
    However, is making the graph so each line is more detailed possible? Below attached is the graph for just 1 trial. Could I do the same thing but for 10 of these lines in one graph.

    x and v - 2.pngx and v - 2.png

  4. #4
    Forum Contributor
    Join Date
    09-03-2016
    Location
    Catania, Italy
    MS-Off Ver
    Excel 2019
    Posts
    164

    Re: Need to make a graph with 1 y-axis and 1 x-axis - but from multiple datasets

    HI
    If I understand correctly, select an axis and set the data (number) as "scientific"

    HI,
    Mario

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

    Re: Need to make a graph with 1 y-axis and 1 x-axis - but from multiple datasets

    Here's what I did (starting from the first file in post #1):

    1) Select the first x,y columns (A and B) and insert a scatter chart (straight lines without markers).
    2) Bring up the Select Data dialog, add a new data series, and tell it to use C and D for the X values and Values respectively.
    3) Repeat step 2 until all data series have been added to the chart.
    4) Format chart elements as desired.

    It should be as simple (if a bit tedious) as that. Does that help?
    Quote Originally Posted by shg
    Mathematics is the native language of the natural world. Just trying to become literate.

  6. #6
    Registered User
    Join Date
    07-18-2023
    Location
    India
    MS-Off Ver
    16.75
    Posts
    3

    Re: Need to make a graph with 1 y-axis and 1 x-axis - but from multiple datasets

    Hello!
    Thank you, that was very helpful. This is what I got below, it worked:
    physics data for excel forum.png

    One more question, how could I add a trendline for all of these 10 trials (exponential or moving average)? I know I can take the trendline for each series separately, but can excel do this for me considering all 10 trials? If not, perhaps I can take the exponential trendline for each trial and find some way to take in average. Let me know if excel can do this. Thank you!

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

    Re: Need to make a graph with 1 y-axis and 1 x-axis - but from multiple datasets

    I'm optimistic enough to believe that spreadsheets can be programmed to perform most data analysis tasks (even if a spreadsheet isn't the best programming language for the task). I doubt there is a "perform the desired analysis at the click of a single button" tool preprogrammed into Excel for this, but, if you understand the desired analysis well enough and are willing to program the individual steps needed, a spreadsheet can do many different kinds of analyses. For example, if I decide that I want to see what an exponential decay model does for this data, I would:

    1) First step for most of the analyses that come to my mind for this will be to make a copy of the data with all of the values in a single table (all of the x values in one column and all of the y values in 1 column). If you have access to it, the VSTACK() function can readily perform this task (https://support.microsoft.com/en-us/...a-fcc10d795a9c ). Power Query can also do it. Or you can do as I did and just manually cut/copy and paste the separate data sets into one combined data set.
    2) Some analyses (like a moving average) might require you to sort the data by x value. If your analysis requires you to sort the data, Excel has a sort command. If you have access to it, there is also the SORT() function https://support.microsoft.com/en-us/...d-c20e8e44b86c . Power Query can also sort data.
    3) I can compute the parameters for a basic exponential decay function using the LOGEST() function https://support.microsoft.com/en-us/...rs=en-us&ad=us

    With appropriate intermediate steps, I can expand on this to perform a variety of other "linear" regressions (like a polynomial trendline) using the more generic LINEST() function. If I am trying a moving average function, the AVERAGE() or AVERAGEIFS() functions would be useful here. Excel has a built in exponential triple smoothing algorithm programmed as part of the FORECAST.ETS() function.

    4) From the regression constants, I can add a column to calculate the estimates from the regression equation in an adjacent column and perform some "goodness of fit" calculations and do other things to evaluate the results of the analysis. After calculated the regression values, I can add those values to the chart as a visual way to see how the regression did and that may help in evaluation.

    Spreadsheets are a powerful programming language for performing data analysis, but, like other programming languages, spreadsheets cannot do everything at the click of a single button. When you understand the analysis you want to perform and the tools that a spreadsheet provides, you can program a spreadsheet to do a variety of analyses.

+ 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. changing axis in line graph - label axis should be on y-axis
    By Falimus in forum Excel Charting & Pivots
    Replies: 2
    Last Post: 03-24-2020, 04:56 PM
  2. How to make a graph with four axis
    By Meshal in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 04-01-2016, 09:25 AM
  3. [SOLVED] Bar Graph With 2 Axis - Bars On The Primary Axis Overlap Bars On The Secondary Axis
    By Variablez in forum Excel Charting & Pivots
    Replies: 4
    Last Post: 03-11-2013, 08:38 AM
  4. How to make a Graph with multiple axis..
    By dan87 in forum Excel Charting & Pivots
    Replies: 5
    Last Post: 08-29-2012, 10:18 AM
  5. Excel 2008 : can not make a graph with second X-axis
    By kikieb in forum Excel General
    Replies: 1
    Last Post: 01-30-2012, 12:28 AM
  6. Replies: 3
    Last Post: 03-09-2009, 09:00 AM
  7. can I make the vertical axis the category axis in Excel line graph
    By power1 in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 03-20-2006, 04:50 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