<?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: how to fix graph size when add multiple graphs in single window? in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/how-to-fix-graph-size-when-add-multiple-graphs-in-single-window/m-p/105694#M38924</link>
    <description>&lt;P&gt;Akane, try appending it to a list box, not the window directly.&amp;nbsp; That should fix your issue.&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 );
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );

nw = New Window("Dashboard", hlb = hlistbox()); //vlistbox if you want it vertical

for(i=1, i&amp;lt;10, i++,
	g = expr(dt &amp;lt;&amp;lt; Graph Builder(
		Size( 800, 800 ),
		Show Control Panel( 0 ),
		Variables( X( :name ), Y( :age ) ),
		Elements( Points( X, Y, Legend( 5 ) ) )
	));
	hlb &amp;lt;&amp;lt; Append(g);
);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Also, instead of calling Data Table's by name, its a better practice to store the data table reference in a variable and call that.&lt;/P&gt;
&lt;P&gt;So....&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;//Bad Practice
mylist = {"name1", "name2"};
For(j = 1, j &amp;lt;= nitems(mylist) , j++,
prod_list = mylist[j];
Gr1 = expr (Data Table(" Rej Rate "||prod_list) &amp;lt;&amp;lt; Graph Builder(
	Size( 800,800 ),
	
//Good Practice
mylist = {dt1, dt2};
For(j = 1, j &amp;lt;= nitems(mylist) , j++,
dt = mylist[j];
Gr1 = expr (dt &amp;lt;&amp;lt; Graph Builder(
	Size( 800,800 ),&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 11 Jan 2019 15:40:53 GMT</pubDate>
    <dc:creator>msharp</dc:creator>
    <dc:date>2019-01-11T15:40:53Z</dc:date>
    <item>
      <title>how to fix graph size when add multiple graphs in single window?</title>
      <link>https://community.jmp.com/t5/Discussions/how-to-fix-graph-size-when-add-multiple-graphs-in-single-window/m-p/105651#M38913</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I use For loop to create graph size (800,800) and add to the same window. When test the script only for one graph, size is correct. When added multiple graphs in single window, it will adjust y automatically and it is too narrow to review the data.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Could you please advise how to fix graph size when add to the single window?&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;nw= New Window("Report");

For(j = 1, j &amp;lt;= nitems(mylist) , j++,
prod_list = mylist[j];
Gr1 = expr (Data Table(" Rej Rate "||prod_list) &amp;lt;&amp;lt; Graph Builder(
	Size( 800,800 ),
.
.
);
nw &amp;lt;&amp;lt; Append (Hlistbox(Gr1)); 
); // end for mylist loop&lt;BR /&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/4553"&gt;@msharp&lt;/a&gt;&amp;nbsp; I created new post as your comment. Thank you.&lt;/P&gt;</description>
      <pubDate>Fri, 11 Jan 2019 07:57:33 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/how-to-fix-graph-size-when-add-multiple-graphs-in-single-window/m-p/105651#M38913</guid>
      <dc:creator>Akane</dc:creator>
      <dc:date>2019-01-11T07:57:33Z</dc:date>
    </item>
    <item>
      <title>Re: how to fix graph size when add multiple graphs in single window?</title>
      <link>https://community.jmp.com/t5/Discussions/how-to-fix-graph-size-when-add-multiple-graphs-in-single-window/m-p/105694#M38924</link>
      <description>&lt;P&gt;Akane, try appending it to a list box, not the window directly.&amp;nbsp; That should fix your issue.&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 );
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );

nw = New Window("Dashboard", hlb = hlistbox()); //vlistbox if you want it vertical

for(i=1, i&amp;lt;10, i++,
	g = expr(dt &amp;lt;&amp;lt; Graph Builder(
		Size( 800, 800 ),
		Show Control Panel( 0 ),
		Variables( X( :name ), Y( :age ) ),
		Elements( Points( X, Y, Legend( 5 ) ) )
	));
	hlb &amp;lt;&amp;lt; Append(g);
);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Also, instead of calling Data Table's by name, its a better practice to store the data table reference in a variable and call that.&lt;/P&gt;
&lt;P&gt;So....&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;//Bad Practice
mylist = {"name1", "name2"};
For(j = 1, j &amp;lt;= nitems(mylist) , j++,
prod_list = mylist[j];
Gr1 = expr (Data Table(" Rej Rate "||prod_list) &amp;lt;&amp;lt; Graph Builder(
	Size( 800,800 ),
	
//Good Practice
mylist = {dt1, dt2};
For(j = 1, j &amp;lt;= nitems(mylist) , j++,
dt = mylist[j];
Gr1 = expr (dt &amp;lt;&amp;lt; Graph Builder(
	Size( 800,800 ),&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 11 Jan 2019 15:40:53 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/how-to-fix-graph-size-when-add-multiple-graphs-in-single-window/m-p/105694#M38924</guid>
      <dc:creator>msharp</dc:creator>
      <dc:date>2019-01-11T15:40:53Z</dc:date>
    </item>
    <item>
      <title>Re: how to fix graph size when add multiple graphs in single window?</title>
      <link>https://community.jmp.com/t5/Discussions/how-to-fix-graph-size-when-add-multiple-graphs-in-single-window/m-p/105717#M38928</link>
      <description>&lt;P&gt;Another solution would be to add:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Fit To Window("off")&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;as part of your Graph Builder() command.&amp;nbsp; By default Graph Builder automatically decides whether to stretch with the window or maintain a constant size.&amp;nbsp; I think the solution that&amp;nbsp;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/4553"&gt;@msharp&lt;/a&gt; provided changes the auto-stretching behavior.&amp;nbsp; I'm actually not sure why that changes things - this may be a bug that you are working around.&lt;/P&gt;</description>
      <pubDate>Fri, 11 Jan 2019 17:40:26 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/how-to-fix-graph-size-when-add-multiple-graphs-in-single-window/m-p/105717#M38928</guid>
      <dc:creator>danschikore</dc:creator>
      <dc:date>2019-01-11T17:40:26Z</dc:date>
    </item>
    <item>
      <title>Re: how to fix graph size when add multiple graphs in single window?</title>
      <link>https://community.jmp.com/t5/Discussions/how-to-fix-graph-size-when-add-multiple-graphs-in-single-window/m-p/105951#M38963</link>
      <description>&lt;P&gt;Thank you. It works both method.&lt;/P&gt;</description>
      <pubDate>Mon, 14 Jan 2019 08:52:22 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/how-to-fix-graph-size-when-add-multiple-graphs-in-single-window/m-p/105951#M38963</guid>
      <dc:creator>Akane</dc:creator>
      <dc:date>2019-01-14T08:52:22Z</dc:date>
    </item>
  </channel>
</rss>

