<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: How to write a script to be able to plot any parameters based on the raw data ? in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/How-to-write-a-script-to-be-able-to-plot-any-parameters-based-on/m-p/71701#M35462</link>
    <description>&lt;P&gt;Here is a simple example that should get you started. &amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA\semiconductor capability.jmp" );

// Modify the sample data table to resemble Ann's data table

// Reduce the number of columns for the demonstration
dt &amp;lt;&amp;lt; delete columns( Index( 15, N Cols( dt ) ) );

// Add a Serial Number to the parameters
For( i = 5, i &amp;lt;= N Cols( dt ), i++,
	Column( dt, i ) &amp;lt;&amp;lt; set name(
		Substr( "000", 1, 3 - Length( Char( i - 4 ) ) ) || Char( i - 4 ) || ":" ||
		Char( Column( dt, i ) &amp;lt;&amp;lt; get name )
	)
);

// Wait 5 seconds to allow for viewing of the new table before running the 
// actual analysis script
Wait( 5 );

/**************************************************************************/

// Actual Analysis Script Example

// Point to the current data table
dt = Current Data Table();

// Find the Y Columns
numericColNamesList = dt &amp;lt;&amp;lt; get column names( string, numeric );

// Loop accros the list from back to front and delete all columns
// not meeting the right structure
// nnnnn:cccccc
For( i = N Items( numericColNamesList ), i &amp;gt;= 1, i--,
	If(
		Not(
			Is Missing( Num( Word( 1, numericColNamesList[i], ":" ) ) ) == 0 &amp;amp;
			Word( 2, numericColNamesList[i], ":" ) != ""
		),
		numericColNamesList = Remove( numericColNamesList, i, 1 )
	)
);

// Run the Variance Charts
// With dynamic Y columns and fixed X columns
Variability Chart( Y( Eval( numericColNamesList ) ), X( :lot_id, :SITE ) );&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Fri, 07 Sep 2018 08:58:50 GMT</pubDate>
    <dc:creator>txnelson</dc:creator>
    <dc:date>2018-09-07T08:58:50Z</dc:date>
    <item>
      <title>How to write a script to be able to plot any parameters based on the raw data ?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-write-a-script-to-be-able-to-plot-any-parameters-based-on/m-p/71585#M35441</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I was thinking hard about the ways to do automation using JMP recently. Are there any scripts which could do this:-&amp;nbsp;&lt;/P&gt;&lt;P&gt;(1) I have the raw data saved in a JMP table.&lt;/P&gt;&lt;P&gt;(2) I have a script that will automatically plot the graphs (example, var chart) by grabbing any Y variables from the Colume (in the raw data) and plot by a&amp;nbsp;fix X parameter (defined in the script). This will save some time to name all the Y variables in the script, especially when I have ~50 parameters to be added into the script.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you,&lt;/P&gt;&lt;P&gt;Ann&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 06 Sep 2018 10:53:45 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-write-a-script-to-be-able-to-plot-any-parameters-based-on/m-p/71585#M35441</guid>
      <dc:creator>XiangCD_MP_User</dc:creator>
      <dc:date>2018-09-06T10:53:45Z</dc:date>
    </item>
    <item>
      <title>Re: How to write a script to be able to plot any parameters based on the raw data ?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-write-a-script-to-be-able-to-plot-any-parameters-based-on/m-p/71586#M35442</link>
      <description>&lt;P&gt;Ann,&lt;/P&gt;
