<?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: Change Graph Builder line widths with overlay variable in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Change-Graph-Builder-line-widths-with-overlay-variable/m-p/684233#M86994</link>
    <description>&lt;P&gt;Hi Matthew,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The simple fix is to simply change &lt;STRONG&gt;Find Seg&lt;/STRONG&gt; into &lt;STRONG&gt;Find Segs&lt;/STRONG&gt;. This will find all the line segments (there are two, one for each sex) and replace the width to what you need.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Furthermore, because there’s only 1 frame box (or 1 graph), we do not need the &lt;STRONG&gt;For&lt;/STRONG&gt; loop here. I found the community post you were referring to, and in that example, there are two frame boxes.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So we can simplify your code as follows:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here(1);
Open("$SAMPLE_DATA/Big Class.jmp");
gb = Graph Builder(
      Size( 534, 454 ),
      Show Control Panel( 0 ),
      Variables( X( :height ), Y( :weight ), Overlay( :sex ) ),
      Elements( Points( X, Y, Legend( 3 ) ), Line( X, Y, Legend( 5 ) ) )
);
      
fbs = gb &amp;lt;&amp;lt; XPath("//FrameBox");
      seg = (fbs &amp;lt;&amp;lt; Find Segs("Line Seg"));
      seg &amp;lt;&amp;lt; Set Line Width(1);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Hope this helps!&lt;/P&gt;</description>
    <pubDate>Thu, 05 Oct 2023 15:03:20 GMT</pubDate>
    <dc:creator>Owen_Jonathan</dc:creator>
    <dc:date>2023-10-05T15:03:20Z</dc:date>
    <item>
      <title>Change Graph Builder line widths with overlay variable</title>
      <link>https://community.jmp.com/t5/Discussions/Change-Graph-Builder-line-widths-with-overlay-variable/m-p/684221#M86992</link>
      <description>&lt;P&gt;&lt;SPAN&gt;I want to be able to change line widths in Graph Builder when I have an overlay variable specified but I don’t know upfront what the values of that variable might be (or how many values there may be). I’ve tried the following based on a community post:&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);
Open("$SAMPLE_DATA/Big Class.jmp");
gb = Graph Builder(
      Size( 534, 454 ),
      Show Control Panel( 0 ),
      Variables( X( :height ), Y( :weight ), Overlay( :sex ) ),
      Elements( Points( X, Y, Legend( 3 ) ), Line( X, Y, Legend( 5 ) ) )
);  
fbs = gb &amp;lt;&amp;lt; XPath("//FrameBox");
For(i = 1, i &amp;lt;= N Items(fbs), i++,
      frame = fbs[i];
      seg = (frame &amp;lt;&amp;lt; Find Seg("Line Seg"));
      seg &amp;lt;&amp;lt; Set Line Width(1);    
);&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;SPAN&gt;But this only changes the thickness of one of the lines (in this case, for :sex=="F").&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Thu, 05 Oct 2023 14:59:03 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Change-Graph-Builder-line-widths-with-overlay-variable/m-p/684221#M86992</guid>
      <dc:creator>matth1</dc:creator>
      <dc:date>2023-10-05T14:59:03Z</dc:date>
    </item>
    <item>
      <title>Re: Change Graph Builder line widths with overlay variable</title>
      <link>https://community.jmp.com/t5/Discussions/Change-Graph-Builder-line-widths-with-overlay-variable/m-p/684233#M86994</link>
      <description>&lt;P&gt;Hi Matthew,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The simple fix is to simply change &lt;STRONG&gt;Find Seg&lt;/STRONG&gt; into &lt;STRONG&gt;Find Segs&lt;/STRONG&gt;. This will find all the line segments (there are two, one for each sex) and replace the width to what you need.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Furthermore, because there’s only 1 frame box (or 1 graph), we do not need the &lt;STRONG&gt;For&lt;/STRONG&gt; loop here. I found the community post you were referring to, and in that example, there are two frame boxes.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So we can simplify your code as follows:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here(1);
Open("$SAMPLE_DATA/Big Class.jmp");
gb = Graph Builder(
      Size( 534, 454 ),
      Show Control Panel( 0 ),
      Variables( X( :height ), Y( :weight ), Overlay( :sex ) ),
      Elements( Points( X, Y, Legend( 3 ) ), Line( X, Y, Legend( 5 ) ) )
);
      
fbs = gb &amp;lt;&amp;lt; XPath("//FrameBox");
      seg = (fbs &amp;lt;&amp;lt; Find Segs("Line Seg"));
      seg &amp;lt;&amp;lt; Set Line Width(1);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Hope this helps!&lt;/P&gt;</description>
      <pubDate>Thu, 05 Oct 2023 15:03:20 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Change-Graph-Builder-line-widths-with-overlay-variable/m-p/684233#M86994</guid>
      <dc:creator>Owen_Jonathan</dc:creator>
      <dc:date>2023-10-05T15:03:20Z</dc:date>
    </item>
    <item>
      <title>Re: Change Graph Builder line widths with overlay variable</title>
      <link>https://community.jmp.com/t5/Discussions/Change-Graph-Builder-line-widths-with-overlay-variable/m-p/684321#M87006</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Find Segs&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;such a useful function! is there any documentation?&lt;/P&gt;</description>
      <pubDate>Sun, 20 Oct 2024 15:05:13 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Change-Graph-Builder-line-widths-with-overlay-variable/m-p/684321#M87006</guid>
      <dc:creator>hogi</dc:creator>
      <dc:date>2024-10-20T15:05:13Z</dc:date>
    </item>
  </channel>
</rss>

