<?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: Handling Conditional Display of Y-Axis Variables in JSL for Graph Building in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Handling-Conditional-Display-of-Y-Axis-Variables-in-JSL-for/m-p/842761#M101652</link>
    <description>&lt;P&gt;You can build the expression or add variable later&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here(1);
dt = Open("$SAMPLE_DATA/Big Class.jmp");
gb = dt &amp;lt;&amp;lt; Graph Builder(
	Size(534, 450),
	Show Control Panel(0),
	Variables(X(:sex), Y(:height), Y(:weight)),
	Elements(Position(1, 1), Points(X, Y, Legend(13))),
	Elements(Position(1, 2), Points(X, Y, Legend(14)))
);
dt &amp;lt;&amp;lt; new column("A", Numeric, Continuous, Formula(Row()));

extra_cols = {"height", "A"};

For Each({extra_col}, extra_cols,
	Eval(EvalExpr(
		gb &amp;lt;&amp;lt; Add Variable({Expr(NameExpr(AsColumn(dt, extra_col))), Role("Y")});
	));
);
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Depending on what you are trying to do, there can be quite a few things to take into account (order, type of plots, legend, ...)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If I remember correctly this might have something related to this topic&amp;nbsp;&lt;LI-MESSAGE title="Scripters Club Recording: JSL in Graph Builder" uid="800152" url="https://community.jmp.com/t5/JMP-Scripters-Club-Discussions/Scripters-Club-Recording-JSL-in-Graph-Builder/m-p/800152#U800152" 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;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 19 Feb 2025 12:24:05 GMT</pubDate>
    <dc:creator>jthi</dc:creator>
    <dc:date>2025-02-19T12:24:05Z</dc:date>
    <item>
      <title>Handling Conditional Display of Y-Axis Variables in JSL for Graph Building</title>
      <link>https://community.jmp.com/t5/Discussions/Handling-Conditional-Display-of-Y-Axis-Variables-in-JSL-for/m-p/842738#M101648</link>
      <description>&lt;P&gt;&lt;SPAN&gt;When using `graph built`, how can I describe the requirement in JSL that certain Y-axis variables, which may not always appear, should be displayed if they have values and not displayed if they have no values? The following two methods have not been effective.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;1.&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt = Open("$SAMPLE_DATA/Big Class.jmp");
