<?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 JSL to generate box plot and save picture in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/JSL-to-generate-box-plot-and-save-picture/m-p/612111#M81233</link>
    <description>&lt;P&gt;In "44322.jmp" has 28 FAI#, I want to change the script to save 28 pictures like "44322 - Graph Builder.jpg". I know the following ":FAI_1.1&amp;amp;:FAI_1.2&amp;amp;:FAI_1.3" need change, but don't know to change to what.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Variables(
	X( :FAI_1.1, Combine( "Parallel Merged" ) ),
	X( :FAI_1.2, Position( 1 ), Combine( "Parallel Merged" ) ),
	X( :FAI_1.3, Position( 1 ), Combine( "Parallel Merged" ) ),
	Group X( Phase ),
	Color( Phase )
),&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Thu, 08 Jun 2023 16:28:45 GMT</pubDate>
    <dc:creator>Chris_Liu</dc:creator>
    <dc:date>2023-06-08T16:28:45Z</dc:date>
    <item>
      <title>JSL to generate box plot and save picture</title>
      <link>https://community.jmp.com/t5/Discussions/JSL-to-generate-box-plot-and-save-picture/m-p/612111#M81233</link>
      <description>&lt;P&gt;In "44322.jmp" has 28 FAI#, I want to change the script to save 28 pictures like "44322 - Graph Builder.jpg". I know the following ":FAI_1.1&amp;amp;:FAI_1.2&amp;amp;:FAI_1.3" need change, but don't know to change to what.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Variables(
	X( :FAI_1.1, Combine( "Parallel Merged" ) ),
	X( :FAI_1.2, Position( 1 ), Combine( "Parallel Merged" ) ),
	X( :FAI_1.3, Position( 1 ), Combine( "Parallel Merged" ) ),
	Group X( Phase ),
	Color( Phase )
),&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 08 Jun 2023 16:28:45 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/JSL-to-generate-box-plot-and-save-picture/m-p/612111#M81233</guid>
      <dc:creator>Chris_Liu</dc:creator>
      <dc:date>2023-06-08T16:28:45Z</dc:date>
    </item>
    <item>
      <title>Re: JSL to generate box plot and save picture</title>
      <link>https://community.jmp.com/t5/Discussions/JSL-to-generate-box-plot-and-save-picture/m-p/612137#M81237</link>
      <description>&lt;P&gt;How should those column names change? One picture for each FAI_X (where X is number which might be followed by .Y)?&lt;/P&gt;</description>
      <pubDate>Wed, 15 Mar 2023 06:57:32 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/JSL-to-generate-box-plot-and-save-picture/m-p/612137#M81237</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2023-03-15T06:57:32Z</dc:date>
    </item>
    <item>
      <title>Re: JSL to generate box plot and save picture</title>
      <link>https://community.jmp.com/t5/Discussions/JSL-to-generate-box-plot-and-save-picture/m-p/612175#M81238</link>
      <description>&lt;P&gt;Here is a modification to the script that handles the 28 FAI's found in the data.&amp;nbsp; It also adjusts the chart to compensate for the different number of columns found for each FAI.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );
