<?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: JSL - Generate -x-y Plot that loops through columns with different variables in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/JSL-Generate-x-y-Plot-that-loops-through-columns-with-different/m-p/57040#M31994</link>
    <description>&lt;P&gt;You can create a fixed scale or use a favorite algorithm to find the best scale for the data at hand.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;A modified version of the previously supplied script is attached below. The new code is listed below.&amp;nbsp; Note, for the dummy data, the scaling best scaling is probably -8 to 8, however, I chose -7 for demonstration that several graphs might be clipped.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;_xx = gb&amp;lt;&amp;lt; Xpath("//ScaleBox[@charID='Y']");
_xx[1] &amp;lt;&amp;lt; Axis Setings({Min( -7 ), Max( 8 ), Inc( 1 ), Minor Ticks( 1 ),
			Label Row( {Show Major Grid( 1 ), Show Minor Grid( 1 )} )});&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;There are multiple methods to figure out how to script a change. The easiest is to script one graph, then use the GUI to&amp;nbsp;&lt;/P&gt;&lt;P&gt;change the axes or titles or legends. Then from the red inverted triangle (on the graph builder outline) select &lt;STRONG&gt;Save Script&amp;nbsp;&lt;/STRONG&gt;&amp;gt; &lt;STRONG&gt;To Script Window&lt;/STRONG&gt;. Using this method it will show a Dispatch argument.&amp;nbsp; See below.&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Graph Builder(
	Size( 1242, 709 ),
	Show Control Panel( 0 ),
	Variables( X( :X ), Y( :Y ), Group X( :Wafer ID ), Overlay( :RowCol ) ),
	Elements( Smoother( X, Y, Legend( 19 ) ) ),
	Where( dt:Channel == chnl &amp;amp; dt:Test State == tst ),
	SendToReport(
		Dispatch(
			{},
			"Graph Builder",
			OutlineBox,
			{Set Title( "Results for Channel=1 and Test State=1" )}
		),
		Dispatch(
			{},
			"Y",
			ScaleBox,
			{Min( -7 ), Max( 8 ), Inc( 1 ), Minor Ticks( 1 ),
			Label Row( {Show Major Grid( 1 ), Show Minor Grid( 1 )} )}
		)
	)
);&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Since your title is custom, remove the Dispatch to the OutlineBox, then use this code in your for loop and each graph will have the same scaling specified in your script.&lt;/P&gt;</description>
    <pubDate>Tue, 15 May 2018 18:06:45 GMT</pubDate>
    <dc:creator>gzmorgan0</dc:creator>
    <dc:date>2018-05-15T18:06:45Z</dc:date>
    <item>
      <title>JSL - Generate -x-y Plot that loops through columns with different variables</title>
      <link>https://community.jmp.com/t5/Discussions/JSL-Generate-x-y-Plot-that-loops-through-columns-with-different/m-p/56020#M31438</link>
      <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture.JPG" style="width: 999px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/10552iD72448D1DAAAFBF0/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture.JPG" alt="Capture.JPG" /&gt;&lt;/span&gt;Greetings,&lt;/P&gt;&lt;P&gt;Background: I have a very large data set that is an output of specific RF testing for semi-conductor devices. During this RF test there are a variety of differnt conditions that are important. I have 3 outputs that are tested on 16 different channels at 6 different test states which require me&amp;nbsp;to generate 105 differnt graphs.&lt;/P&gt;&lt;P&gt;example: Gain vs Frequency on Channel 1 at Test State 1; Gain vs Frequency on Channel 2 at Test State 1 where i have 15 channels and 6 test states.&lt;/P&gt;&lt;P&gt;I have searched these discussion boards for a solution and the closets i have come is a thread started in 2017 titled "&lt;SPAN class="lia-link-navigation child-thread lia-link-disabled"&gt;How to export JMP graph to PPT by JSL?"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="lia-link-navigation child-thread lia-link-disabled"&gt;I tried to incorperate the script used in this solution to help me and i can get it to make the required number of plots but cannot get specific channels to filter out.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="lia-link-navigation child-thread lia-link-disabled"&gt;&lt;SPAN class="lia-link-navigation child-thread lia-link-disabled"&gt;I think i am having a hard time communicating this so please if you need clarification, ask.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="lia-link-navigation child-thread lia-link-disabled"&gt;&lt;SPAN class="lia-link-navigation child-thread lia-link-disabled"&gt;Thanks&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Summarize( dt, lstChannel = By( :channel ) );
gb = Graph Builder(
	invisible,
	Size( 1225, 952 ),
	Show Control Panel( 0 ),
	Variables(
		X( :Name( "Freq _(GHz)" ) ),
		Y( :Gain ),
		Group X( :wafer_num ),
		Overlay( :RowCol ) ),
		Elements( Smoother( X, Y, Legend( 19 ) ) )
);

For( i = 1, i &amp;lt;= N Items( GroupBy ), i++,
		gb &amp;lt;&amp;lt; Local Data Filter( 
			columns(
				:wafer_num,
				:channel,
				:RowCol),
			Where( :channel == LstChannel[i] ) ),

// I would like to loop through the teststates as well
			Where( :teststate == 1 ), 
			Mode( Show( 1 ), Include( 1 ) ) );
	If( i == 1,
		gb &amp;lt;&amp;lt; Save Presentation( "$TEMP/jmp_example2.pptx" ),
		gb &amp;lt;&amp;lt; Save Presentation( "$TEMP/jmp_example2.pptx", Append )
	);
	gb &amp;lt;&amp;lt; remove data filter;
);

