<?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 Replace Original Points with Contour When Using Add Element in JSL Graphs in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/How-to-Replace-Original-Points-with-Contour-When-Using-Add/m-p/899530#M105947</link>
    <description>&lt;P&gt;You can remove the point element&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(488, 352),
	Show Control Panel(0),
	Fit to Window("Off"),
	Variables(Y(:weight), Overlay(:age)),
	Elements(Position(1, 1), Points(X, Y, Legend(21)), Points(X, Y, Legend(23))), 
		//Elements( Position( 2, 1 ), Contour( X, Y, Legend( 22 ) ) ), 
		
		
);
gb &amp;lt;&amp;lt; Add Variable({:height, Role("X")});
gb &amp;lt;&amp;lt; Add Variable({:Height, Role("X")});
gb &amp;lt;&amp;lt; Remove Element(2, 1, 1);
gb &amp;lt;&amp;lt; Remove Element(2, 1, 1);
gb &amp;lt;&amp;lt; Add Element(2, 1, {Type("Contour"), X, Y});
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;or you could build the graph builder expression to take this into account&lt;/P&gt;</description>
    <pubDate>Wed, 10 Sep 2025 10:22:22 GMT</pubDate>
    <dc:creator>jthi</dc:creator>
    <dc:date>2025-09-10T10:22:22Z</dc:date>
    <item>
      <title>How to Replace Original Points with Contour When Using Add Element in JSL Graphs</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-Replace-Original-Points-with-Contour-When-Using-Add/m-p/899515#M105946</link>
      <description>&lt;DIV data-container=""&gt;&lt;SPAN data-expression=""&gt;The JSL code below attempts to use the add Element method to display a Contour plot on the graph on the right side. However, because add Element is an Add Element operation, it cannot remove or replace the original Points format on the right-side graph, resulting in the generated image being different from the figure below. The original Points remain along with the added Contour. Since the X-axis can only be appended afterwards, is there any way to remove the original Points format while still using add Element?&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV data-container=""&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( 488, 352 ),
	Show Control Panel( 0 ),
	Fit to Window( "Off" ),
	Variables( Y( :weight ), Overlay( :age ) ),
	Elements( Position( 1, 1 ), Points( X, Y, Legend( 21 ) ), Points( X, Y, Legend( 23 ) ) ), 
		//Elements( Position( 2, 1 ), Contour( X, Y, Legend( 22 ) ) ), 
		
		
);
gb &amp;lt;&amp;lt; Add Variable( {:height, Role( "X" )} );
gb &amp;lt;&amp;lt; Add Variable( {:Height, Role( "X" )} );
gb &amp;lt;&amp;lt; Add Element( 1, 1, {Type( "Points" ), X, Y} );
gb &amp;lt;&amp;lt; Add Element( 2, 1, {Type( "Contour" ), X, Y} );&lt;/CODE&gt;&lt;/PRE&gt;
&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="BabyDoragon_2-1757498098586.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/82215i8ABA69AC5B30CA3B/image-size/medium?v=v2&amp;amp;px=400" role="button" title="BabyDoragon_2-1757498098586.png" alt="BabyDoragon_2-1757498098586.png" /&gt;&lt;/span&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="螢幕擷取畫面 2025-09-10 185522.png" style="width: 555px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/82216iCB8A27E3EF6E043E/image-size/large?v=v2&amp;amp;px=999" role="button" title="螢幕擷取畫面 2025-09-10 185522.png" alt="螢幕擷取畫面 2025-09-10 185522.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;/DIV&gt;</description>
      <pubDate>Wed, 10 Sep 2025 09:56:48 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-Replace-Original-Points-with-Contour-When-Using-Add/m-p/899515#M105946</guid>
      <dc:creator>BabyDoragon</dc:creator>
      <dc:date>2025-09-10T09:56:48Z</dc:date>
    </item>
    <item>
      <title>Re: How to Replace Original Points with Contour When Using Add Element in JSL Graphs</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-Replace-Original-Points-with-Contour-When-Using-Add/m-p/899530#M105947</link>
      <description>&lt;P&gt;You can remove the point element&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(488, 352),
	Show Control Panel(0),
	Fit to Window("Off"),
	Variables(Y(:weight), Overlay(:age)),
	Elements(Position(1, 1), Points(X, Y, Legend(21)), Points(X, Y, Legend(23))), 
		//Elements( Position( 2, 1 ), Contour( X, Y, Legend( 22 ) ) ), 
		
		
);
gb &amp;lt;&amp;lt; Add Variable({:height, Role("X")});
gb &amp;lt;&amp;lt; Add Variable({:Height, Role("X")});
gb &amp;lt;&amp;lt; Remove Element(2, 1, 1);
gb &amp;lt;&amp;lt; Remove Element(2, 1, 1);
gb &amp;lt;&amp;lt; Add Element(2, 1, {Type("Contour"), X, Y});
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;or you could build the graph builder expression to take this into account&lt;/P&gt;</description>
      <pubDate>Wed, 10 Sep 2025 10:22:22 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-Replace-Original-Points-with-Contour-When-Using-Add/m-p/899530#M105947</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2025-09-10T10:22:22Z</dc:date>
    </item>
    <item>
      <title>Re: How to Replace Original Points with Contour When Using Add Element in JSL Graphs</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-Replace-Original-Points-with-Contour-When-Using-Add/m-p/899535#M105948</link>
      <description>&lt;P&gt;&lt;SPAN&gt;I have two questions to ask: &lt;BR /&gt;(1) Why are the elements (2, 1, 1) deleted twice? &lt;BR /&gt;The first two numbers represent the position in the graph, but I don't yet understand the meaning of the third value. &lt;BR /&gt;&lt;BR /&gt;(2) From the new output graph, I noticed that the X-axis limits for X and Y are different. How can I make the X-axis limits on both the left and right sides the same automatically?&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 10 Sep 2025 11:06:54 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-Replace-Original-Points-with-Contour-When-Using-Add/m-p/899535#M105948</guid>
      <dc:creator>BabyDoragon</dc:creator>
      <dc:date>2025-09-10T11:06:54Z</dc:date>
    </item>
    <item>
      <title>Re: How to Replace Original Points with Contour When Using Add Element in JSL Graphs</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-Replace-Original-Points-with-Contour-When-Using-Add/m-p/899626#M105954</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;1. You have already added points to your graph even though you do not have x-axis -&amp;gt; you might end up with more Points graphs than you think.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Run graph builder script -&amp;gt; copy script&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Graph Builder(
	Size(488, 352),
	Show Control Panel(0),
	Fit to Window("Off"),
	Variables(Y(:weight), Overlay(:age)),
	Elements(Points(Y, Legend(21)), Points(Y, Legend(23)))
);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Run &amp;lt;&amp;lt; Add Variable -&amp;gt; Copy script&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Graph Builder(
	Size(488, 352),
	Show Control Panel(0),
	Fit to Window("Off"),
	Variables(X(:height), Y(:weight), Overlay(:age)),
	Elements(Points(X, Y, Legend(21)), Points(X, Y, Legend(23)))
);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Run &amp;lt;&amp;lt; Add Variable -&amp;gt; Copy script&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Graph Builder(
	Size(488, 352),
	Show Control Panel(0),
	Fit to Window("Off"),
	Variables(X(:height), X(:height), Y(:weight), Overlay(:age)),
	Elements(Position(1, 1), Points(X, Y, Legend(21)), Points(X, Y, Legend(23))),
	Elements(Position(2, 1), Points(X, Y, Legend(24)), Points(X, Y, Legend(25)))
);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;CODE class=" language-jsl"&gt;&lt;/CODE&gt;Run &amp;lt;&amp;lt; Remove Element -&amp;gt; copy script&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Graph Builder(
	Size(488, 352),
	Show Control Panel(0),
	Fit to Window("Off"),
	Variables(X(:height), X(:height), Y(:weight), Overlay(:age)),
	Elements(Position(1, 1), Points(X, Y, Legend(21)), Points(X, Y, Legend(23))),
	Elements(Position(2, 1), Points(X, Y, Legend(25)))
);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Run &amp;lt;&amp;lt; Remove Element -&amp;gt; copy script&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Graph Builder(
	Size(488, 352),
	Show Control Panel(0),
	Fit to Window("Off"),
	Variables(X(:height), X(:height), Y(:weight), Overlay(:age)),
	Elements(Position(1, 1), Points(X, Y, Legend(21)), Points(X, Y, Legend(23))),
	Elements(Position(2, 1))
);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;and so on.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can give yourself much better chance of success if you use as complete graph builder as possible&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");
gb = dt &amp;lt;&amp;lt; Graph Builder(
	Size(488, 393),
	Show Control Panel(0),
	Fit to Window("Off"),
	Variables(X(:height), Y(:weight), Overlay(:age)),
	Elements(Points(X, Y, Legend(2)))
);

