<?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 switch Group X to display all items or only certain items? in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/How-to-switch-Group-X-to-display-all-items-or-only-certain-items/m-p/889133#M105124</link>
    <description>&lt;P&gt;You have multiple different options:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;have two separate graph builder expressions&lt;/LI&gt;
&lt;LI&gt;use (hidden) local data filter&lt;/LI&gt;
&lt;LI&gt;build the graph builder expression with Where&amp;nbsp;&lt;/LI&gt;
&lt;LI&gt;use linked subset (which is filtered using your conditions) for the graph builder&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;Here is one way of using Where&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here(1);
selection = 1;
New Window("Example",
	cb = Combo Box({"Only age 13 and 16", "All age"}, selection = (cb &amp;lt;&amp;lt; Get())),
	Button Box("Plot",
		dt = Open("$SAMPLE_DATA/Big Class.jmp");
		gb_expr = Expr(Graph Builder(
			Size(528, 500),
			Show Control Panel(0),
			Variables(X(:sex), X(:age, Position(1)), Y(:height), Group X(:age)),
			Elements(Points(X(1), X(2), Y, Legend(10)))
		));
		
		If(selection == 1,
			Insert Into(gb_expr, NameExpr(Where(Contains({13, 16}, :age))));
		);
		gb = Eval(EvalExpr(Send(dt, Expr(gb_expr))));
	)
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Thu, 24 Jul 2025 06:39:13 GMT</pubDate>
    <dc:creator>jthi</dc:creator>
    <dc:date>2025-07-24T06:39:13Z</dc:date>
    <item>
      <title>How to switch Group X to display all items or only certain items?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-switch-Group-X-to-display-all-items-or-only-certain-items/m-p/889121#M105123</link>
      <description>&lt;P&gt;&lt;SPAN&gt;How to switch Group X to display all items or only certain items? &lt;BR /&gt;As shown in the JSL below, using Where can make Group X display only specific items. However, it is not possible to toggle between displaying all and displaying partial items. How should this be modified? Perhaps using add variable() is needed, but I cannot find how to use add where.&lt;/SPAN&gt;&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 );
selection = 1;
New Window( "Example",
	cb = Combo Box( {"Only age 13 and 16", "All age"}, selection = (cb &amp;lt;&amp;lt; Get()) ),
	Button Box( "Plot",
		dt = Open( "$SAMPLE_DATA/Big Class.jmp" );

		gb = dt &amp;lt;&amp;lt; Graph Builder(
			Size( 528, 500 ),
			Show Control Panel( 0 ),
			Variables( X( :sex ), X( :age, Position( 1 ) ), Y( :height ), Group X( :age ) ),
			Elements( Points( X( 1 ), X( 2 ), Y, Legend( 10 ) ) ),
			If( selection == 1,
				Where( Contains( {13, 16}, :age ) ),

			),

		);
	)
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 24 Jul 2025 06:25:30 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-switch-Group-X-to-display-all-items-or-only-certain-items/m-p/889121#M105123</guid>
      <dc:creator>BabyDoragon</dc:creator>
      <dc:date>2025-07-24T06:25:30Z</dc:date>
    </item>
    <item>
      <title>Re: How to switch Group X to display all items or only certain items?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-switch-Group-X-to-display-all-items-or-only-certain-items/m-p/889133#M105124</link>
      <description>&lt;P&gt;You have multiple different options:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;have two separate graph builder expressions&lt;/LI&gt;
&lt;LI&gt;use (hidden) local data filter&lt;/LI&gt;
&lt;LI&gt;build the graph builder expression with Where&amp;nbsp;&lt;/LI&gt;
&lt;LI&gt;use linked subset (which is filtered using your conditions) for the graph builder&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;Here is one way of using Where&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here(1);
selection = 1;
New Window("Example",
	cb = Combo Box({"Only age 13 and 16", "All age"}, selection = (cb &amp;lt;&amp;lt; Get())),
	Button Box("Plot",
		dt = Open("$SAMPLE_DATA/Big Class.jmp");
		gb_expr = Expr(Graph Builder(
			Size(528, 500),
			Show Control Panel(0),
			Variables(X(:sex), X(:age, Position(1)), Y(:height), Group X(:age)),
			Elements(Points(X(1), X(2), Y, Legend(10)))
		));
		
		If(selection == 1,
			Insert Into(gb_expr, NameExpr(Where(Contains({13, 16}, :age))));
		);
		gb = Eval(EvalExpr(Send(dt, Expr(gb_expr))));
	)
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 24 Jul 2025 06:39:13 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-switch-Group-X-to-display-all-items-or-only-certain-items/m-p/889133#M105124</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2025-07-24T06:39:13Z</dc:date>
    </item>
  </channel>
</rss>