dt = Data Table( "44322.jmp" );
New Window( "Box Plot Compaire", 

	Excluded( Row State( 1 ) ) = 1;
	Excluded( Row State( 2 ) ) = 1;
	Excluded( Row State( 3 ) ) = 1;
	For( i = 2, i &amp;lt; N Col() + 1, i++, 
// determine the number of columns for the current FAI
		nFAI = 1;
		FAI = Word( 1, Column Name( i ), "." );
		Try( If( Word( 1, Column Name( i + 1 ), "." ) == FAI, nFAI = 2 ) );
		Try( If( Word( 1, Column Name( i + 2 ), "." ) == FAI, nFAI = 3 ) );
		If(
			nFAI == 3,
				mybox = Graph Builder(
					Size( 568, 458 ),
					Show Control Panel( 0 ),
					Variables(
						X( As Column( Column Name( i ) ), Position( 1 ), Combine( "Parallel Merged" ) ),
						X( As Column( Column Name( i + 1 ) ), Position( 1 ), Combine( "Parallel Merged" ) ),
						X( As Column( Column Name( i + 2 ) ), Position( 1 ), Combine( "Parallel Merged" ) ),
						Group X( Phase ),
						Color( Phase )
					),
					Elements(
						Box Plot( X( 1 ), X( 2 ), X( 3 ), Legend( 9 ) ),
						Points( X( 1 ), X( 2 ), X( 3 ), Legend( 10 ) ),
						Caption Box( X( 1 ), X( 2 ), X( 3 ), Legend( 11 ) )
					),
					SendToReport(
						Dispatch(
							{},
							"",
							ScaleBox,
							{Min(
								Col Min( Column( i ) ) - (Col Max( Column( i ) ) - Col Min( Column( i ) )) /
								100
							), Max(
								Col Max( Column( i ) ) + (Col Max( Column( i ) ) - Col Min( Column( i ) )) /
								100
							), /*Inc( (col max(column(i)) - col min(column(i)))/100 ),*/ Minor Ticks( 1 ),
							Add Ref Line(
								Column( i )[1],
								"Solid",
								"Dark Red",
								Eval Insert( "LSL ^column(i)[1]^" ),
								1
							), Add Ref Line(
								Column( i )[2],
								"Solid",
								"Dark Red",
								Eval Insert( "USL ^column(i)[2]^" ),
								1
							), Add Ref Line(
								Column( i )[3],
								"Solid",
								"Dark Blue",
								Eval Insert( "Target ^column(i)[3]^" ),
								1
							)}
						)
					)
				);,
			nFAI == 2,
				mybox = Graph Builder(
					Size( 568, 458 ),
					Show Control Panel( 0 ),
					Variables(
						X( As Column( Column Name( i ) ), Position( 1 ), Combine( "Parallel Merged" ) ),
						X( As Column( Column Name( i + 1 ) ), Position( 1 ), Combine( "Parallel Merged" ) ),
						Group X( Phase ),
						Color( Phase )
					),
					Elements(
						Box Plot( X( 1 ), X( 2 ), X( 3 ), Legend( 9 ) ),
						Points( X( 1 ), X( 2 ), X( 3 ), Legend( 10 ) ),
						Caption Box( X( 1 ), X( 2 ), X( 3 ), Legend( 11 ) )
					),
					SendToReport(
						Dispatch(
							{},
							"",
							ScaleBox,
							{Min(
								Col Min( Column( i ) ) - (Col Max( Column( i ) ) - Col Min( Column( i ) )) /
								100
							), Max(
								Col Max( Column( i ) ) + (Col Max( Column( i ) ) - Col Min( Column( i ) )) /
								100
							), /*Inc( (col max(column(i)) - col min(column(i)))/100 ),*/ Minor Ticks( 1 ),
							Add Ref Line(
								Column( i )[1],
								"Solid",
								"Dark Red",
								Eval Insert( "LSL ^column(i)[1]^" ),
								1
							), Add Ref Line(
								Column( i )[2],
								"Solid",
								"Dark Red",
								Eval Insert( "USL ^column(i)[2]^" ),
								1
							), Add Ref Line(
								Column( i )[3],
								"Solid",
								"Dark Blue",
								Eval Insert( "Target ^column(i)[3]^" ),
								1
							)}
						)
					)
				);,
			mybox = Graph Builder(
				Size( 568, 458 ),
				Show Control Panel( 0 ),
				Variables(
					X( As Column( Column Name( i ) ), Position( 1 ), Combine( "Parallel Merged" ) ),
					Group X( Phase ),
					Color( Phase )
				),
				Elements(
					Box Plot( X( 1 ), X( 2 ), X( 3 ), Legend( 9 ) ),
					Points( X( 1 ), X( 2 ), X( 3 ), Legend( 10 ) ),
					Caption Box( X( 1 ), X( 2 ), X( 3 ), Legend( 11 ) )
				),
				SendToReport(
					Dispatch(
						{},
						"",
						ScaleBox,
						{Min(
							Col Min( Column( i ) ) - (Col Max( Column( i ) ) - Col Min( Column( i ) )) / 100
						), Max(
							Col Max( Column( i ) ) + (Col Max( Column( i ) ) - Col Min( Column( i ) )) / 100
						), /*Inc( (col max(column(i)) - col min(column(i)))/100 ),*/ Minor Ticks( 1 ),
						Add Ref Line(
							Column( i )[1],
							"Solid",
							"Dark Red",
							Eval Insert( "LSL ^column(i)[1]^" ),
							1
						), Add Ref Line(
							Column( i )[2],
							"Solid",
							"Dark Red",
							Eval Insert( "USL ^column(i)[2]^" ),
							1
						), Add Ref Line(
							Column( i )[3],
							"Solid",
							"Dark Blue",
							Eval Insert( "Target ^column(i)[3]^" ),
							1
						)}
					)
				)
			);
		); 
	
		Myboxplot = mybox &amp;lt;&amp;lt; report;
		Myboxplot &amp;lt;&amp;lt; save picture( FAI || ".emf", emf );
	
	// Increase variable i if nFAI is greater than 1	
	i=i+nFAI-1;
	);

);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 15 Mar 2023 07:53:30 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/JSL-to-generate-box-plot-and-save-picture/m-p/612175#M81238</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2023-03-15T07:53:30Z</dc:date>
    </item>
    <item>
      <title>Re: JSL to generate box plot and save picture</title>
      <link>https://community.jmp.com/t5/Discussions/JSL-to-generate-box-plot-and-save-picture/m-p/613059#M81328</link>
      <description>&lt;P&gt;As follows, "&lt;FONT color="#0000FF"&gt;Min(……)&lt;/FONT&gt;" can use "::" to sample? I&amp;nbsp;wrote "&lt;FONT color="#0000FF"&gt;Min( Col Min( Column( i :: i + 12 )));&lt;/FONT&gt;" &amp;amp; "&lt;FONT color="#0000FF"&gt;Min( Col Min( Column( i ) :: Col Min( Column( i + 12 )));&lt;/FONT&gt;"but its error.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For( i = 2, i &amp;lt; N Col() + 1, i++,&lt;/P&gt;&lt;P&gt;……&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000FF"&gt;Min(Col Min( Column( i )), Col Min( Column( i + 1 )), Col Min( Column( i + 2 )), Col Min( Column( i + 3 )), Col Min( Column( i + 4 )), Col Min( Column( i + 5 )), Col Min( Column( i + 6 )), Col Min( Column( i + 7 )), Col Min( Column( i + 8 )), Col Min( Column( i + 9 )), Col Min( Column( i + 10 )), Col Min( Column( i + 11 )), Col Min( Column( i + 12 )));&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;……&lt;/P&gt;&lt;P&gt;);&lt;/P&gt;</description>
      <pubDate>Thu, 16 Mar 2023 13:18:17 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/JSL-to-generate-box-plot-and-save-picture/m-p/613059#M81328</guid>
      <dc:creator>Chris_Liu</dc:creator>
      <dc:date>2023-03-16T13:18:17Z</dc:date>
    </item>
  </channel>
</rss>

