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

Updating Charts and Tables in a Custom Display Window using JSL

I recently built a script to create a TOPSIS multi-attribute decision making analysis on some of my data to help pick the best case. The actual calculations are fairly basic from a mathematic perspective, and they work just fine. I built a window to display some information about the data I am working with, the importance weightings used in the calculations in bar chart form, a scatterplot matrix of the results, a 3D scatterplot of the results, and a table with the top 10 cases.

I decided to make this interface more interactive. I want the user to be able to change the importance weightings, redo the calculations, and have the graphs and tables update. I have gotten the calculations redone just fine, but I run into trouble with the display elements. I have a few specific issues here:

1) When I run the calculations again, the data table from which the scatterplots and table get their information is updated. Despite my color and marker selections in the data table, the scatterplot matrix only features regular unselected points after updating (the 3D scatterplot appears to update without issue). Reshow does not fix this problem. I can fix it by running the Redo Analysis command, but that opens a new window. Is there a way to simply replace the old scatterplot matrix in the same window with the Redo Analysis command?

2) I haven't been able to update the table of my top 10 cases. The table is a table box with several Number Column Boxes. I have tried Reshow and using <
3) The final issue I have is that the bar chart is run from a different data table than the other charts and tables. To successfully create all the elements in the first place, I have had to sort of hack this issue by using something like this:
displayElement = currentdatatable(x); Chart(...)
This approach works, but then I can't pass messages to displayElement as though it were a chart. Is there a better way around this issue?

I have been through the manual and been unable to find anything specific about updating already existing display elements besides Reshow. I am relatively new to JSL, especially when it comes to trying to create interactive displays, so hopefully I am just missing something. Thanks in advance for any advice.
1 ACCEPTED SOLUTION

Accepted Solutions
XanGregg
Staff

Re: Updating Charts and Tables in a Custom Display Window using JSL

Sounds like you're doing pretty good so far.

1) Apparently scatterplot matrix has a greater sensitivity to data table updates that scatterplot 3D. If you have JMP 8, there is a "Automatic Recalc" option under the Script submenu that will cause an in-place Redo Analysis to happen whenever the data table changes.

2) I can get << Set Values to work if I pass the values in as a matrix:

ncb << Set Values([1, 2, 3]);

3) You can pass platform names as messages to datatables, and you should be able to use x << Chart(...)

View solution in original post

5 REPLIES 5

Re: Updating Charts and Tables in a Custom Display Window using JSL

I noticed the forum has gotten a bit more active, so I figured I'd try bumping this up again to see if anyone has any thoughts.

Thanks.
XanGregg
Staff

Re: Updating Charts and Tables in a Custom Display Window using JSL

Sounds like you're doing pretty good so far.

1) Apparently scatterplot matrix has a greater sensitivity to data table updates that scatterplot 3D. If you have JMP 8, there is a "Automatic Recalc" option under the Script submenu that will cause an in-place Redo Analysis to happen whenever the data table changes.

2) I can get << Set Values to work if I pass the values in as a matrix:

ncb << Set Values([1, 2, 3]);

3) You can pass platform names as messages to datatables, and you should be able to use x << Chart(...)

Re: Updating Charts and Tables in a Custom Display Window using JSL

Xan,

Thank you so much. 2 and 3 work perfectly. As for 1, I don't have JMP 8. Getting new software can take quite awhile around here. Do you know of a workaround for JMP 7?

On a somewhat related note, I have had to redo this interactive portion in Excel because we'd like it to be portable. However, I find Excel to be much more difficult to work with because it doesn't treat data in the same way as JMP and the plots in JMP are much better. Is there a capability or has there been any talk of adding a capability to JMP to create small executables with perhaps limited functionality that people without JMP could run? I know that MATLAB has some capability for this. I understand if this isn't really a viable option for SAS, but it would be useful to be able to use JMP's plots to communicate with decision makers who have no particular use for the more powerful analysis capabilites.
XanGregg
Staff

Re: Updating Charts and Tables in a Custom Display Window using JSL

For item 1 under JMP 7, you might be able to get it to work in a roundabout way. When you add the scatterplot matrix to the combined report, wrap it in a list box. Then when you want to update the matrix, run it again and remove the old and append the new results to the wrapper list box. The rerun could be triggered by an explicit button or as a side-effect of something else. Off the top of my head, something like

wrapper = V List Box( spm = Scatterplot Matrix(...));

...
spm << Delete;
wrapper << Append( spm = Scatterplot Matrix(...));
...

For sharing interactive JMP results, JMP 8 allows the Profiler and Bubble Plot to be exported as Flash. Of course, all JMP versions can export static images to various formats and can export a report or journal as HTML or RTF.

Re: Updating Charts and Tables in a Custom Display Window using JSL

Xan,

Thank you again.

One small note for anyone else having similar problems: The above method won't work directly. You'll get an error from the append method because scatterplot matrix is not a display box. However, if you instead use a borderbox around the scatterplot as below, it works fine.

spm = Borderbox( Scatterplot Matrix(...));