gb &amp;lt;&amp;lt; Add Variable({:Height, Role("X"), Position(2)});
gb &amp;lt;&amp;lt; Remove Element(2, 1, 1);
gb &amp;lt;&amp;lt; Add Element(2, 1, {Type("Contour"), X, Y});&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;2. You can adjust the x-axis with a script (the axis are different as contour plot needs more space than points)&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(488, 352),
	Show Control Panel(0),
	Fit to Window("Off"),
	Variables(Y(:weight), Overlay(:age)),
	Elements(Position(1, 1), Points(X, Y, Legend(21)), Points(X, Y, Legend(23))), 
		//Elements( Position( 2, 1 ), Contour( X, Y, Legend( 22 ) ) ), 
		
		
);
gb &amp;lt;&amp;lt; Add Variable({:height, Role("X")});
gb &amp;lt;&amp;lt; Add Variable({:Height, Role("X")});
gb &amp;lt;&amp;lt; Remove Element(2, 1, 1);
gb &amp;lt;&amp;lt; Remove Element(2, 1, 1);
gb &amp;lt;&amp;lt; Add Element(2, 1, {Type("Contour"), X, Y});

min2 = Report(gb)[AxisBox(3)] &amp;lt;&amp;lt; get min;
max2 = Report(gb)[AxisBox(3)] &amp;lt;&amp;lt; get max;
Report(gb)[AxisBox(1)] &amp;lt;&amp;lt; Min(min2) &amp;lt;&amp;lt; Max(max2);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 10 Sep 2025 15:48:28 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-Replace-Original-Points-with-Contour-When-Using-Add/m-p/899626#M105954</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2025-09-10T15:48:28Z</dc:date>
    </item>
  </channel>
</rss>