Graph Builder(
	Size( 534, 450 ),
	Show Control Panel( 0 ),
	Variables( X( :sex ), try(Y( :bbb )), Y( :height ), Y( :weight ) ),
	Elements( Position( 1, 1 ), Points( X, Y, Legend( 13 ) ) ),
	Elements( Position( 1, 2 ), Points( X, Y, Legend( 14 ) ) ),
	Elements( Position( 1, 3 ), Points( X, Y, Legend( 15 ) ) )
);&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;SPAN&gt;2.&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt = Open("$SAMPLE_DATA/Big Class.jmp");
Graph Builder(
	Size( 534, 450 ),
	Show Control Panel( 0 ),
	Variables( X( :sex ), Y( :bbb ), Y( :height ), Y( :weight ) ),
	Elements( Position( 1, 1 ), Points( X, Y, Legend( 13 ) ) ),
	Elements( Position( 1, 2 ), Points( X, Y, Legend( 14 ) ) ),
	Elements( Position( 1, 3 ), Points( X, Y, Legend( 15 ) ) )
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 19 Feb 2025 10:48:31 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Handling-Conditional-Display-of-Y-Axis-Variables-in-JSL-for/m-p/842738#M101648</guid>
      <dc:creator>BabyDoragon</dc:creator>
      <dc:date>2025-02-19T10:48:31Z</dc:date>
    </item>
    <item>
      <title>Re: Handling Conditional Display of Y-Axis Variables in JSL for Graph Building</title>
      <link>https://community.jmp.com/t5/Discussions/Handling-Conditional-Display-of-Y-Axis-Variables-in-JSL-for/m-p/842759#M101650</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/59007"&gt;@BabyDoragon&lt;/a&gt;, is bbb a column that either exists or not and this is what we need to check, or bbb is always there but some values(rows) are missing ?&lt;/P&gt;</description>
      <pubDate>Wed, 19 Feb 2025 12:09:10 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Handling-Conditional-Display-of-Y-Axis-Variables-in-JSL-for/m-p/842759#M101650</guid>
      <dc:creator>spyros_megalou</dc:creator>
      <dc:date>2025-02-19T12:09:10Z</dc:date>
    </item>
    <item>
      <title>Re: Handling Conditional Display of Y-Axis Variables in JSL for Graph Building</title>
      <link>https://community.jmp.com/t5/Discussions/Handling-Conditional-Display-of-Y-Axis-Variables-in-JSL-for/m-p/842760#M101651</link>
      <description>&lt;P&gt;&lt;SPAN&gt;The default value of bbb is {}, and sometimes it may be stored as a variable, for example in the following two cases.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;1.&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt = Open("$SAMPLE_DATA/Big Class.jmp");
bbb={};
bbb="age";
Graph Builder(
	Size( 534, 450 ),
	Show Control Panel( 0 ),
	Variables( X( :sex ), Y( as column(bbb)), Y( :height ), Y( :weight ) ),
	Elements( Position( 1, 1 ), Points( X, Y, Legend( 13 ) ) ),
	Elements( Position( 1, 2 ), Points( X, Y, Legend( 14 ) ) ),
	Elements( Position( 1, 3 ), Points( X, Y, Legend( 15 ) ) )
);&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;2.&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt = Open("$SAMPLE_DATA/Big Class.jmp");
bbb={};
//bbb="age";
Graph Builder(
	Size( 534, 450 ),
	Show Control Panel( 0 ),
	Variables( X( :sex ), Y( as column(bbb)), Y( :height ), Y( :weight ) ),
	Elements( Position( 1, 1 ), Points( X, Y, Legend( 13 ) ) ),
	Elements( Position( 1, 2 ), Points( X, Y, Legend( 14 ) ) ),
	Elements( Position( 1, 3 ), Points( X, Y, Legend( 15 ) ) )
);&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;SPAN&gt;I hope to enable the graph to automatically include or exclude this item based on whether there are any variables currently in bbb.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 19 Feb 2025 12:22:05 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Handling-Conditional-Display-of-Y-Axis-Variables-in-JSL-for/m-p/842760#M101651</guid>
      <dc:creator>BabyDoragon</dc:creator>
      <dc:date>2025-02-19T12:22:05Z</dc:date>
    </item>
    <item>
      <title>Re: Handling Conditional Display of Y-Axis Variables in JSL for Graph Building</title>
      <link>https://community.jmp.com/t5/Discussions/Handling-Conditional-Display-of-Y-Axis-Variables-in-JSL-for/m-p/842761#M101652</link>
      <description>&lt;P&gt;You can build the expression or add variable later&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here(1);
dt = Open("$SAMPLE_DATA/Big Class.jmp");
gb = dt &amp;lt;&amp;lt; Graph Builder(
	Size(534, 450),
	Show Control Panel(0),
	Variables(X(:sex), Y(:height), Y(:weight)),
	Elements(Position(1, 1), Points(X, Y, Legend(13))),
	Elements(Position(1, 2), Points(X, Y, Legend(14)))
);
dt &amp;lt;&amp;lt; new column("A", Numeric, Continuous, Formula(Row()));

extra_cols = {"height", "A"};

For Each({extra_col}, extra_cols,
	Eval(EvalExpr(
		gb &amp;lt;&amp;lt; Add Variable({Expr(NameExpr(AsColumn(dt, extra_col))), Role("Y")});
	));
);
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Depending on what you are trying to do, there can be quite a few things to take into account (order, type of plots, legend, ...)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If I remember correctly this might have something related to this topic&amp;nbsp;&lt;LI-MESSAGE title="Scripters Club Recording: JSL in Graph Builder" uid="800152" url="https://community.jmp.com/t5/JMP-Scripters-Club-Discussions/Scripters-Club-Recording-JSL-in-Graph-Builder/m-p/800152#U800152" 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;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 19 Feb 2025 12:24:05 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Handling-Conditional-Display-of-Y-Axis-Variables-in-JSL-for/m-p/842761#M101652</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2025-02-19T12:24:05Z</dc:date>
    </item>
  </channel>
</rss>

