3 Replies Latest reply: Jul 12, 2012 5:36 AM by jinx.pt
jinx.pt Level 1 Level 1 (40 points)

So I am wondering how (and if) I can make a graph, where I have referenced data that is referenced in different states.

I can have multiple tables or just one, this is not fixed, whatever method works, I can use it.

Here's the main (simplified) idea of what I want:

Imagine I have multiple sets of data, with time and an accumulation counter for that point in time (the x and y on the tables are inversed, sorry about that):

 

Time1 (y)count1 (x)
100ms5
200ms10
300ms25

 

time2 (y)count2 (x)
123ms3
200ms10
435ms35

 

So, what I wanted, was to have a plotted graph for these two sets, how do I do it? Is it better to use multiple tables or just one? I'm having some trouble creating the graphs, because Numbers always only references one y axis as reference. Is this possible? Basically, I wanted to plot points (x,y pairs) on a graph (and then connect them, but that can be done in Inspector).

 

Ideas?

 

Thanks

  • Badunit Level 6 Level 6 (11,400 points)

    Easy, and you can use both tables. I would recommend swapping the columns so X is on the left but you don't have to, it just makes it easier.

     

    You want a scatter chart.  All data must be in non-header columns, which it appears to be.

     

    1. Select the data in the first table
    2. Create a scatter chart. It should now have one series of data
    3. Click on the chart to select it
    4. Hold down Command and select the data from the second table. The chart should now have both data series.
    5. If you have X on the left in these tables, the only thing left to do is format the chart so it looks the way you want it to.

     

    To swap X and Y

    1. Click on one of the data points in your chart
    2. Open the Chart Inspector and go to the Series tab
    3. Click in the X Data box then go to your table and move the selection box over your X data
    4. Repeat that for the Y data
    5. Repeat again your other data set
  • Wayne Contello Level 6 Level 6 (16,160 points)

    I would use a single table where you add pairs of columns which represent another X/Y pair.  Numbers allows you to expand an XY graph data source to include multiple pairs of columns OR share a single X column with multipl Y columns:

     

    Screen Shot 2012-07-12 at 7.04.56 AM.png

     

    After you have you table set up with data and the first row set as a header.  Select the range to graph (let's start off with a single series).  Select A2 to B4:

     

    Screen Shot 2012-07-12 at 7.07.15 AM.png

     

    now select the XY Graph from the Chart tool. This will plot the first data set.  Now select the chart to activate the chart AND reveal the chart data source handle on the table:

    Screen Shot 2012-07-12 at 7.07.28 AM.png

     

    First let's move the series name over on column.  Click the and hold the tab at the top of the X column and drag it one column to the right:

     

    Screen Shot 2012-07-12 at 7.13.32 AM.png      Screen Shot 2012-07-12 at 7.13.43 AM.png

     

     

     

    Now you can add the new series by grabbing the little circle at the bottom-right of the highlighted data source and dragging to the right by a pair of columns:

    Screen Shot 2012-07-12 at 7.16.44 AM.png

    Screen Shot 2012-07-12 at 7.17.43 AM.png

     

    Screen Shot 2012-07-12 at 7.18.07 AM.png

  • jinx.pt Level 1 Level 1 (40 points)

    Thank you, Wayne and Badunit, you have not only helped me solve my problem but I learned how to do a couple more things too! Things are looking a lot better now, thanks!