<?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: Add Summary Table at Bottom of Plots in Graph Builder &amp;gt; Multi Panel Aggregated Plots? in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Add-Summary-Table-at-Bottom-of-Plots-in-Graph-Builder-gt-Multi/m-p/389711#M63988</link>
    <description>&lt;P&gt;Maybe consider constructing a Table Box with a combination of NumberColBox and StringColBox columns? You can even let users enter data right in those tables with NumberColEditBox.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You have quite a bit of control over formatting, including recreating many tables found in JMP platforms:&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="ih_0-1622580098002.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/33167i0A0E7151DBDA114C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="ih_0-1622580098002.png" alt="ih_0-1622580098002.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 01 Jun 2021 20:44:51 GMT</pubDate>
    <dc:creator>ih</dc:creator>
    <dc:date>2021-06-01T20:44:51Z</dc:date>
    <item>
      <title>Add Summary Table at Bottom of Plots in Graph Builder &gt; Multi Panel Aggregated Plots?</title>
      <link>https://community.jmp.com/t5/Discussions/Add-Summary-Table-at-Bottom-of-Plots-in-Graph-Builder-gt-Multi/m-p/389552#M63973</link>
      <description>&lt;P&gt;Hi JMP Community,&lt;/P&gt;
&lt;P&gt;I have written a simple (and a bit clunky)&amp;nbsp;&lt;SPAN style="font-family: inherit;"&gt;script&amp;nbsp; that assembles multiple GB plots into a window using a LineUpBox into which I append the FrameBox from each plot: it works perfectly running across 182 biomarkers and assembling the plots for which certain conditions are met; (see below). Of note, I cannot easily share the data table associated with this script because the of the confidential nature of the data.&lt;/SPAN&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default to Here (1);

dt = Current Data Table ();

CLX = dt &amp;lt;&amp;lt; get column names (string);

CList = {};

For (i= 1, i &amp;lt;= N Items (CLX), i++, insert into (CList, substitute (CLX[i], "LSMEAN ", "")));

gbe = Expr (dt &amp;lt;&amp;lt; Graph Builder(
				Size( 360, 360 ),
				Fit to Window( "Off" ),
				Level Frame Color( "Medium Dark Gray" ),
				Level Spacing Color( "Medium Dark Gray" ),
				Level Underline( 1 ),
				Page Level Underline( 0 ),
				Spacing Borders( 1 ),
				Variables(
					X( :Name( "DURATION (Week)" ) ),
					Y( _YS_ ),
					Overlay( :ARM ),
					Interval( _STE_ )
				),
				Elements(
					Points( X, Y, Legend( 5 ) ),
					Line( X, Y, Interval( 0 ), Legend( 6 ) )
				),
				SendToReport(
					Dispatch(
						{},
						"DURATION (Week)",
						ScaleBox,
						{Min( -1.5 ), Max( 10 ), Inc( 2 ), Minor Ticks( 1 )}
					),
					
					Dispatch(
						{},
						"Graph Builder",
						FrameBox,
						{Marker Size( 6 ), Add Graphics Script(
							2,
							Description( "Script" ),
							Text Color (Black);
							Pen Color (black);
							Pen size (2);
							Line style ("Dotted");
							H Line (0);
							Text Size (14);
							Text( Center Justified, {4, _BPY_}, _LNAME_);
							Text size (12);
							Text Color( blue );
							Text( Center Justified, {2, _TPY1_}, _P1_);
							Text( Center Justified, {8, _TPY1_}, _P2_);
							Text Color( Green );
							Text( Center Justified, {2, _TPY2_}, _P3_);
							Text( Center Justified, {8, _TPY2_}, _P4_);
							Text Color( purple );
							Text( Center Justified, {2, _TPY3_}, _P5_);
							Text( Center Justified, {8, _TPY3_}, _P6_);
						), Grid Line Order( 5 ), Reference Line Order( 6 )}
					)
				)
			)
		);	


mylbox = Lineup Box (N Col (8));

