<?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: Dynamically adding distribution plots to a table in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Dynamically-adding-distribution-plots-to-a-table/m-p/717798#M89948</link>
    <description>&lt;P&gt;Additionally, if it is just simple Histograms you are looking for, starting with JMP 15, a Histogram can be displayed above each column just by selecting the Histogram Icon in the data table&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="txnelson_0-1705595865814.png" style="width: 785px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/60409i4D260C141050C2F4/image-dimensions/785x261?v=v2" width="785" height="261" role="button" title="txnelson_0-1705595865814.png" alt="txnelson_0-1705595865814.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 18 Jan 2024 16:38:05 GMT</pubDate>
    <dc:creator>txnelson</dc:creator>
    <dc:date>2024-01-18T16:38:05Z</dc:date>
    <item>
      <title>Dynamically adding distribution plots to a table</title>
      <link>https://community.jmp.com/t5/Discussions/Dynamically-adding-distribution-plots-to-a-table/m-p/717649#M89933</link>
      <description>&lt;P&gt;I have a table with roughly ~180 columns of data.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'd like to dynamically add a distribution plot (to the table) for each column via a for loop in JSL (with a local data filter specific to each column).&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is this possible? What happens in my attempts is all the attached plots are the last value of the for loop. Probably something simple I'm missing.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thanks!&lt;/P&gt;</description>
      <pubDate>Wed, 17 Jan 2024 21:13:26 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Dynamically-adding-distribution-plots-to-a-table/m-p/717649#M89933</guid>
      <dc:creator>matador951</dc:creator>
      <dc:date>2024-01-17T21:13:26Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamically adding distribution plots to a table</title>
      <link>https://community.jmp.com/t5/Discussions/Dynamically-adding-distribution-plots-to-a-table/m-p/717688#M89934</link>
      <description>&lt;P&gt;It's possible.&amp;nbsp; If you can attach a sanitized version of your script, It'll be easier and quicker to help.&lt;/P&gt;</description>
      <pubDate>Wed, 17 Jan 2024 22:53:59 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Dynamically-adding-distribution-plots-to-a-table/m-p/717688#M89934</guid>
      <dc:creator>mmarchandTSI</dc:creator>
      <dc:date>2024-01-17T22:53:59Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamically adding distribution plots to a table</title>
      <link>https://community.jmp.com/t5/Discussions/Dynamically-adding-distribution-plots-to-a-table/m-p/717690#M89935</link>
      <description>&lt;P&gt;I am not sure what exactly you are looking for.&amp;nbsp; Here is a simple script that creates all of the distributions with the local data filter.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );

dt = 
// Open Data Table: Blood Pressure.jmp
// → Data Table( "Blood Pressure" )
Open( "$SAMPLE_DATA/Blood Pressure.jmp" );

ColNames = dt &amp;lt;&amp;lt; get column names( string, numeric );

nw = New Window( "Distributions",
	H List Box(

		For Each( {Col}, ColNames,
			Eval(
				Eval Expr(
					Distribution(
						Continuous Distribution( Column( Eval( col ) ) ),
						Local Data Filter( Add Filter( columns( Eval( col )) ) )
					)
				)
			)
		)
	)
);

	
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="txnelson_0-1705532200758.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/60385iAE0D74915AD09134/image-size/medium?v=v2&amp;amp;px=400" role="button" title="txnelson_0-1705532200758.png" alt="txnelson_0-1705532200758.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 17 Jan 2024 22:56:48 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Dynamically-adding-distribution-plots-to-a-table/m-p/717690#M89935</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2024-01-17T22:56:48Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamically adding distribution plots to a table</title>
      <link>https://community.jmp.com/t5/Discussions/Dynamically-adding-distribution-plots-to-a-table/m-p/717703#M89936</link>
      <description>&lt;P&gt;Here's a shortened version:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Clear Log();
Clear Globals();
dt = current data table ();

myTests = {:Name ("Cont_VDD"), :Name ("Cont_OUTP")};



