cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Try the Materials Informatics Toolkit, which is designed to easily handle SMILES data. This and other helpful add-ins are available in the JMP® Marketplace
Choose Language Hide Translation Bar
Kapoor
Level II

How to group points in a plot and assign categories in data table (3 or more categories)

How can one categorize a visual data set into user defined categories in the original data table?

 

To explain this further. Say I have a scatter plot, and I want to select certain group of points, and call it Category 1, then somewhere else, select another group, call it category 2, and so on. The goal is to make an interval plots of these 'categories' and see how the means etc vary.

 

Currently, I can use Data View for selection, and fill, say, Tag 1, then repeat with new selection, and call it Tag 2, and so on. Very manual.

 

In an ideal case, I should be able to "tag" group of points on the plot, choose a destination column in the data table, and perhaps have color option to keep each of the groups visually distinct.

 

Any pointer on how to make this easy would be much appreciated!

 

Thanks and Many Kudos :)

 

How to tag visually selected categories.jpg

2 ACCEPTED SOLUTIONS

Accepted Solutions
txnelson
Super User

Re: How to group points in a plot and assign categories in data table (3 or more categories)

1. Select the data points on the graph you want to categorize

2. Right click on one of the selected points

3. Select "Name Selection in Column"

4. Complete the dialog box with the column name and value to use

5. Click OK

Jim

View solution in original post

julian
Community Manager Community Manager

Re: How to group points in a plot and assign categories in data table (3 or more categories)

Hi @Kapoor,

Building on what Jim suggested, when you use "Name Selection in Column" be sure you use the same name for the variable each time you make a selection, and also remove the value for the "Unselected" rows (that is, delete the 0). This way you can build your new column with just the two "Name Selection in Column" commands.

@julian


View solution in original post

9 REPLIES 9
txnelson
Super User

Re: How to group points in a plot and assign categories in data table (3 or more categories)

1. Select the data points on the graph you want to categorize

2. Right click on one of the selected points

3. Select "Name Selection in Column"

4. Complete the dialog box with the column name and value to use

5. Click OK

Jim
julian
Community Manager Community Manager

Re: How to group points in a plot and assign categories in data table (3 or more categories)

Hi @Kapoor,

Building on what Jim suggested, when you use "Name Selection in Column" be sure you use the same name for the variable each time you make a selection, and also remove the value for the "Unselected" rows (that is, delete the 0). This way you can build your new column with just the two "Name Selection in Column" commands.

@julian


Kapoor
Level II

Re: How to group points in a plot and assign categories in data table (3 or more categories)

Thanks Jim and Julian. Your combined solution works well !

 

As an FYI, in JMP 13,

After right click on data point, I need to go "Rows" before getting to "Name Selection in Column"

 

There was a second question: How to color the selection so one can demarcate the selected clusters.

 

The answer is same - from "Rows" choose "Rows Colors"

(One caveat though, that would not work if  "Color" data zone has been triggered)

 

Thanks to all again!

julian
Community Manager Community Manager

Re: How to group points in a plot and assign categories in data table (3 or more categories)

Hi @Kapoor,

That's correct, if you're doing your selections in Graph Builder you need to go to the Rows submenu to find Name Selection in Column. In most other platforms it's behind just the Right Click. 

 

 

Oops, I did miss that second question. Yes, using Rows > Row colors is one easy way to color the points. Alternatively, once you've named all the selections you could go to the Rows menu > Color or Mark by Column to set the Row states all at once (and here you could also set different markers for the rows). This might be helpful if you are naming many selections and don't want to take the time to color each one separately.  You're right that the Graph Builder Color role will override these colors, which is why having different markers might be helpful. 

@julian

JMP_user1
Level II

Re: How to group points in a plot and assign categories in data table (3 or more categories)

Does anyone has JMP script for selecting group of points i.e. rows and categorizing with different name? Also, if the same group comes again in the same dataset increment the category name by 1. Any help is really appreciate.

Example below:

RowOutputCategory
10.5OFF1
20.5OFF1
31.20
41.50
510ON1
610ON1
77.50
860
90.5OFF2
100.5OFF2
txnelson
Super User

Re: How to group points in a plot and assign categories in data table (3 or more categories)

How are you defining your "Group of Points"?

Jim
JMP_user1
Level II

Re: How to group points in a plot and assign categories in data table (3 or more categories)

Currently I am selecting manually by looking at the data. But below is what I want.

Starting to scan from Row 1 and defining the criteria like output <1. as soon as it sees it. Category1. Then the creteria changes because the output changes and based on output change the creteria changes i.e.9< output <11. and so on.

txnelson
Super User

Re: How to group points in a plot and assign categories in data table (3 or more categories)

Selecting points in a graph, has 2 dimensions. So when you talk about "Row", are you talking about the minimum value on the X axis? And then you look for when the value of the Y axis when you move up higher on the X Axis? So when the Y axis value is found, then those points are declared a Category(Grouping/Bin). Then the definition of category changes to a new group definition and moves on.....is this what you are saying?
Jim
JMP_user1
Level II

Re: How to group points in a plot and assign categories in data table (3 or more categories)

yes exactly.