Open( "$TEMP/jmp_example2.pptx" );&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 27 Apr 2018 15:55:43 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/JSL-Generate-x-y-Plot-that-loops-through-columns-with-different/m-p/56020#M31438</guid>
      <dc:creator>Yngeinstn</dc:creator>
      <dc:date>2018-04-27T15:55:43Z</dc:date>
    </item>
    <item>
      <title>Re: JSL - Generate -x-y Plot that loops through columns with different variables</title>
      <link>https://community.jmp.com/t5/Discussions/JSL-Generate-x-y-Plot-that-loops-through-columns-with-different/m-p/56064#M31461</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would recommend modifying your approach for generating the graphs to use where statements instead of the data filter.&amp;nbsp; The data filter is great for interactive visual analytics, however, since your view is invisible, I suggest you use a where statement.&amp;nbsp; When a where statement is used, a where text box is visible; it can be deleted. You can also use a By argument, By(:Channel, :Test State). Then the script needs to access each GB and save the presentation.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am not a fan of Save Presentation, I like to use P3ICLI, a free external command line program to create PPTX slides from my JMP output. See&amp;nbsp;&lt;A href="https://p3icli.sourceforge.io/jsl_example.html" target="_self"&gt;JSL example to create PPTX using P3ICLI&lt;/A&gt;&amp;nbsp;. Like any code it looks messy, but can create very customized and can control the graph and title sizing.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, &amp;nbsp;for multiple plot saves using Save Presentation we wrote up some tricks to journal multiple layout displays as pictures, the use save presentation, but you have to play around with the sizing.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Anyway, attached is a dummy data table to emulate your scenario and two scripts, each saves one picture per page&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope this helps.&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 28 Apr 2018 07:24:39 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/JSL-Generate-x-y-Plot-that-loops-through-columns-with-different/m-p/56064#M31461</guid>
      <dc:creator>gzmorgan0</dc:creator>
      <dc:date>2018-04-28T07:24:39Z</dc:date>
    </item>
    <item>
      <title>Re: JSL - Generate -x-y Plot that loops through columns with different variables</title>
      <link>https://community.jmp.com/t5/Discussions/JSL-Generate-x-y-Plot-that-loops-through-columns-with-different/m-p/56316#M31621</link>
      <description>&lt;P&gt;Thank You for the response. I am going to use your examples to see if i can figure it out..&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried using the "select where" statement and it worked pretty well..&amp;nbsp;I was just trying to reduce the amount of code that i was going to have to write.. I have 5 different tests with all the parameters listed above..&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I will report back when i give this a try.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks again..&lt;/P&gt;</description>
      <pubDate>Thu, 03 May 2018 12:25:07 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/JSL-Generate-x-y-Plot-that-loops-through-columns-with-different/m-p/56316#M31621</guid>
      <dc:creator>Yngeinstn</dc:creator>
      <dc:date>2018-05-03T12:25:07Z</dc:date>
    </item>
    <item>
      <title>Re: JSL - Generate -x-y Plot that loops through columns with different variables</title>
      <link>https://community.jmp.com/t5/Discussions/JSL-Generate-x-y-Plot-that-loops-through-columns-with-different/m-p/56926#M31936</link>
      <description>&lt;P&gt;I can't thank you enough for your help with this.. No one here at work could even remotely tell me how to do what you did..&lt;/P&gt;&lt;P&gt;With this you have cut the time it takes me to do this down by at least 80%..&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Your solution and the SQL scripts i am writing to access our database files will put us in a fantastic position with our customer.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you again..&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;D&lt;/P&gt;</description>
      <pubDate>Fri, 11 May 2018 17:08:56 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/JSL-Generate-x-y-Plot-that-loops-through-columns-with-different/m-p/56926#M31936</guid>
      <dc:creator>Yngeinstn</dc:creator>
      <dc:date>2018-05-11T17:08:56Z</dc:date>
    </item>
    <item>
      <title>Re: JSL - Generate -x-y Plot that loops through columns with different variables</title>
      <link>https://community.jmp.com/t5/Discussions/JSL-Generate-x-y-Plot-that-loops-through-columns-with-different/m-p/57034#M31990</link>
      <description>&lt;P&gt;Can I ask you one more question related to the For() loop with the graphs?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there a way to autoscale best fit?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If i can get the scale in the example from Min = 5 and Max = 30 we can get a better idea on exactly how the parts&amp;nbsp;perform across the Frequencies...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Of course i am going to have to remove the outliers before hand..&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Tue, 15 May 2018 12:44:33 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/JSL-Generate-x-y-Plot-that-loops-through-columns-with-different/m-p/57034#M31990</guid>
      <dc:creator>Yngeinstn</dc:creator>
      <dc:date>2018-05-15T12:44:33Z</dc:date>
    </item>
    <item>
      <title>Re: JSL - Generate -x-y Plot that loops through columns with different variables</title>
      <link>https://community.jmp.com/t5/Discussions/JSL-Generate-x-y-Plot-that-loops-through-columns-with-different/m-p/57040#M31994</link>
      <description>&lt;P&gt;You can create a fixed scale or use a favorite algorithm to find the best scale for the data at hand.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;A modified version of the previously supplied script is attached below. The new code is listed below.&amp;nbsp; Note, for the dummy data, the scaling best scaling is probably -8 to 8, however, I chose -7 for demonstration that several graphs might be clipped.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;_xx = gb&amp;lt;&amp;lt; Xpath("//ScaleBox[@charID='Y']");
