Our World Statistics Day conversations have been a great reminder of how much statistics can inform our lives. Do you have an example of how statistics has made a difference in your life? Share your story with the Community!
Choose Language Hide Translation Bar
Highlighted
Level IV

Help with graph builder

I have data from 35 batches and would like to graph each batch and see at what time each batch had highest reading. For instance for batch 1 highest reading was 281.944 at 4.5 hours and for batch 2 highest reading was 312.314 at 5 hours (data is in the attached file). I want to plot all the batches to compare them. Is there a way to plot this?

2 ACCEPTED SOLUTIONS

Accepted Solutions
Highlighted
Super User

Re: Help with graph builder

What I did was to stack all of the hour columns, and then to create a new column called High, which has the value of Yes, when the row is the high for the batch and No for all other rows.  I then just simply turned the labeling on for the Batch column, for the rows that have the Yes value. I have attached the stacked data table with the formula column

Jim
Highlighted
Super User

Re: Help with graph builder

Attached is your data table, with a new column with the formula I provided previously.  The formula works fine.  The issue with the formula, is that it does not specify a "Yes" to any row, when multiple "High" values are found.  If this is not what you want, then all you need to do, is to determine how from your data that you can identify which row of the multiple same value of high.  Then it is a matter of putting that key into the formulal

Jim
9 REPLIES 9
Highlighted
Super User

Re: Help with graph builder

What I did was to stack all of the hour columns, and then to create a new column called High, which has the value of Yes, when the row is the high for the batch and No for all other rows.  I then just simply turned the labeling on for the Batch column, for the rows that have the Yes value. I have attached the stacked data table with the formula column

Jim
Highlighted
Level IV

Re: Help with graph builder

@txnelson thank you so much for your help. This is what i needed but I do not see the attached data table with formula column. I stacked my data just wanted to look at the formula column. Thank you again for your help.

Highlighted
Super User

Re: Help with graph builder

Well, I thought I had attached it......I updated the entry, so the data table should be there now
Jim
Highlighted
Level IV

Re: Help with graph builder

@txnelson Thank you so much for your help.

Highlighted
Level IV

Re: Help with graph builder

@txnelson Got couple of more questions. In the attached data file, the value for all the data points is '0' so when I create variable 'high' with yes for high and no for low values it assigns yes to whole batch because for all the time points value is '0'. For example batch 7. Is there any way to fix this? Secondly, I know there is an easy to do this which I am not aware of, when I am adding label for all the 'yes' values in column high I am selecting all the yes values one by one and then select label. Can you please tell me what is the easy way to add labels?

Highlighted
Super User

Re: Help with graph builder

The issue with having too many absorptions at a value of zero can be handled by just making the setting of the column High, just a little more complex.  Here is an example of one way the formula can be set

``````dt = Current Data Table();
curAbsorp = :absorption;
If(
Col Max( :absorption, :batch ) == :absorption & :batch == :batch[Empty()] &
N Rows( dt << get rows where( :absorption == curAbsorp ) ) == 1,
"Yes",
"No"
);``````

Concerning the setting of the labels for the rows where High==Yes, just clear the row states to get rid of any current label settings and unselect all selected rows and columns.  Now go to one of the cells where the value of High is "Yes" and right click on the cell......The choose "Select Matching Cells"

Jim
Level IV

Re: Help with graph builder

@txnelson thank you for your reply but I tried using the formula you mentioned but I am not getting the right result. I am sure I am making some mistake just trying to find out what is my mistake. I tried it in the attached data set and first I tried it deleted all the yes from column high and second time all the values in column high was low and then couple of times i got error.

Highlighted
Super User

Re: Help with graph builder

Attached is your data table, with a new column with the formula I provided previously.  The formula works fine.  The issue with the formula, is that it does not specify a "Yes" to any row, when multiple "High" values are found.  If this is not what you want, then all you need to do, is to determine how from your data that you can identify which row of the multiple same value of high.  Then it is a matter of putting that key into the formulal

Jim
Highlighted
Level IV

Re: Help with graph builder

@txnelson Thank you very much for all your help.

Article Labels

There are no labels assigned to this post.