- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
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.
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content