cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • Register to attend Discovery Summit 2025 Online: Early Users Edition, Sept. 24-25.
  • New JMP features coming to desktops everywhere this September. Sign up to learn more at jmp.com/launch.
Choose Language Hide Translation Bar
Ohad_s
Level III

Adding row values based on graph selection

Hi,

I have data that is spread over serval positions (X\Y).

I would like to plot the data on graph builder, mark set of data (based on the position) and for this selected rows add new value in different column. 

for example, add new column "Group" and for the selected rows give the value "a1".

currently, I am using one of two methods: lag function, or recode for X and then Y and concatenate the new values.

but I would like a more "visualized" based approach.

Ohad_s_1-1756019175605.png

Thanks for any help or advice.

 

 

 

2 ACCEPTED SOLUTIONS

Accepted Solutions
dlehman1
Level VI

Re: Adding row values based on graph selection

You may be looking for a more automated (JSL) way to do this, but if you just want to do what your example shows, after selecting the points on the graph go to Rows - Select where - Name selection in column and call the column Group and enter a1 for the selected rows.  I'm not sure if you want the unselected rows identified as a different group label or left missing, but you can decide what to enter for the unselected rows.  This method requires you to manually select the rows from the graph, so that is why I don't consider it an automated method.

View solution in original post

txnelson
Super User

Re: Adding row values based on graph selection

Here is a simple example using a script to display a window that will set the value of a column called Group for all selected rows  to whatever value is input

Names Default To Here( 1 );

nw = New Window( "Set Values",
	V List Box(
		H List Box(
			Text Box( "Enter Value to Set" ),
			neb = Number Edit Box( . )
		),
		sv = Button Box( "Click to Set Value",
			If(
				Length(
					Current Data Table() <<
					get selected rows
				) > 0,
				:Group[Current Data Table() <<
				get selected rows] = neb << get
			)
		)
	)
)

;
Jim

View solution in original post

4 REPLIES 4
dlehman1
Level VI

Re: Adding row values based on graph selection

You may be looking for a more automated (JSL) way to do this, but if you just want to do what your example shows, after selecting the points on the graph go to Rows - Select where - Name selection in column and call the column Group and enter a1 for the selected rows.  I'm not sure if you want the unselected rows identified as a different group label or left missing, but you can decide what to enter for the unselected rows.  This method requires you to manually select the rows from the graph, so that is why I don't consider it an automated method.

Ohad_s
Level III

Re: Adding row values based on graph selection

thank for your response.

this is what I was wanted!

This is not automated, but based on data visualization which is what i was looking. 

txnelson
Super User

Re: Adding row values based on graph selection

Here is a simple example using a script to display a window that will set the value of a column called Group for all selected rows  to whatever value is input

Names Default To Here( 1 );

nw = New Window( "Set Values",
	V List Box(
		H List Box(
			Text Box( "Enter Value to Set" ),
			neb = Number Edit Box( . )
		),
		sv = Button Box( "Click to Set Value",
			If(
				Length(
					Current Data Table() <<
					get selected rows
				) > 0,
				:Group[Current Data Table() <<
				get selected rows] = neb << get
			)
		)
	)
)

;
Jim
Ohad_s
Level III

Re: Adding row values based on graph selection

thank you for your replay.

this script is a nice approach to add values to selected rows.

 

Recommended Articles