for (i=1, i&amp;lt;= 2, i++,
	
	dt &amp;lt;&amp;lt; Add Properties to Table(
	{New Script(
		"Distribution",
		Distribution(
			Stack( 1 ),
			Continuous Distribution(
				Column( myTests[i] ) ),
				Horizontal Layout( 1 ),
				Vertical( 0 ),
				Outlier Box Plot( 0 ),
				Process Capability( Use Column Property Specs )
			)
		)
	});
);&lt;/CODE&gt;&lt;/PRE&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 17 Jan 2024 23:52:56 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Dynamically-adding-distribution-plots-to-a-table/m-p/717703#M89936</guid>
      <dc:creator>matador951</dc:creator>
      <dc:date>2024-01-17T23:52:56Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamically adding distribution plots to a table</title>
      <link>https://community.jmp.com/t5/Discussions/Dynamically-adding-distribution-plots-to-a-table/m-p/717725#M89939</link>
      <description>&lt;P&gt;Your script does not completely flesh out the required JSL to allow for the table scripts to work.&amp;nbsp; The reference of myTests needs to be parsed into the exact column name in order for the table script to be able to run properly.&amp;nbsp; The JSL below forces the expansion of the code before saving it to the data table.&amp;nbsp; I also added a Local Filter and I also changed the code to make the script name the column name&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );
Clear Log();
Clear Globals();

dt = 
// Open Data Table: Blood Pressure.jmp
// → Data Table( "Blood Pressure" )
Open( "$SAMPLE_DATA/Blood Pressure.jmp" );

myTests = dt &amp;lt;&amp;lt; get column names( string, numeric );



For( i = 1, i &amp;lt;= N Items( myTests ), i++,
	Eval(
		Eval Expr(
			dt &amp;lt;&amp;lt; Add Properties to Table(
				{New Script(
					expr(myTests[i]),
					Distribution(
						Stack( 1 ),
						Continuous Distribution( Column( Expr( myTests[i] ) ) ),
						Horizontal Layout( 1 ),
						Vertical( 0 ),
						Outlier Box Plot( 0 ),
						Process Capability( Use Column Property Specs ),
						Local Data Filter( Add Filter( columns( Expr( myTests[i] )) ) )
					)
				)}
			)
		)
	)
);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 18 Jan 2024 05:08:27 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Dynamically-adding-distribution-plots-to-a-table/m-p/717725#M89939</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2024-01-18T05:08:27Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamically adding distribution plots to a table</title>
      <link>https://community.jmp.com/t5/Discussions/Dynamically-adding-distribution-plots-to-a-table/m-p/717784#M89945</link>
      <description>&lt;P&gt;If you use a global variable in the launch script for Distribution, then it will use the current value stored in the variable. You need to convert it to a literal value for the launch script.&lt;/P&gt;</description>
      <pubDate>Thu, 18 Jan 2024 15:13:16 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Dynamically-adding-distribution-plots-to-a-table/m-p/717784#M89945</guid>
      <dc:creator>Mark_Bailey</dc:creator>
      <dc:date>2024-01-18T15:13:16Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamically adding distribution plots to a table</title>
      <link>https://community.jmp.com/t5/Discussions/Dynamically-adding-distribution-plots-to-a-table/m-p/717796#M89947</link>
      <description>&lt;P&gt;many thanks!!!&amp;nbsp; I've taught myself JSL... and have hit a few roadblocks along the way... the use of Eval is now clear to me,... thanks again!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;--Matt&lt;/P&gt;</description>
      <pubDate>Thu, 18 Jan 2024 16:21:58 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Dynamically-adding-distribution-plots-to-a-table/m-p/717796#M89947</guid>
      <dc:creator>matador951</dc:creator>
      <dc:date>2024-01-18T16:21:58Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamically adding distribution plots to a table</title>
      <link>https://community.jmp.com/t5/Discussions/Dynamically-adding-distribution-plots-to-a-table/m-p/717798#M89948</link>
      <description>&lt;P&gt;Additionally, if it is just simple Histograms you are looking for, starting with JMP 15, a Histogram can be displayed above each column just by selecting the Histogram Icon in the data table&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="txnelson_0-1705595865814.png" style="width: 785px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/60409i4D260C141050C2F4/image-dimensions/785x261?v=v2" width="785" height="261" role="button" title="txnelson_0-1705595865814.png" alt="txnelson_0-1705595865814.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 18 Jan 2024 16:38:05 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Dynamically-adding-distribution-plots-to-a-table/m-p/717798#M89948</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2024-01-18T16:38:05Z</dc:date>
    </item>
  </channel>
</rss>

