<?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 How to use JSL to dynamically pass Bivariate Plots to Journal (having issue to Journal) in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/How-to-use-JSL-to-dynamically-pass-Bivariate-Plots-to-Journal/m-p/272323#M52962</link>
    <description>&lt;P&gt;Hi JMP Community,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have a script that populates two sets of columns to two different lists.&amp;nbsp;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;set1_list&amp;nbsp; &amp;amp; set2_list&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;Then I iterate through the list of column names from both sets and when these match (partially via regex) I do a Y by X plot. -- this is fine.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;The individual bivariate plots are being populated but not appended to journal. :(&lt;/img&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;- I can do it manually but there are very many plots (order of 100s to 1000s)&lt;/P&gt;
&lt;P&gt;- Tried to mimic parts of other examples where there are two journals (temp = xx, and main "sample journal" )&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;LI-MESSAGE title="JSL - Adding a Table to a Journal" uid="29255" url="https://community.jmp.com/t5/Discussions/JSL-Adding-a-Table-to-a-Journal/m-p/29255#U29255" discussion_style_icon_css="lia-mention-container-editor-message lia-img-icon-forum-thread lia-fa-icon lia-fa-forum lia-fa-thread lia-fa"&gt;&lt;/LI-MESSAGE&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;- Tried looking at my older scripts&amp;nbsp; where this worked (pushed to the journal). Yet, I'm not clear what I'm missing.&amp;nbsp; In such cases had this portion of code look like below where newplot is similar to current example&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Current Journal( "Y_vs_X" );
Report( newplot ) &amp;lt;&amp;lt; Journal( "Y_vs_X" );
		&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm including a good portion of the script below/attached. Though not params or data table included here. I think a pro will quickly spot the mistake, so I can avoid repeating this and have a better understanding.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;//Match parameters that are common between set 1 and set 2 to do bivariate plot and push to journal
For( v = 1, v &amp;lt;= Count_set1, v++,
	Titlex = Char( set1_list[v] );
	If( Pat Match( Titlex, Regex( Titlex, "([\w.+])(.+)(\:)(.+)(\:)(.+)", "\1\2\3\4" ) ),
		matchone = Regex( Titlex, "([\w.+])(.+)(\:)(.+)(\:)(.+)", "\1\2\3\4" ), 
					
	);
	
	For( w = 1, w &amp;lt;= Count_set2, w++,
		Titley = Char( set2_list[w] );
		If( Pat Match( Titley, Regex( Titley, "([\w.+])(.+)(\:)(.+)(\:)(.+)", "\1\2\3\4" ) ),
			matchtwo = Regex( Titley, "([\w.+])(.+)(\:)(.+)(\:)(.+)", "\1\2\3\4" ), 

		);
		
		
			
		If(
			matchone == matchtwo,
				newplot = mydataTable &amp;lt;&amp;lt; Bivariate(
					X( :As name( Titlex ) ),
					Y( :As name( Titley ) ),
					SendToReport(
						Dispatch(
							{},
							"Bivar Plot",
							FrameBox,
							{Add Graphics Script(
								2,
								Description( "" ),
								Pen Color( "blue" );
								Y Function( x, x );
							), Grid Line Order( 1 ), Reference Line Order( 3 ), DispatchSeg(
								TopSeg( 1 ),
								{Set Script(
									Pen Color( "blue" );
									Y Function( x, x );
								)}
							)}
						)
					),
					rep_plot = newplot &amp;lt;&amp;lt; report;
				
					invisible, 

				), 
					 
			Wait( 0.01 ),
			tmpjrnl = New Window( "temp_journal", &amp;lt;&amp;lt;journal );
			rep_plot &amp;lt;&amp;lt; journal;
			hlb &amp;lt;&amp;lt; append (tmpjrnl);
			tmpjrnl &amp;lt;&amp;lt; close window;
		
			
		, 

		);, 

	);
);

Print( "This is the end, the script has finished running..." );			&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 09 Jun 2023 23:28:55 GMT</pubDate>
    <dc:creator>mpanggabean</dc:creator>
    <dc:date>2023-06-09T23:28:55Z</dc:date>
    <item>
      <title>How to use JSL to dynamically pass Bivariate Plots to Journal (having issue to Journal)</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-use-JSL-to-dynamically-pass-Bivariate-Plots-to-Journal/m-p/272323#M52962</link>
      <description>&lt;P&gt;Hi JMP Community,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have a script that populates two sets of columns to two different lists.&amp;nbsp;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;set1_list&amp;nbsp; &amp;amp; set2_list&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;Then I iterate through the list of column names from both sets and when these match (partially via regex) I do a Y by X plot. -- this is fine.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;The individual bivariate plots are being populated but not appended to journal. :(&lt;/img&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;- I can do it manually but there are very many plots (order of 100s to 1000s)&lt;/P&gt;
&lt;P&gt;- Tried to mimic parts of other examples where there are two journals (temp = xx, and main "sample journal" )&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;LI-MESSAGE title="JSL - Adding a Table to a Journal" uid="29255" url="https://community.jmp.com/t5/Discussions/JSL-Adding-a-Table-to-a-Journal/m-p/29255#U29255" discussion_style_icon_css="lia-mention-container-editor-message lia-img-icon-forum-thread lia-fa-icon lia-fa-forum lia-fa-thread lia-fa"&gt;&lt;/LI-MESSAGE&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;- Tried looking at my older scripts&amp;nbsp; where this worked (pushed to the journal). Yet, I'm not clear what I'm missing.&amp;nbsp; In such cases had this portion of code look like below where newplot is similar to current example&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Current Journal( "Y_vs_X" );
Report( newplot ) &amp;lt;&amp;lt; Journal( "Y_vs_X" );
		&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm including a good portion of the script below/attached. Though not params or data table included here. I think a pro will quickly spot the mistake, so I can avoid repeating this and have a better understanding.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;//Match parameters that are common between set 1 and set 2 to do bivariate plot and push to journal
For( v = 1, v &amp;lt;= Count_set1, v++,
	Titlex = Char( set1_list[v] );
	If( Pat Match( Titlex, Regex( Titlex, "([\w.+])(.+)(\:)(.+)(\:)(.+)", "\1\2\3\4" ) ),
		matchone = Regex( Titlex, "([\w.+])(.+)(\:)(.+)(\:)(.+)", "\1\2\3\4" ), 
					
	);
	
	For( w = 1, w &amp;lt;= Count_set2, w++,
		Titley = Char( set2_list[w] );
		If( Pat Match( Titley, Regex( Titley, "([\w.+])(.+)(\:)(.+)(\:)(.+)", "\1\2\3\4" ) ),
			matchtwo = Regex( Titley, "([\w.+])(.+)(\:)(.+)(\:)(.+)", "\1\2\3\4" ), 

		);
		
		
			
		If(
			matchone == matchtwo,
				newplot = mydataTable &amp;lt;&amp;lt; Bivariate(
					X( :As name( Titlex ) ),
					Y( :As name( Titley ) ),
					SendToReport(
						Dispatch(
							{},
							"Bivar Plot",
							FrameBox,
							{Add Graphics Script(
								2,
								Description( "" ),
								Pen Color( "blue" );
								Y Function( x, x );
							), Grid Line Order( 1 ), Reference Line Order( 3 ), DispatchSeg(
								TopSeg( 1 ),
								{Set Script(
									Pen Color( "blue" );
									Y Function( x, x );
								)}
							)}
						)
					),
					rep_plot = newplot &amp;lt;&amp;lt; report;
				
					invisible, 

				), 
					 
			Wait( 0.01 ),
			tmpjrnl = New Window( "temp_journal", &amp;lt;&amp;lt;journal );
			rep_plot &amp;lt;&amp;lt; journal;
			hlb &amp;lt;&amp;lt; append (tmpjrnl);
			tmpjrnl &amp;lt;&amp;lt; close window;
		
			
		, 

		);, 

	);
);

Print( "This is the end, the script has finished running..." );			&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 09 Jun 2023 23:28:55 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-use-JSL-to-dynamically-pass-Bivariate-Plots-to-Journal/m-p/272323#M52962</guid>
      <dc:creator>mpanggabean</dc:creator>
      <dc:date>2023-06-09T23:28:55Z</dc:date>
    </item>
    <item>
      <title>Re: How to use JSL to dynamically pass Bivariate Plots to Journal (having issue to Journal)</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-use-JSL-to-dynamically-pass-Bivariate-Plots-to-Journal/m-p/272328#M52963</link>
      <description>&lt;P&gt;Actually I found my mistake was using a "," after the Wait statement.&lt;BR /&gt;Replacing it with a ";" and below resolved the problem&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Wait( 0.01 );
newjrnl &amp;lt;&amp;lt; append(Report( current_plot_new ));&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 12 Jun 2020 11:11:08 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-use-JSL-to-dynamically-pass-Bivariate-Plots-to-Journal/m-p/272328#M52963</guid>
      <dc:creator>mpanggabean</dc:creator>
      <dc:date>2020-06-12T11:11:08Z</dc:date>
    </item>
  </channel>
</rss>