_xx[1] &amp;lt;&amp;lt; Axis Setings({Min( -7 ), Max( 8 ), Inc( 1 ), Minor Ticks( 1 ),
			Label Row( {Show Major Grid( 1 ), Show Minor Grid( 1 )} )});&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;There are multiple methods to figure out how to script a change. The easiest is to script one graph, then use the GUI to&amp;nbsp;&lt;/P&gt;&lt;P&gt;change the axes or titles or legends. Then from the red inverted triangle (on the graph builder outline) select &lt;STRONG&gt;Save Script&amp;nbsp;&lt;/STRONG&gt;&amp;gt; &lt;STRONG&gt;To Script Window&lt;/STRONG&gt;. Using this method it will show a Dispatch argument.&amp;nbsp; See below.&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Graph Builder(
	Size( 1242, 709 ),
	Show Control Panel( 0 ),
	Variables( X( :X ), Y( :Y ), Group X( :Wafer ID ), Overlay( :RowCol ) ),
	Elements( Smoother( X, Y, Legend( 19 ) ) ),
	Where( dt:Channel == chnl &amp;amp; dt:Test State == tst ),
	SendToReport(
		Dispatch(
			{},
			"Graph Builder",
			OutlineBox,
			{Set Title( "Results for Channel=1 and Test State=1" )}
		),
		Dispatch(
			{},
			"Y",
			ScaleBox,
			{Min( -7 ), Max( 8 ), Inc( 1 ), Minor Ticks( 1 ),
			Label Row( {Show Major Grid( 1 ), Show Minor Grid( 1 )} )}
		)
	)
);&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Since your title is custom, remove the Dispatch to the OutlineBox, then use this code in your for loop and each graph will have the same scaling specified in your script.&lt;/P&gt;</description>
      <pubDate>Tue, 15 May 2018 18:06:45 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/JSL-Generate-x-y-Plot-that-loops-through-columns-with-different/m-p/57040#M31994</guid>
      <dc:creator>gzmorgan0</dc:creator>
      <dc:date>2018-05-15T18:06:45Z</dc:date>
    </item>
    <item>
      <title>Re: JSL - Generate -x-y Plot that loops through columns with different variables</title>
      <link>https://community.jmp.com/t5/Discussions/JSL-Generate-x-y-Plot-that-loops-through-columns-with-different/m-p/57044#M31998</link>
      <description>&lt;P&gt;Very much appreciated.. I am going to try it this evening..&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 15 May 2018 19:10:17 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/JSL-Generate-x-y-Plot-that-loops-through-columns-with-different/m-p/57044#M31998</guid>
      <dc:creator>Yngeinstn</dc:creator>
      <dc:date>2018-05-15T19:10:17Z</dc:date>
    </item>
    <item>
      <title>Re: JSL - Generate -x-y Plot that loops through columns with different variables</title>
      <link>https://community.jmp.com/t5/Discussions/JSL-Generate-x-y-Plot-that-loops-through-columns-with-different/m-p/57051#M32003</link>
      <description>&lt;P&gt;I just tried your solution. I usually do the Save Script to Window so i can see how the graph is supposed to look.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have attached a modified dummy data to give you an idea of what exactly I am trying to accomplish.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;With the 15 channels and in this case 2 test states that have different ouputs I can't see a one size fits all solution..&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Let me know what you think please.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This particular tests has 3 outputs. which i have to evaluate separate.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;David&lt;/P&gt;</description>
      <pubDate>Tue, 15 May 2018 20:49:15 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/JSL-Generate-x-y-Plot-that-loops-through-columns-with-different/m-p/57051#M32003</guid>
      <dc:creator>Yngeinstn</dc:creator>
      <dc:date>2018-05-15T20:49:15Z</dc:date>
    </item>
    <item>
      <title>Re: JSL - Generate -x-y Plot that loops through columns with different variables</title>
      <link>https://community.jmp.com/t5/Discussions/JSL-Generate-x-y-Plot-that-loops-through-columns-with-different/m-p/57052#M32004</link>
      <description>&lt;P&gt;didn't load the table..&lt;/P&gt;</description>
      <pubDate>Tue, 15 May 2018 20:59:08 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/JSL-Generate-x-y-Plot-that-loops-through-columns-with-different/m-p/57052#M32004</guid>
      <dc:creator>Yngeinstn</dc:creator>
      <dc:date>2018-05-15T20:59:08Z</dc:date>
    </item>
    <item>
      <title>Re: JSL - Generate -x-y Plot that loops through columns with different variables</title>
      <link>https://community.jmp.com/t5/Discussions/JSL-Generate-x-y-Plot-that-loops-through-columns-with-different/m-p/57062#M32010</link>
      <description>&lt;P&gt;As I mentioned in my previous response, "&lt;SPAN&gt;You can create a fixed scale or use a favorite algorithm to find the best scale for the data at hand.&lt;/SPAN&gt;" Below is the function gd_inc() created for script&amp;nbsp;7_InteractiveDisplays_Alternates.jsl (for book JSL Companion, 2nd Ed.).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It is a simplification of functions I use when coding an application where the range of values are unknown.&amp;nbsp; This script assumes Fixed Decimal format will work. A more general script would determine, if too many decimals, then switch to scientific notation or change to a log scale etc.&amp;nbsp; Before using it, you should try it out.&lt;/P&gt;&lt;P&gt;The arguments are Low, High and Number of increments. It returns a vector of inc value, #of decimals for the format and the max length; in the full script, it is used for an x-axis and the orientation is changed based upon its length. Or the length might be used to trigger if something else other than Fixed Decimal format should be used.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;gd_inc = Function({xlo, xhi, ntic}, {sp,tt, yrnd, ginc, ndec,lc, ll},
 sp = (xhi - xlo)/ntic;
 tt = log10(sp);
 yrnd = If(
	tt &amp;gt; 0, 1 - Floor( tt ),
	Abs( Floor( tt ) - 1 )
 );  
 ginc =round(sp,yrnd);
 ndec = length(word(2,char(ginc),"."));
 lc    = length(word(1,char(xhi),"."));
 if(ndec&amp;gt;0, lc=lc+ndec+1);
 if(xlo &amp;lt;0, lc++); //add 1 character for the negative sign
 ll=[1,1,1];
 ll[1] = ginc; //increment
 ll[2] = ndec; //# decimals
 ll[3] = lc;   //character length
 ll
);  // end gd_inc
/* test cases
show(gd_inc(1,11,10), gd_inc(.001, .005, 10), gd_inc(10000,20200, 10) )	
*/&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Once you have the results, then modify your script&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;	_yscl = gd_inc(Lo,Hi, 10);
      _xx[1] &amp;lt;&amp;lt; Axis Setings( {Min( Lo ), Max( Hi ), Inc( _yscl[1] ), 
                       Minor Ticks( 1 ),
			Label Row( {Show Major Grid( 1 ), Show Minor Grid( 1 )} ),
                      	Format("Fixed Dec",12,_yscl[2])
                       });

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;JMP does a good job auto scaling, the reason the scaling is too wide for your graphbuilder is that it is scaling to be able to display the points not just the smoothed curves. One option is to get the spline curve values and just plot those.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you choose to &lt;U&gt;&lt;EM&gt;&lt;STRONG&gt;not&lt;/STRONG&gt;&lt;/EM&gt;&lt;/U&gt; do that you willneed to find the max and min of the curves and you need to decide if you want all graphs for Y_i to have the same scale, or if each Y_i and Test needs to have the same scale or each graph its own scale.&amp;nbsp; The JMP Spline Smooth() function returns the spline values, and you can find the max and min for each possible curve then get the max and min over all. That will provide the Lo and Hi and, I typically use 10 for the number of increments.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then use the gd_inc() function and modify.&amp;nbsp; If you know the low and high values, then create a table or constats for each Y.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Custom scaling can get messy with multiple curves and custom curves like splines.&amp;nbsp; If I have time, I'll attach an updated script for your dummy data.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;BTW, I am not sure how realistic your dummy data might be. Comparing multiple graphs in PowerPoint can be confusing.&amp;nbsp; GraphBuilder is good for comparing graphs. Instead of numerous graphs, possibly some comparison (not necessarily the one below) might be useful. Below is Y_3 vs. channels, for Test, and different values of X.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/10742i12E6BDD558918F08/image-size/medium?v=v2&amp;amp;px=400" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 16 May 2018 02:02:32 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/JSL-Generate-x-y-Plot-that-loops-through-columns-with-different/m-p/57062#M32010</guid>
      <dc:creator>gzmorgan0</dc:creator>
      <dc:date>2018-05-16T02:02:32Z</dc:date>
    </item>
    <item>
      <title>Re: JSL - Generate -x-y Plot that loops through columns with different variables</title>
      <link>https://community.jmp.com/t5/Discussions/JSL-Generate-x-y-Plot-that-loops-through-columns-with-different/m-p/57653#M32136</link>
      <description>&lt;P&gt;Thank you for the advice / code.. I am going to give it a try this week.. I have a soft deadline to demonstrate the data pull, table format and graph output.. Your help has greatly increased&amp;nbsp;the&amp;nbsp;likelihood of me&amp;nbsp;succeeding&lt;/P&gt;</description>
      <pubDate>Sun, 20 May 2018 12:08:17 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/JSL-Generate-x-y-Plot-that-loops-through-columns-with-different/m-p/57653#M32136</guid>
      <dc:creator>Yngeinstn</dc:creator>
      <dc:date>2018-05-20T12:08:17Z</dc:date>
    </item>
    <item>
      <title>Re: JSL - Generate -x-y Plot that loops through columns with different variables</title>
      <link>https://community.jmp.com/t5/Discussions/JSL-Generate-x-y-Plot-that-loops-through-columns-with-different/m-p/58523#M32371</link>
      <description>&lt;P&gt;Thank you for the script... I have a question about the first one you put up. Do you just put that in the main script or a separate new one?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I loved the graph you&amp;nbsp;plotted and offered up to my boss so i am waiting to hear from him about implementing it in the many reports he is requesting.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I also took the script you gave me with how to plot the -x by -y and substituted Graph Builder with Distribution and it worked almost perfectly. I do have a question about tree structure. I was able to reverse into the this line and located the Text Box(1) however with the distribution modification i am getting an error when running this script. I can't seem to locate the parts that need to be removed.. I am attaching the data table and modified script that includes the distribution function.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;STRONG&gt;(&lt;/STRONG&gt;gb &lt;/FONT&gt;&lt;FONT color="#000080" face="Consolas" size="2"&gt;&amp;lt;&amp;lt;&lt;/FONT&gt; &lt;STRONG&gt;&lt;FONT color="#000080" face="Consolas" size="2"&gt;top Report&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;)[&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT color="#0000dd" face="Consolas" size="2"&gt;TextBox&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT face="Consolas" size="2"&gt;(&lt;/FONT&gt;&lt;FONT color="#008080" face="Consolas" size="2"&gt;1&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;)]&lt;/FONT&gt;&lt;/STRONG&gt; &lt;FONT color="#000080" face="Consolas" size="2"&gt;&amp;lt;&amp;lt;&lt;/FONT&gt; &lt;STRONG&gt;&lt;FONT color="#000080" face="Consolas" size="2"&gt;delete&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT color="#000080" face="Consolas" size="2"&gt;;&lt;/FONT&gt; &lt;FONT color="#008000" face="Consolas" size="2"&gt;//delete the where statement&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 29 May 2018 13:21:26 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/JSL-Generate-x-y-Plot-that-loops-through-columns-with-different/m-p/58523#M32371</guid>
      <dc:creator>Yngeinstn</dc:creator>
      <dc:date>2018-05-29T13:21:26Z</dc:date>
    </item>
    <item>
      <title>Re: JSL - Generate -x-y Plot that loops through columns with different variables</title>
      <link>https://community.jmp.com/t5/Discussions/JSL-Generate-x-y-Plot-that-loops-through-columns-with-different/m-p/58608#M32404</link>
      <description>&lt;P&gt;Yngeinstn,&lt;/P&gt;&lt;P&gt;I have attached 2 scripts:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;ModifiedDistribution[test_2].jsl, and&lt;/LI&gt;&lt;LI&gt;OtherDistributionPlots.jsl&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;The take away is that not every platform report has the same structure or same messages, and what is available depends upon your version of JMP.&amp;nbsp; Show Tree Structure and Get XML are messages that can help you discover the report structure and the Scripting Index lists the messages for the display boxes.&amp;nbsp; I like to use XPath() to get a "handle" on hard to find objects or multiple segments, like BoxPlotSeg and HistSeg.&amp;nbsp; However, there are other methods to reference an object. To get a handle to the Y variable scalebox for a histogram, use&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; _xx = gb&amp;lt;&amp;lt; Xpath("//ScaleBox[@charID='1']");&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; _xx &amp;lt;&amp;lt; message;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;or&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; Report( gb )[ScaleBox(1)]&amp;nbsp; &amp;lt;&amp;lt; message;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The other script shows alternative plots that are good to compare distributions.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 30 May 2018 00:30:32 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/JSL-Generate-x-y-Plot-that-loops-through-columns-with-different/m-p/58608#M32404</guid>
      <dc:creator>gzmorgan0</dc:creator>
      <dc:date>2018-05-30T00:30:32Z</dc:date>
    </item>
    <item>
      <title>Re: JSL - Generate -x-y Plot that loops through columns with different variables</title>
      <link>https://community.jmp.com/t5/Discussions/JSL-Generate-x-y-Plot-that-loops-through-columns-with-different/m-p/58706#M32424</link>
      <description>&lt;P&gt;You are amazing with this JSL stuff.. I don't even know if could find any of that. I am testing the distribution one right now.. I can't thank you enough for the other graphs either.. I am sure i am going to be asked about how to do these as well. FYI i am using JMP 12.1.0 however our company is making the move to JMP 14 which i can't wait because of the Semiconductor Toolkit Add-in i found on this site..&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;I am getting an error when it comes to the gd_inc statement.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Name Unresolved: gd_inc in access or evaluation of 'gd_inc' , gd_inc( Lo, Hi, 10 ) /*###*/&lt;BR /&gt;&lt;BR /&gt;In the following script, error marked by /*###*/&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt = Current Data Table();