&lt;P&gt;Once the X and Y columns are identified, this&amp;nbsp;becomes a fairly easy task to setup. &amp;nbsp; You specify that the X columns would be defined in the script, so that one is handled.&amp;nbsp; But I am a little confused about the Y columns.&amp;nbsp; Could you provide a little more detail on how one would identify a Y column in your data table?&lt;/P&gt;
&lt;P&gt;Any continuous, numeric column?&lt;/P&gt;
&lt;P&gt;Any column not defined in your script as an X column?&lt;/P&gt;
&lt;P&gt;Any column starting with a specific series of letters, etc.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 06 Sep 2018 11:15:13 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-write-a-script-to-be-able-to-plot-any-parameters-based-on/m-p/71586#M35442</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2018-09-06T11:15:13Z</dc:date>
    </item>
    <item>
      <title>Re: How to write a script to be able to plot any parameters based on the raw data ?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-write-a-script-to-be-able-to-plot-any-parameters-based-on/m-p/71645#M35457</link>
      <description>&lt;P&gt;Hi Jim,&lt;BR /&gt;&lt;BR /&gt;The Y variables would have these features below:&lt;BR /&gt;(1) they are numeric columns&lt;BR /&gt;(2) the parameters' name would always begin with a serial number, then followed by alphabets. For example:&lt;/P&gt;&lt;P&gt;001: voltage_dif &amp;lt;&amp;gt; PinOut&lt;/P&gt;&lt;P&gt;002: resistance_div &amp;lt;&amp;gt; PinIn&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;Thank you,&lt;BR /&gt;Ann Ann&lt;/P&gt;</description>
      <pubDate>Fri, 07 Sep 2018 01:27:17 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-write-a-script-to-be-able-to-plot-any-parameters-based-on/m-p/71645#M35457</guid>
      <dc:creator>XiangCD_MP_User</dc:creator>
      <dc:date>2018-09-07T01:27:17Z</dc:date>
    </item>
    <item>
      <title>Re: How to write a script to be able to plot any parameters based on the raw data ?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-write-a-script-to-be-able-to-plot-any-parameters-based-on/m-p/71701#M35462</link>
      <description>&lt;P&gt;Here is a simple example that should get you started. &amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA\semiconductor capability.jmp" );

// Modify the sample data table to resemble Ann's data table

// Reduce the number of columns for the demonstration
dt &amp;lt;&amp;lt; delete columns( Index( 15, N Cols( dt ) ) );

// Add a Serial Number to the parameters
For( i = 5, i &amp;lt;= N Cols( dt ), i++,
	Column( dt, i ) &amp;lt;&amp;lt; set name(
		Substr( "000", 1, 3 - Length( Char( i - 4 ) ) ) || Char( i - 4 ) || ":" ||
		Char( Column( dt, i ) &amp;lt;&amp;lt; get name )
	)
);

// Wait 5 seconds to allow for viewing of the new table before running the 
// actual analysis script
Wait( 5 );

/**************************************************************************/

// Actual Analysis Script Example

// Point to the current data table
dt = Current Data Table();

// Find the Y Columns
numericColNamesList = dt &amp;lt;&amp;lt; get column names( string, numeric );

// Loop accros the list from back to front and delete all columns
// not meeting the right structure
// nnnnn:cccccc
For( i = N Items( numericColNamesList ), i &amp;gt;= 1, i--,
	If(
		Not(
			Is Missing( Num( Word( 1, numericColNamesList[i], ":" ) ) ) == 0 &amp;amp;
			Word( 2, numericColNamesList[i], ":" ) != ""
		),
		numericColNamesList = Remove( numericColNamesList, i, 1 )
	)
);

// Run the Variance Charts
// With dynamic Y columns and fixed X columns
Variability Chart( Y( Eval( numericColNamesList ) ), X( :lot_id, :SITE ) );&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 07 Sep 2018 08:58:50 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-write-a-script-to-be-able-to-plot-any-parameters-based-on/m-p/71701#M35462</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2018-09-07T08:58:50Z</dc:date>
    </item>
    <item>
      <title>Re: How to write a script to be able to plot any parameters based on the raw data ?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-write-a-script-to-be-able-to-plot-any-parameters-based-on/m-p/71879#M35513</link>
      <description>Thank you so much, Jim. This is indeed very inspiring to me.&lt;BR /&gt;&lt;BR /&gt;If I would love to export all these graphs to Excel, do I need to load in the counter, i too ?</description>
      <pubDate>Sat, 08 Sep 2018 07:38:11 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-write-a-script-to-be-able-to-plot-any-parameters-based-on/m-p/71879#M35513</guid>
      <dc:creator>XiangCD_MP_User</dc:creator>
      <dc:date>2018-09-08T07:38:11Z</dc:date>
    </item>
    <item>
      <title>Re: How to write a script to be able to plot any parameters based on the raw data ?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-write-a-script-to-be-able-to-plot-any-parameters-based-on/m-p/71880#M35514</link>
      <description>&lt;P&gt;&lt;SPAN&gt;I am not sure what your expectations are, when you state &lt;/SPAN&gt;that you would like them to be exported back to Excel? &amp;nbsp;&lt;/P&gt;