For (i = 4, i &amp;lt;= 185, i++, //185
	
		YCOL = Column (i);
		STDE = Column (i+182);
		LABEL = CList [i];
		
		P1 = Column (dt, i+364) [2];
		P2 = Column (dt, i+364) [3];
		P3 = Column (dt, i+364) [5];
		P4 = Column (dt, i+364) [6];
		P5 = Column (dt, i+364) [8];
		P6 = Column (dt, i+364) [9];
		
		PPBO1 = Column (dt, i+546) [5];
		PPBO2 = Column (dt, i+546) [6];
		PPBO3 = Column (dt, i+546) [8];
		PPBO4 = Column (dt, i+546) [9];

		PVAL1 = CHAR (format(P1, "PValue"));
		PVAL2 = CHAR (format(P2, "PValue"));
		PVAL3 = CHAR (format(P3, "PValue"));
		PVAL4 = CHAR (format(P4, "PValue"));
		PVAL5 = CHAR (format(P5, "PValue"));
		PVAL6 = CHAR (format(P6, "PValue"));
	
		gbx = substitute (Name Expr (gbe), 	Expr (_YS_), YCOL,
										Expr (_STE_), STDE,
										Expr (_TPY1_), 1,
										Expr (_TPY2_), 1,
										Expr (_TPY3_), 1,
										Expr (_BPY_), -1,
										Expr (_LNAME_), LABEL,
										Expr (_P1_), PVAL1,
										Expr (_P2_), PVAL2,
										Expr (_P3_), PVAL3,
										Expr (_P4_), PVAL4,
										Expr (_P5_), PVAL5,
										Expr (_P6_), PVAL6
										);
	
		gb = Eval (gbx);
		
		gbr = gb &amp;lt;&amp;lt; report;
		
		YAxis = gbr [Axis Box (2)];
		YMax = YAxis &amp;lt;&amp;lt; Get Max;
		YMin = YAxis &amp;lt;&amp;lt; Get Min;
		
		gbr &amp;lt;&amp;lt; close window;
		
		YRange = ABS (YMax - YMin);
		
		While (YRange &amp;lt;= 1.0,
			
			YMax = YMax + (YRange * 0.1);
			YMin = YMin - (YRange * 0.1);
			YRange = abs (YMax - YMin);
		);
		
		YMax = YMax + (YRange * 0.15);
		TOPY1 = YMax - (YRange * 0.1);
		TOPY2 = YMax - (YRange * 0.18);
		TOPY3 = YMax - (YRange * 0.26);
		BOTY = YMin + (YRange *0.1);
		
		gbx = substitute (Name Expr (gbe), 	Expr (_YS_), YCOL,
										Expr (_STE_), STDE,
										Expr (_TPY1_), TOPY1,
										Expr (_TPY2_), TOPY2,
										Expr (_TPY3_), TOPY3,
										Expr (_BPY_), BOTY,
										Expr (_LNAME_), LABEL,
										Expr (_P1_), PVAL1,
										Expr (_P2_), PVAL2,
										Expr (_P3_), PVAL3,
										Expr (_P4_), PVAL4,
										Expr (_P5_), PVAL5,
										Expr (_P6_), PVAL6
										);

	
	
		gb = Eval (gbx);
	
		gbr = gb &amp;lt;&amp;lt; report;
		
		YAxis = gbr [Axis Box (2)];
		
		YAxis &amp;lt;&amp;lt; Max (YMax);
		YAxis &amp;lt;&amp;lt; Min (YMin);
		YAxis &amp;lt;&amp;lt; Inc (round (YRange/9, 1));
		
		gbr &amp;lt;&amp;lt; Set Title (LABEL);
		gbr [TextEditBox (1)] &amp;lt;&amp;lt; Set text (LABEL);
		gbr [LegendBox (1)] &amp;lt;&amp;lt; delete;

		
		fb = gbr [FrameBox (1)];
		
		if(	Minimum (P1, P2, P3, P4, P5, P6)&amp;lt;= 0.01 &amp;amp; 
			Maximum (	abs (YCOL[2]), abs (YCOL[3]), abs (YCOL[5]), abs (YCOL[6]),	abs (YCOL[8]), abs (YCOL[9]))&amp;gt;=0.2 &amp;amp;
			Minimum (PPBO1, PPBO2, PPBO3, PPBO4) &amp;lt;= 0.01, 
			mylbox &amp;lt;&amp;lt; append (fb),.);
		
		gbr &amp;lt;&amp;lt; close window;
	
);

New Window ("OUTPUT", mylbox);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Now, instead of writing the P Values / FDR onto the plots (see PVALs inserted as Text elements &lt;SPAN style="font-family: inherit;"&gt;in the Graphics Script), I would like to append a summary table with these P Values / FDR below each plot. I have looked into the "Add Table" command but I'm not sure that it provides the formatting flexibility I need and therefore, I would like to learn if there is an alternate way to draw tables with more flexibility.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;Any ideas, hints, or recommendations would be greatly appreciated.&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;
&lt;P&gt;TS&lt;/P&gt;</description>
      <pubDate>Sun, 11 Jun 2023 11:14:25 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Add-Summary-Table-at-Bottom-of-Plots-in-Graph-Builder-gt-Multi/m-p/389552#M63973</guid>
      <dc:creator>Thierry_S</dc:creator>
      <dc:date>2023-06-11T11:14:25Z</dc:date>
    </item>
    <item>
      <title>Re: Add Summary Table at Bottom of Plots in Graph Builder &gt; Multi Panel Aggregated Plots?</title>
      <link>https://community.jmp.com/t5/Discussions/Add-Summary-Table-at-Bottom-of-Plots-in-Graph-Builder-gt-Multi/m-p/389711#M63988</link>
      <description>&lt;P&gt;Maybe consider constructing a Table Box with a combination of NumberColBox and StringColBox columns? You can even let users enter data right in those tables with NumberColEditBox.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You have quite a bit of control over formatting, including recreating many tables found in JMP platforms:&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="ih_0-1622580098002.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/33167i0A0E7151DBDA114C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="ih_0-1622580098002.png" alt="ih_0-1622580098002.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 01 Jun 2021 20:44:51 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Add-Summary-Table-at-Bottom-of-Plots-in-Graph-Builder-gt-Multi/m-p/389711#M63988</guid>
      <dc:creator>ih</dc:creator>
      <dc:date>2021-06-01T20:44:51Z</dc:date>
    </item>
  </channel>
</rss>

