cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
JMP is taking Discovery online, April 16 and 18. Register today and join us for interactive sessions featuring popular presentation topics, networking, and discussions with the experts.
Choose Language Hide Translation Bar
alexhemmert1
Level II

Script to Select Data in Graph Builder

 

I have created a custom map to graph measurement locations on a vehicle to give a visual representation of the process throughout the vehicle. As you can see below. I would like to be able to select all the data represented in the graph builder below and pull it into a new datatable using script Does anyone know how to select data in graph builder using script?

 

 

Capture.PNG

 

 

6 REPLIES 6
pmroz
Super User

Re: Script to Select Data in Graph Builder

Selecting information in Graph Builder also selects rows in your data table.  To get the selected rows use this command on your underlying table (pointed to by the variable dt):

 

selected_rows = dt << get selected rows();

if (nrows(selected_rows) > 0,
	// Do some action here
);
alexhemmert1
Level II

Re: Script to Select Data in Graph Builder

Is there anyway to script to automoatically select of the rows show in graph builder, so I don't have to highlight them manually?

pmroz
Super User

Re: Script to Select Data in Graph Builder

What do you mean by this statement: "Select the rows shown in graph builder"?

 

JMP datasets and child objects are "cross-linked".  I.e. if you select rows in a table, then any graphs created from that dataset will also highlight the corresponding data in the graph.  Similarly if you select something in graph builder, behind the scenes the corresponding rows in the data table will also be selected.

alexhemmert1
Level II

Re: Script to Select Data in Graph Builder

My data table has points for the whole vehicle and the map in the above example is just points on the left side of the vehicle. I would like to script to be able to highlight just the points in that map to analyze the data in for detail for that specific side.

 

Just realized that I could have a column describing its location and pull the data out by selecting matching.

pmroz
Super User

Re: Script to Select Data in Graph Builder

That will work.

 

dt << select rows where(:side == "L");
txnelson
Super User

Re: Script to Select Data in Graph Builder

apparently you are using different maps for different parts of the car.  If this is the case, you can read the data from the map, and it will tell you what parts are displayable from that map, and then select all of the points in your measurement data table that have those parts.

Jim