&lt;P&gt;JMP can save the graphical output to Word, or PowerPoint, but not to Excel.&amp;nbsp; However, JMP can save a JMP data table to Excel, but it will only save the data table, not any of the graphical output.&lt;/P&gt;
&lt;P&gt;And, you can manually cut and paste the graphics from JMP to Excel.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Would you please provide more detail on what you are thinking?&lt;/P&gt;</description>
      <pubDate>Sat, 08 Sep 2018 12:42:24 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-write-a-script-to-be-able-to-plot-any-parameters-based-on/m-p/71880#M35514</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2018-09-08T12:42:24Z</dc:date>
    </item>
    <item>
      <title>Re: How to write a script to be able to plot any parameters based on the raw data ?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-write-a-script-to-be-able-to-plot-any-parameters-based-on/m-p/71887#M35515</link>
      <description>&lt;P&gt;Sorry that I did not explain myself properly, Jim. My apologies for this.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Below is an example of the code that I was trying to modify/ initially work on.&lt;/P&gt;&lt;P&gt;I am looking into ploting the variability charts automatically with the input data. And then output them into like ppt or so.&amp;nbsp;&lt;/P&gt;&lt;P&gt;But somehow nothing seems to be workng well witt the script.&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;/* Open a sample data table */
dt = Open( "12.jmp" );

/* Obtain a list of numeric/continuous column names as strings */
colList = dt &amp;lt;&amp;lt; Get Column Names( Continuous, String );

/* Loop through the list to generate the desired graph
   and save the report as a JPEG file */
For( i = 2, i &amp;lt;= Nitems( colList ), i++,
	obj = dt &amp;lt;&amp;lt; Variability Chart(&lt;BR /&gt; Y( ::Column( dt, colList[i] ) ),&lt;BR /&gt; X( :WAFER ),&lt;BR /&gt; Max Iter( 100 ),&lt;BR /&gt; Conv Limit( 0.00000001 ),&lt;BR /&gt; Number Integration Abscissas( 128 ),&lt;BR /&gt; Number Function Evals( 65536 ),&lt;BR /&gt; Analysis Type( "Choose best analysis (EMS REML Bayesian)" ),&lt;BR /&gt; Connect Cell Means( 1 ),&lt;BR /&gt; Std Dev Chart( 1 ),&lt;BR /&gt; Automatic Recalc( 1 )&lt;BR /&gt;);&lt;BR /&gt;	
);		
	obj &amp;lt;&amp;lt; Save Picture("C:\Users\Ann Ann" || colList[i] ||".jpg", JPEG );


/* Close table and all invisible reports */
Close( dt, No Save );&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 08 Sep 2018 14:54:01 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-write-a-script-to-be-able-to-plot-any-parameters-based-on/m-p/71887#M35515</guid>
      <dc:creator>XiangCD_MP_User</dc:creator>
      <dc:date>2018-09-08T14:54:01Z</dc:date>
    </item>
    <item>
      <title>Re: How to write a script to be able to plot any parameters based on the raw data ?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-write-a-script-to-be-able-to-plot-any-parameters-based-on/m-p/71888#M35516</link>
      <description>&lt;P&gt;The output from a Platform, is saved within a Report structure for the Platform.&amp;nbsp; Therefore, you need to reference the report for the Platform to gain access to it's output.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Report( obj ) &amp;lt;&amp;lt; Save Picture("C:\Users\Ann Ann" || colList[i] ||".jpg", JPEG );&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 08 Sep 2018 15:23:03 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-write-a-script-to-be-able-to-plot-any-parameters-based-on/m-p/71888#M35516</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2018-09-08T15:23:03Z</dc:date>
    </item>
    <item>
      <title>Re: How to write a script to be able to plot any parameters based on the raw data ?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-write-a-script-to-be-able-to-plot-any-parameters-based-on/m-p/71915#M35518</link>
      <description>Thank you very much, Jim. Seems like I am always stuck with this same old mistake.&lt;BR /&gt;&lt;BR /&gt;Possible to seek for your advice, is there any way to automate and to output these saved figures into Ppt or Word ? I guess the number of plots would easily reach 40-50.</description>
      <pubDate>Sun, 09 Sep 2018 04:15:57 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-write-a-script-to-be-able-to-plot-any-parameters-based-on/m-p/71915#M35518</guid>
      <dc:creator>XiangCD_MP_User</dc:creator>
      <dc:date>2018-09-09T04:15:57Z</dc:date>
    </item>
    <item>
      <title>Re: How to write a script to be able to plot any parameters based on the raw data ?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-write-a-script-to-be-able-to-plot-any-parameters-based-on/m-p/71916#M35519</link>
      <description>&lt;P&gt;Take a look at the Save Presentation() function in the Scripting Index.&lt;/P&gt;</description>
      <pubDate>Sun, 09 Sep 2018 04:42:39 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-write-a-script-to-be-able-to-plot-any-parameters-based-on/m-p/71916#M35519</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2018-09-09T04:42:39Z</dc:date>
    </item>
    <item>
      <title>Re: How to write a script to be able to plot any parameters based on the raw data ?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-write-a-script-to-be-able-to-plot-any-parameters-based-on/m-p/71920#M35520</link>
      <description>&lt;P&gt;&amp;nbsp;Thank you so much, Jim.&lt;/P&gt;&lt;P&gt;I was playing around with various codes and scripts for the whole day, but it seemed like I was only able to output the last plot to the pptx. The rest of the plots were not saved to the ppt. I totally have not idea what has gone wrong.&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;/* Open a sample data table */