jjrn3 = New Window( "Distribution [test_2]", &amp;lt;&amp;lt;Journal );
dtsum = dt &amp;lt;&amp;lt; Summary( Group( :Channel, :Test State ), invisible );
Current Data Table( dt );
Lo = Floor( Col Minimum( :test_2 * If( Excluded(), Empty(), 1 ) ) );
Hi = Ceiling( Col Maximum( :test_2 * If( Excluded(), Empty(), 1 ) ) );
_yscl = gd_inc( Lo, Hi, 10 ) /*###*/;
For( i = 1, i &amp;lt;= N Row( dtsum ), i++,
    chnl = dtsum:Channel[i];
    tst = dtsum:Test State[i];
    gb = dt &amp;lt;&amp;lt; Distribution(
        where( dt:Channel == chnl &amp;amp; dt:Test State == tst ),
        Stack( 1 ),
        Continuous Distribution(
            Column( :test_2 ),
            Horizontal Layout( 1 ),
            Vertical( 0 ),
            Fit Distribution( Normal )
        )
    );&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 30 May 2018 19:10:38 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/JSL-Generate-x-y-Plot-that-loops-through-columns-with-different/m-p/58706#M32424</guid>
      <dc:creator>Yngeinstn</dc:creator>
      <dc:date>2018-05-30T19:10:38Z</dc:date>
    </item>
    <item>
      <title>Re: JSL - Generate -x-y Plot that loops through columns with different variables</title>
      <link>https://community.jmp.com/t5/Discussions/JSL-Generate-x-y-Plot-that-loops-through-columns-with-different/m-p/58724#M32431</link>
      <description>&lt;P&gt;gd_inc() is a user function that was sent previously on this blog path.&amp;nbsp; I attached it again.&amp;nbsp; Either add the code to your script prior to using it, or save the script&amp;nbsp; ( I call mine gd_inc.jsl ) to a common directory of useful functions, your own personal library, and for any script when you want to compute good axis increments, add the statement.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;Include( "mydirectory/gd_inc.jsl" );&lt;/PRE&gt;&lt;P&gt;For people who support reports for their company, they often create one big script, named something like usr_functions.jsl.&amp;nbsp; Then instead of numerous Include() statements, they use just one Include("mydirectory/usr_functions.jsl")&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is the function again. Look at the previous posting, there are examples of how to use this function.&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;gd_inc = Function({xlo, xhi, ntic}, {sp,tt, yrnd, ginc, ndec,lc, ll},
 sp = (xhi - xlo)/ntic;
 tt = log10(sp);
 yrnd = If(
	tt &amp;gt; 0, 1 - Floor( tt ),
	Abs( Floor( tt ) - 1 )
 );  
 ginc =round(sp,yrnd);
 ndec = length(word(2,char(ginc),"."));
 lc    = length(word(1,char(xhi),"."));
 if(ndec&amp;gt;0, lc=lc+ndec+1);
 if(xlo &amp;lt;0, lc++); //add 1 character for the negative sign
 ll=[1,1,1];
 ll[1] = ginc; //increment
 ll[2] = ndec; //# decimals
 ll[3] = lc;   //character length
 ll
);  // end gd_inc
/* test cases
show(gd_inc(1,11,10), gd_inc(.001, .005, 10), gd_inc(10000,20200, 10) )	
*/&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;By the way, I have been using and teaching JMP and JSL for many years. So my knowledge is not so amazing, just trying to share.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 30 May 2018 20:22:35 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/JSL-Generate-x-y-Plot-that-loops-through-columns-with-different/m-p/58724#M32431</guid>
      <dc:creator>gzmorgan0</dc:creator>
      <dc:date>2018-05-30T20:22:35Z</dc:date>
    </item>
    <item>
      <title>Re: JSL - Generate -x-y Plot that loops through columns with different variables</title>
      <link>https://community.jmp.com/t5/Discussions/JSL-Generate-x-y-Plot-that-loops-through-columns-with-different/m-p/58875#M32469</link>
      <description>&lt;P&gt;&lt;BR /&gt;Yes, well your skills are stellar and I would take a JSL class from you any day..&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Quick question though.. I ran it with the gd_inc.jsl and this is what i get.. I can see that the scale is almost perfect but my 15 data sets have these 2 difference. Not to say that this isn't going to happen in the future.. When you say modify your script with that second one you quoted i get confused.. I am trying to revere into and figure out where the 10.5 and 42.0 is derived from and think it has something to do with the log() function but not sure..&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="10.5 - 42.0.png" style="width: 999px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/10933i846339C56070CF4D/image-size/large?v=v2&amp;amp;px=999" role="button" title="10.5 - 42.0.png" alt="10.5 - 42.0.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 31 May 2018 15:52:33 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/JSL-Generate-x-y-Plot-that-loops-through-columns-with-different/m-p/58875#M32469</guid>
      <dc:creator>Yngeinstn</dc:creator>
      <dc:date>2018-05-31T15:52:33Z</dc:date>
    </item>
    <item>
      <title>Re: JSL - Generate -x-y Plot that loops through columns with different variables</title>
      <link>https://community.jmp.com/t5/Discussions/JSL-Generate-x-y-Plot-that-loops-through-columns-with-different/m-p/58958#M32474</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Yngeinstn,&lt;/P&gt;&lt;P&gt;I was under the impression you wanted the same scale for all distributions.&amp;nbsp; JMP Distribution typically does an excellent job to scale the histograms to the data at hand. However, when you are plotting subsets of the data, the scale of the individual histograms will be different. If you know the range of the data, then assign the values for Lo, Hi and inc. If you want the script to handle data whose range could change with a process change or ?? then computing a Lo and Hi and inc should be a task of the script.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For the previous script, I just used the min and the max of the &lt;U&gt;&lt;EM&gt;&lt;STRONG&gt;unexcluded&lt;/STRONG&gt;&lt;/EM&gt;&lt;/U&gt; data.&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;Lo&amp;nbsp; = Floor(&amp;nbsp; &amp;nbsp;Col Minimum ( :test_2 * If( Excluded(), Empty(), 1 ) )&amp;nbsp; );&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;Hi&amp;nbsp; = Ceiling( Col Maximum( :test_2 * If( Excluded(), Empty(), 1 ) )&amp;nbsp; );&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Below, I made another modification to give some space on the ends: compute the std dev of the unexcluded data and add a half std deviation.&amp;nbsp; One of the reasons, I proposed the alternative graphs that compare the distributions is that JMP will scale to all the included data and you can see the effects of channel and test state.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt = Current Data Table();
jjrn3 = New Window( "Distribution [test_2]", &amp;lt;&amp;lt;Journal );
dtsum = dt &amp;lt;&amp;lt; Summary( Group( :Channel, :Test State ), invisible );
Current Data Table( dt );
std = Col Std Dev(:test_2 * If( Excluded(), Empty(), 1 ));
Lo  = Floor( Col Minimum( :test_2 * If( Excluded(), Empty(), 1 ) )
     - 0.5 * std );
Hi  = Ceiling( Col Maximum( :test_2 * If( Excluded(), Empty(), 1 ) ) 
	 + .5 *std );

_yscl = gd_inc( Lo, Hi, 10 );
current data table(dt);
For( i = 1, i &amp;lt;= N Row( dtsum ), i++,
    chnl = dtsum:Channel[i];
    tst = dtsum:Test State[i];
    gb = dt &amp;lt;&amp;lt; Distribution(
        where( dt:Channel == chnl &amp;amp; dt:Test State == tst ),
        Stack( 1 ),
        Continuous Distribution(
            Column( :test_2 ),
            Horizontal Layout( 1 ),
            Vertical( 0 ),
            Fit Distribution( Normal )
        )
    );
  	(gb &amp;lt;&amp;lt; top Report)[TextBox(1)] &amp;lt;&amp;lt; delete;  //delete the where statement
	report(gb)[OutlineBox(1)] &amp;lt;&amp;lt; set title( EvalInsert("Results for IRL @ Channel=^chnl^ and Test State=^tst^"));
	_xx = gb&amp;lt;&amp;lt; Xpath("//ScaleBox[@charID='1']");
	_xx &amp;lt;&amp;lt; Axis Setings({Min( Lo ), Max( Hi ), Inc( _yscl[1] ), Minor Ticks( 1 ),
				Label Row( {Show Major Grid( 1 ), Show Minor Grid( 1 )} )});

/*
If( i == 1,
		gb &amp;lt;&amp;lt; Save Presentation( "$TEMP/jmp_example2.pptx" ),
		gb &amp;lt;&amp;lt; Save Presentation( "$TEMP/jmp_example2.pptx", Append )
	);
*/		
	gb&amp;lt;&amp;lt; Journal Window();
	wait(0);

	gb &amp;lt;&amp;lt; close window();

 );&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;There are multiple methods to&amp;nbsp; automatically scale, and automatically find and eliminate outliers. I am reluctant to strongly recommend because methods accepted by one industry might not be acceptable to another; and normal data methods typically do not apply for lumpy data (clustered data or spatial data) or zero inflated defect data or reliability data.&amp;nbsp; My intent is to point out alternatives that might or might not work for you.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 31 May 2018 19:19:22 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/JSL-Generate-x-y-Plot-that-loops-through-columns-with-different/m-p/58958#M32474</guid>
      <dc:creator>gzmorgan0</dc:creator>
      <dc:date>2018-05-31T19:19:22Z</dc:date>
    </item>
    <item>
      <title>Re: JSL - Generate -x-y Plot that loops through columns with different variables</title>
      <link>https://community.jmp.com/t5/Discussions/JSL-Generate-x-y-Plot-that-loops-through-columns-with-different/m-p/58960#M32476</link>
      <description>&lt;P&gt;First, My name is David. Nice to meet you..&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;That is correct, i do want a uniform scale and would adjust the -x axis based on the worst case scenario..&amp;nbsp; I would love to hear your recommendation to remove outliers.. Those are killing my data set.. The parts that we are electrically testing either PASS, BARELY PASS or catistrophically fail. Those catistrophically&amp;nbsp;failed parts need to be removed..&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am going to plug your revised script in my main script to test. Again, I am very appreciative. I also want to thank you for the Include().. I had a huge bulk of my script that was nothing but SQL data pull strings. Our database has 8 different tables i have to pull data from depending on the type of test..&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you again...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is an example FYI: I have 9 of these that took up a ton of lines of code that was solved by one Include()&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;testdata_HAY_DC_QQ_Data = Expr(
	"
	SELECT 
		t1.testdate, 
		t1.wafer_id, 
		t1.wafer_number, 
		t1.lot_number, 
		t2.rownum, 
		t2.colnum, 
		t2.die_id, 
		t2.part_name, 
		t2.testname,  
		t2.channel,  
		t7.header_id,
		t7.idx,
		t7.run_id,
		t7.set_id,
		t7.Supply_Name,
		t7.Voltage, 
		t7.Current 
FROM tst_master  t1
	LEFT OUTER JOIN tst_dataset_header t2 
		ON  ( t2.run_id = t1.run_id )
	LEFT OUTER JOIN tst_dc_data t7 
		ON  ( t7.header_id = t2.header_id )
WHERE (t1.wafer_number LIKE '"||SelectedLot||"')
		AND (t2.testname LIKE '"||SelectedTest||"')  
 	"
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 31 May 2018 19:55:47 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/JSL-Generate-x-y-Plot-that-loops-through-columns-with-different/m-p/58960#M32476</guid>
      <dc:creator>Yngeinstn</dc:creator>
      <dc:date>2018-05-31T19:55:47Z</dc:date>
    </item>
    <item>
      <title>Re: JSL - Generate -x-y Plot that loops through columns with different variables</title>
      <link>https://community.jmp.com/t5/Discussions/JSL-Generate-x-y-Plot-that-loops-through-columns-with-different/m-p/59957#M32780</link>
      <description>&lt;P&gt;Good morning &lt;A href="https://community.jmp.com/t5/user/viewprofilepage/user-id/70" target="_blank"&gt;&lt;FONT color="#0066cc"&gt;gzmorgan0&lt;/FONT&gt;&lt;/A&gt;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Previously you mentioned "There are multiple methods to&amp;nbsp; automatically scale, and automatically find and eliminate outliers"&lt;/P&gt;&lt;P&gt;I am wondering if you wouldn't mind sharing that with me?&amp;nbsp; I have been doing a lot of coding and i am pretty close to the end with some minor tweaks..&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Yng&lt;/P&gt;</description>
      <pubDate>Mon, 11 Jun 2018 15:07:07 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/JSL-Generate-x-y-Plot-that-loops-through-columns-with-different/m-p/59957#M32780</guid>
      <dc:creator>Yngeinstn</dc:creator>
      <dc:date>2018-06-11T15:07:07Z</dc:date>
    </item>
    <item>
      <title>Re: JSL - Generate -x-y Plot that loops through columns with different variables</title>
      <link>https://community.jmp.com/t5/Discussions/JSL-Generate-x-y-Plot-that-loops-through-columns-with-different/m-p/60215#M32841</link>
      <description>&lt;P&gt;Yng,&lt;/P&gt;&lt;P&gt;You did not specify what you are looking for. I typically use JMP default scaling, and use something like the following if I want the same axis scaling for all subgroups. This script names the variables of interest ylist, but this can be applied to any numeric continuous varaible (column), even Datetime.&amp;nbsp; The trick is to let JMP scale for all, then copy the axis setting to the table column, then any graph using that column will deploy that scale.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default to Here(1);

ylist = {"Sepal length", "Sepal width", "Petal length", "Petal width"};
dt = Open("$sample_data/iris.jmp");

//get common axis
for(i=1, i&amp;lt;=nitems(ylist), i++,
	ovl = dt &amp;lt;&amp;lt; Overlay Plot(Invisible,
		Y( Column(dt,ylist[i]) ),  //yaxis
		Overlay( 0 )
	);
	report(ovl)[AxisBox(1)] &amp;lt;&amp;lt; Save to Column Property;
	ovl &amp;lt;&amp;lt; close window;
);

//now the same axis will be applied to all sub groups

ovl1 = dt &amp;lt;&amp;lt; OverlayPlot( Y( :Petal length ),  Overlay(0), By(:Species) );
//all  3 subgroups have the same Y - axis

//ovl  = dt &amp;lt;&amp;lt; OverlayPlot( Y( eval(ylist) ),  Overlay(0), By(:Species) );

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;I do custom scaling for axes only if:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;there is a known range like control or spec limits,&lt;/LI&gt;&lt;LI&gt;need to scale to something like +/- k sigma,&lt;/LI&gt;&lt;LI&gt;need to control the grid lines, for example, a grid line at each 0.5 sigma,&lt;/LI&gt;&lt;LI&gt;data whose nominal value is large but variation is very small, for example, means value is 1750222 stdev is 0.000023, then I plot a transform Y- mean and figure out a good scale and use the alogorithm, gdinc.jsl&lt;/LI&gt;&lt;LI&gt;perform an analyses and determine whether the data is highly skewed or lumpy (clustered).&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regarding outlier detection, I have not found one method that applies to all data. For univariate data with a strong right skewed data (ex. zero inflated Poisson), I like to use a modified Lenth method:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;uscreen = median + k * (upper p percentile -median) / Abs( Normal Quantile(p) )&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/LI&gt;&lt;LI&gt;lscreen&amp;nbsp; =&amp;nbsp; median - k * (median -&amp;nbsp; lower(p) percentile/ Abs(Normal Quantile(p) )&lt;/LI&gt;&lt;LI&gt;where p could be 0.1 ( for 10 and 90 percentiles) or p could be 0.25, then this would be a modified pseudo sigma, and typically k is in [4,6] for summarized data. There are times for raw data, I use a much larger k.&lt;/LI&gt;&lt;LI&gt;Also, I typically screen for all data of one variable, but if by groups are quite different, I I screen by groups if there is enough data fopr each group.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Below is an example for computing the screening values by group. If vargroup has 10 groups, the uscreen and lscreen are vectors of size 10 and vg is a list of 10 vargroup names.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;//Find global outliers by vargroup for raw measurement data

//Use an assymetric 6 pseudo-sigma, computed from the 10 &amp;amp; 90th percentiles.

summarize(  vg=by(vargroup),
                     c=count,
                     q10=quantile(varvalue,.10),
                     q50=quantile(varvalue,.50),
                     q90=quantile(varvalue,.90)
                  );

uscr  = q50 + 6*(q90-q50)/Normal quantile(0.9);
lscr  = q50 - 6*(q50-q10)/Normal quantile(0.9);&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Please note:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;There is no one correct method, and you should always review the methods with those that are reviewing the data. And outliers shoudl never be ignored, because they are leads to possibly important information.&lt;/LI&gt;&lt;LI&gt;I often use 2&amp;nbsp; levels of screening, especially when I needed to compute control limits, screening for the plotted points and screening for limits ... control limits shoudl not accommodate 5 and 6 sigma data.&lt;/LI&gt;&lt;LI&gt;If you are creating weekly analyses, note you can get different screening values each week. You might want to do a mega analysis once an use the same limits each week.&amp;nbsp;&lt;/LI&gt;&lt;LI&gt;For multivariate data, you should use a mutivariate screen. See graphic. Two obvious outliers are in control based upon univariate limits. So if data is strongly correlated a correlated screen shoudl be used. JMP multivariate has a nice multivariate screen.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/11122i6D7EDB816CE7DA4A/image-size/medium?v=v2&amp;amp;px=400" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 13 Jun 2018 00:10:34 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/JSL-Generate-x-y-Plot-that-loops-through-columns-with-different/m-p/60215#M32841</guid>
      <dc:creator>gzmorgan0</dc:creator>
      <dc:date>2018-06-13T00:10:34Z</dc:date>
    </item>
  </channel>
</rss>

