# Plotting a graph with 4 data but 3 variables

1. ## Plotting a graph with 4 data but 3 variables

Hi there,

I am struggling to plot a graph with my sets of data.

I have three variables - time, stress, and strain.

I am trying to plot a graph of stress against strain.

Rows A and C are the time, Row D is the stress and Row F is the strain.

Rows A and C are spread out from 0 to about 40, however, Row A has a little bit smaller data than Row C.

Because of that, when I try plotting Stress against strain, the last bit of stress values are not shown in the graph.

Is there a way to plot the graph without altering the time data?

2. ## Re: Plotting a graph with 4 data but 3 variables

I am confident that there is a way to do this, but I don't understand what you have, so I cannot recommend anything.

Your "x" values are calculated in column F based on the values in column B which seem to be associated with the shorter set of times in column A. The "y" values in the chart are taken from column D which are associated with the longer set of times in column C. The problem basically is that you have fewer "x" values than you have "y" values.

The basic solution is to do something with the data so that you have the same number of "x" values as you have "y" values. Since I do not know where these data are coming from or why there are different numbers of values for the stress and strain data, I cannot suggest anything. If you can explain to us how you would like to reconcile the number of data points for each column so that they have the same number of data points, then we should be able to help you program that into the spreadsheet.

3. ## Re: Plotting a graph with 4 data but 3 variables

Yes, you got the problem right.

So the column A and C are basically showing the same period of time but A just short of some of the time in between.

Columns A and F are related and Columns C and D are related, A is the time for F and C is the time for D.

I also do not know why the data is produced this way, like some of the data for F is not produced while for D is produced.

Would there be a solution to plot all of the data of C against F without having less data of F as the problem?

4. ## Re: Plotting a graph with 4 data but 3 variables

I expect there are multiple possible solutions, but Excel does not have something pre-programmed in, so you will need to come up with a strategy, and program that strategy into Excel.

Looking over the data, I notice that the main issue is that the C,D pair have occasional "duplicate time stamp" entries (there are two entries in C for the 1E-5 time stamp) and occasional "extra" time stamp entries (a 0.0002178 time stamp in column C that is missing from column A). One possible strategy might be to "filter out" the extra entries from C,D with a lookup function. Something like =VLOOKUP(A1,\$C\$1:\$D\$500,2,TRUE) into G1 and copied down to the bottom of the A1 data. This effectively removes the "extra" entries in the C,D columns, resulting in a filtered set that only contains the entries that match the time stamps in column A. Would that be an acceptable strategy?

5. ## Re: Plotting a graph with 4 data but 3 variables

I think the function you suggested is really good!

It'd be nicer if I could include the last data -> 40.37670898 201307.8125 but it is totally fine.

Thank you so much and have a nice day!!

6. ## Re: Plotting a graph with 4 data but 3 variables

What strategy or algorithm would you use to come up with an "x" value for that last point? If you can help us understand the strategy or algorithm you would use, we should be able to help you program that into the spreadsheet.

7. ## Re: Plotting a graph with 4 data but 3 variables

It is an iteration done every either 0.1, 0.01, or 0.001 I can't remember exactly. It is not very important so it is fine.

Thanks for the help!

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

#### 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