dt = Open( "C:\Users\Ann Ann/12.jmp" );

// Find the Y Columns
numericColNamesList = dt &amp;lt;&amp;lt; get column names( string, numeric );

For( i = N Items( numericColNamesList ), i &amp;gt;= 1, i--,
	If(
		Not(
			Is Missing( Num( Word( 1, numericColNamesList[i], ":" ) ) ) == 0 &amp;amp;
			Word( 2, numericColNamesList[i], ":" ) != ""
		),
		numericColNamesList = Remove( numericColNamesList, i, 1 )
	)
);

// Run the Variance Charts
// With dynamic Y columns and fixed X columns
obj = Variability Chart( Y( Eval( numericColNamesList ) ), X( :LOT, :WAFER ) );	

	
robj &amp;lt;&amp;lt; Save Presentation( "C:\Users\Ann Ann\1.pptx" );
Open( "C:\Users\Ann Ann\1.pptx" );

/* Close table and all invisible reports */
Close( dt, No Save );&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 09 Sep 2018 13:47:21 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-write-a-script-to-be-able-to-plot-any-parameters-based-on/m-p/71920#M35520</guid>
      <dc:creator>XiangCD_MP_User</dc:creator>
      <dc:date>2018-09-09T13:47:21Z</dc:date>
    </item>
    <item>
      <title>Re: How to write a script to be able to plot any parameters based on the raw data ?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-write-a-script-to-be-able-to-plot-any-parameters-based-on/m-p/71930#M35521</link>
      <description>&lt;P&gt;By default, the Save Presentation() function will write on top of any previous pptx created, unless you specify the "A&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="append.PNG" style="width: 680px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/12361i727783623AB87E51/image-size/large?v=v2&amp;amp;px=999" role="button" title="append.PNG" alt="append.PNG" /&gt;&lt;/span&gt;ppend" option.&amp;nbsp; See the documentation in the Scripting Index.&lt;/P&gt;</description>
      <pubDate>Sun, 09 Sep 2018 14:26:34 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-write-a-script-to-be-able-to-plot-any-parameters-based-on/m-p/71930#M35521</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2018-09-09T14:26:34Z</dc:date>
    </item>
    <item>
      <title>Re: How to write a script to be able to plot any parameters based on the raw data ?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-write-a-script-to-be-able-to-plot-any-parameters-based-on/m-p/72049#M35528</link>
      <description>&lt;P&gt;Thank you, Jim&lt;/P&gt;</description>
      <pubDate>Mon, 10 Sep 2018 13:30:26 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-write-a-script-to-be-able-to-plot-any-parameters-based-on/m-p/72049#M35528</guid>
      <dc:creator>XiangCD_MP_User</dc:creator>
      <dc:date>2018-09-10T13:30:26Z</dc:date>
    </item>
  </channel>
</rss>

