cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Check out the JMP® Marketplace featured Capability Explorer add-in
Choose Language Hide Translation Bar
ivan_j_moore
Level III

How can I create a JSL script for saving a graph to the data table.

I have a scheduled script running daily which saves out a data table.

However I would like to include graphs which I can do manually and save to data table.

Is there away of putting this into the script ?

Any help appreciated.

14 REPLIES 14
txnelson
Super User

Re: How can I create a JSL script for saving a graph to the data table.

Yes, the New Script message/function is what you want to use.

 

If the graph that you want to produce is always the same graph, then all you have to do is to take the script that you are currently manually saving to the data table and to paste it into the "New Script" message.

 

 

Names Default To Here( 1 );
dt = Current Data Table();
dt << New Script(
       "<Give the Script whatever name you want>",
       <paste the script here>
);

 

 

If you are not sure on how to get the script that produces the graph, all you need to do is to right click on the red triangle located to the left of the script you saved to the data table, and then select "Edit".  You can copy from the window that displays the script.

 

Jim
ivan_j_moore
Level III

Re: How can I create a JSL script for saving a graph to the data table.

Hi Jim,

 

Thanks for the info

Here is what I am running now see below.

 

Problem, I don't see the graph, and / or it dosen't seem to show up in the same location as doing it manually, Could you help here.

 

 

Names Default To Here( 1 );
dt =  ("XFER_SPLIT");
<< New Script("Fit Y by X",
      Fit Group(
  Bivariate( Y( :MEDIAN BISN_RES ), X( :PDATETIME ) ),
  Oneway(
  Y( :MEDIAN BISN_RES ),
  X( :MACH ),
  Means and Std Dev( 1 ),
  Mean Error Bars( 1 ),
  Std Dev Lines( 1 ),
  X Axis Proportional( 0 ),
  Points Jittered( 1 )
  ),
  <<{Arrange in Rows( 2 )}
));

 

txnelson
Super User

Re: How can I create a JSL script for saving a graph to the data table.

Your first 2 lines are incorrect.  They should be:

dt=data table("xfer_split");

dt << New Script("Fit Y by X",

I think these changes should create the script in the data table.  The running of the script will still require the individual to click on the red triangle next to the embedded script, and to select "Run Script"

Jim
ivan_j_moore
Level III

Re: How can I create a JSL script for saving a graph to the data table.

Hi Jim,

Thanks for this info, the script is now working perfect. I believe I was going what we call JMP blind.

I am new to this website but I would like to add this information is simply Priceless.

I can now save the data table on a daily basis for others and all they have to do is click on the red triangle which produces the same graph every time.

Thanks for now.

Re: How can I create a JSL script for saving a graph to the data table.

Addition to what others have said, bear in mind that JMP Pro 12 has the capability of storing several tables, charts, graphs, etc to the Application Builder, which has the capability to automatically update each of every table, graph, charts, etc once launch assuming that these tables are scripted to a update tables.

Jenkins Macedo