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
DMR
DMR
Level V

Scatterplot Matrix - Changing the Y Variables in JSL

Hi - I've created a Scatterplot Matrix in JSL by supplying it with a list of variables to plot as shown below.  "Yvars_List" is just a list of the names of the variables that I want to plot against one another, so a typical list might be something like {"Height", "Weight", "Shoesize"}.  I have a list of maybe fifty other variables that I could plot instead, so I want to be able to substitute any other list I might assemble within a control panel I've written for the purpose; that is, I want to replace the existing list with a new one, so that the scatterplot matrix immediately updates.  (There's no guarantee that the new list will have the same number of elements as the old one, although there will always be at least two variables in the list for obvious reasons.)

 

In the Graph Builder I would have used a combination of << Remove Variable(...), << Add Variable(...), << Remove Element(...) and/or << Add Element(...) to achieve that, but this is not the Graph Builder.  How can I do this, please?

 

SM = Scatterplot Matrix(
	Y( eval( Yvars_List ) ),
	Matrix Format( "Lower Triangular" ),
	SendToReport(
	Dispatch( {}, "Scatterplot Matrix Plot", FrameBox, {Frame Size( 164, 141 )} )
	)
)

Many thanks for any help provided.

1 ACCEPTED SOLUTION

Accepted Solutions
gzmorgan0
Super User (Alumni)

Re: Scatterplot Matrix - Changing the Y Variables in JSL

@DMR,

 

Please find the attached script SPLOM_ColSelector.jsl. A screenshot of the interface is below. This uses an Update button to redraw. This script can be easily modified to update any time the column selection changes. However, with 50 columns, I would want the update to occur after my selections have been finalized.  From the screenshot, when the user presses the Update button the SPLOM is redrawn.  Note to remove a  column, hold down the CTRL + click a selected column to unselect it, then update (if you are ready).

 

Similarly, to add a column, hold the CTRL + click an unselected column.

 

 

image.png   

View solution in original post

2 REPLIES 2
gzmorgan0
Super User (Alumni)

Re: Scatterplot Matrix - Changing the Y Variables in JSL

@DMR,

 

Please find the attached script SPLOM_ColSelector.jsl. A screenshot of the interface is below. This uses an Update button to redraw. This script can be easily modified to update any time the column selection changes. However, with 50 columns, I would want the update to occur after my selections have been finalized.  From the screenshot, when the user presses the Update button the SPLOM is redrawn.  Note to remove a  column, hold down the CTRL + click a selected column to unselect it, then update (if you are ready).

 

Similarly, to add a column, hold the CTRL + click an unselected column.

 

 

image.png   

DMR
DMR
Level V

Re: Scatterplot Matrix - Changing the Y Variables in JSL

Perfect - many thanks! Also for the demo JSL script showing how to modify the filter options using "<< Parent()" and "<< Xpath()", which I didn't know how to do before.