cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Check out the JMP® Marketplace featured Capability Explorer add-in
Choose Language Hide Translation Bar
tarkan_bih
Level III

Adding line to split data on graph builder

Hi, 

 

I have the following data set below where red data points are some fails that I would like to screen out. Right now the way I am doing this is roughly calculating a trend line (see image below) and finding its equation. Then I create a new column and use JMP formula to basically check if data point is below line and if it is it updates the new column with a 1 and if it is above it marks new column as a 0. This is a pretty manual process and I was wondering if there was a way you could draw a line in graph builder the would autogenerate its equation and select all units below the line and if possible also create a new column?

 

tarkan_bih_1-1605921984689.png

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
ZF
ZF
Level III

Re: Adding line to split data on graph builder

I created a column "Line" with a line function, created another column "Bin":

ZF_1-1606176149813.png

 

ZF_2-1606176203972.png

 

the graph shown below:

ZF_3-1606176260816.png

 

 

 

 

 

View solution in original post

9 REPLIES 9
Thierry_S
Super User

Re: Adding line to split data on graph builder

Hi,
Is this a typical distribution of your "Pass" and "Fail" data? If it is, it might be quite difficult to identify a rational process to separate the two populations because these broadly overlap (i.e. no apparent trend in distribution above and below your "decision" line). If it is not representative, could you provide a more contrasted example that could guide a possible approach?
Best,
TS
Thierry R. Sornasse
txnelson
Super User

Re: Adding line to split data on graph builder

Here is how I would do it

  1. Create a new binning column and specify the following formula
    If( Selected( Row State( Row() ) ),
    	1,
    	0
    )
  2. Go to your graph and then select from the tool bar, the lasso toollasso1.PNG
  3. Use the lasso selection tool to capture all of the data points you want declare as bad data pointslasso2.PNG
  4. Note that all of the rows in the data table that are associated with the selected point, are selected and the value in the new bin column has been set to 1.lasso3.PNG
  5. Now right click on the Header for the bin column and select Col Info
  6. In the Col Info window, click on the Remove button to delete the formula, thus turning the bin values into static valueslasso4.PNG
Jim

Re: Adding line to split data on graph builder

BTW, since Selected() is a Boolean function, the If() function is superfluous. This expression is all that you need for the column formula:

 

Selected( Row State( Row() ) )
ZF
ZF
Level III

Re: Adding line to split data on graph builder

I created a column "Line" with a line function, created another column "Bin":

ZF_1-1606176149813.png

 

ZF_2-1606176203972.png

 

the graph shown below:

ZF_3-1606176260816.png

 

 

 

 

 

tarkan_bih
Level III

Re: Adding line to split data on graph builder

How did you plot the line to split the points afterwards? I am able to get the overlay colors based on the new bin but just not the dashed line you have in graph builder.
txnelson
Super User

Re: Adding line to split data on graph builder

I did not draw a slashed line.....I thought you were just using that for selection, not display.

Jim
tarkan_bih
Level III

Re: Adding line to split data on graph builder

Sorry for confusion, I wanted a line for both selection and display. 

ZF
ZF
Level III

Re: Adding line to split data on graph builder

To plot the line, put both columns "weight" and "Line" on the Y axis. Then select both Scatter plot and fit line plot from the tool bar, uncheck Y Line under the "Point" and Y weight under "Line of Fit" on the left option bars. Please see screen shot below. thanks. ZF

 

ZF_0-1606188385052.png

 

tarkan_bih
Level III

Re: Adding line to split data on graph builder

I was not aware of this functionality in Graph Builder thanks! I was able to add the line and simplify my workflow for this