+ Reply to Thread
Results 1 to 5 of 5

Excel plotting data against row numbers rather than x values in scatter plot

  1. #1
    Registered User
    Join Date
    08-06-2020
    Location
    New Zealand
    MS-Off Ver
    Office 365
    Posts
    2

    Excel plotting data against row numbers rather than x values in scatter plot

    Hi there
    I have designed an activity for a class I teach whereby the students create a scatter plot of age versus temperature for some data from the Antarctic. In the second step, I get them to then add carbon dioxide data over time as a second series. Both sets of data cover roughly the same time span. So both sets of data have time as the x values, but the actual measurements of temperature and carbon dioxide were taken at different slots, such that they have different sets of x values (hopefully that makes sense). The problem that I am having is that when I add the carbon dioxide data to the first graph by selecting the entire columns for the time and CO2 data, Excel automatically plots the carbon dioxide data against the row numbers, rather than the x values I pointed it to, such that the carbon dioxide data appear to be spread out over a longer time period (there are 195 rows of data, but the time interval is only 160ka) when they should only cover the same time as the temperature data. I can fix this if I select just the values, rather than the whole column. But this isn’t very intuitive for the students. And furthermore, I don’t understand why this happens in the first place. If someone could explain why this happens and if there is a way to avoid it, other than my current fix, I would be very grateful. I can share some screen shots if that makes things clearer.
    Many thanks in advance,
    Katherine

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

    Re: Excel plotting data against row numbers rather than x values in scatter plot

    Difficult to debug from a text description. A sample file would be more helpful. That said, the first thing I would be looking at is the nature of the CO2 data's x values. If there is a text string (including empty string or a number stored as text) anywhere in the CO2 data's x values, Excel will not use the numeric values, but will use count/row numbers like you are seeing. Check for text values in the x values and correct, if you find any.
    Quote Originally Posted by shg
    Mathematics is the native language of the natural world. Just trying to become literate.

  3. #3
    Registered User
    Join Date
    08-06-2020
    Location
    New Zealand
    MS-Off Ver
    Office 365
    Posts
    2

    Re: Excel plotting data against row numbers rather than x values in scatter plot

    Thanks very much for your quick response
    There's only the text in the top row, which is the same case for the first series. But I get the feeling that this is the issue.
    I've attached the file this time.
    Thanks again,
    Katherine
    Attached Files Attached Files

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

    Re: Excel plotting data against row numbers rather than x values in scatter plot

    disclaimer: I'm opening in LO calc on this computer, since I don't have Excel here, and LO calc handles these things differently (in fact, LO calc seems to have no trouble with this issue -- are you required to use Excel for this class, or would you be allowed to use a different spreadsheet app?).

    Assuming LO calc has interpreted your file correctly, I notice that the first series is using rows 2:196 for the data series -- only including the first text row as the "series name" parameter. Series 2 is defined using full column references, so it is including row 1 in the actual data. As noted, LO calc that I am using here simply ignores the text, but Excel will see the text in the first row and decide not to use the values in column G for the x values.

    Fixing this in Excel should be as simple as editing the 2nd "CO2" data series so the data series y and x values both begin in row 2 (I normally try to use the same rows unless there is a specific reason not to). Change the CO2 series to be rows 2:196 to match the first "temp" data series, and you should fix the issue.

    As an educational exercise, you will also need to instruct your students to not use full column references when they add the second data series. Many of them will think using full column references is a nice shortcut, but it doesn't work in this case.

  5. #5
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,430

    Re: Excel plotting data against row numbers rather than x values in scatter plot

    One problem is the use of full columns to define X and Y values. This would include the header information, which is text, and therefore the x axis would be a increment rather than true value.

    If you convert you data to a table you can simply add new data to the end and the chart will automatically update.
    Attached Files Attached Files
    Cheers
    Andy
    www.andypope.info

+ 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. Graphing Scatter Plot - Not Plotting X Column
    By FrankieLovie in forum Excel Charting & Pivots
    Replies: 5
    Last Post: 09-10-2017, 09:11 AM
  2. Plotting Zero Values (Logarithmic Scatter Plot)
    By aaochsner in forum Excel Charting & Pivots
    Replies: 8
    Last Post: 10-30-2013, 02:40 PM
  3. [SOLVED] plotting 2 sets of data on the same scatter plot using 2 symbols
    By Wombat18 in forum Excel Charting & Pivots
    Replies: 3
    Last Post: 04-07-2013, 04:04 AM
  4. Scatter Plot Min/Max Values in Numbers not Date
    By Jhawk in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 01-28-2013, 03:38 PM
  5. Replies: 2
    Last Post: 07-26-2012, 09:27 AM
  6. Scatter Plot not plotting straight line for same data in x & y
    By jhooper in forum Excel Charting & Pivots
    Replies: 3
    Last Post: 10-14-2011, 01:05 PM
  7. Graphing Plotting Dash Lines certain Data Scatter Plot
    By batmanfan in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-04-2010, 06:50 AM

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