<?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: Build Error Bars with 3 standard deviations from the mean using 'Graph Builder' in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Build-Error-Bars-with-3-standard-deviations-from-the-mean-using/m-p/718095#M90002</link>
    <description>&lt;P&gt;I learn something new about JMP almost every day. Thanks&amp;nbsp;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/17550"&gt;@Florian_Vogt&lt;/a&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 22 Jan 2024 12:22:26 GMT</pubDate>
    <dc:creator>txnelson</dc:creator>
    <dc:date>2024-01-22T12:22:26Z</dc:date>
    <item>
      <title>Build Error Bars with 3 standard deviations from the mean using 'Graph Builder'</title>
      <link>https://community.jmp.com/t5/Discussions/Build-Error-Bars-with-3-standard-deviations-from-the-mean-using/m-p/718038#M89982</link>
      <description>&lt;P&gt;How do I build a line graph with a 3 standard deviation from mean instead of 1 standard deviation?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 22 Jan 2024 21:39:17 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Build-Error-Bars-with-3-standard-deviations-from-the-mean-using/m-p/718038#M89982</guid>
      <dc:creator>PowerPlatypus37</dc:creator>
      <dc:date>2024-01-22T21:39:17Z</dc:date>
    </item>
    <item>
      <title>Re: Build Error Bars with 3 standard deviations from the mean using 'Graph Builder'</title>
      <link>https://community.jmp.com/t5/Discussions/Build-Error-Bars-with-3-standard-deviations-from-the-mean-using/m-p/718043#M89983</link>
      <description>&lt;P&gt;The only way I &lt;STRIKE&gt;know&lt;/STRIKE&gt;&amp;nbsp; new how to do this is by adding in the error bars using the graphic primitives available in JSL.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/17550"&gt;@Florian_Vogt&lt;/a&gt;&amp;nbsp;has provided a pointer to how to do the custom error bars in his response.&amp;nbsp; His response is the correct way to handle the issue.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;Below is a very simple example, using very basic structured code to illustrate &lt;STRIKE&gt;what is going on &lt;/STRIKE&gt;how to add graphic elements to an existing graph.&amp;nbsp; It is a good technique to know about, but not the correct answer to this Discussion Question unless you are using JMP 13 or earlier.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="txnelson_0-1705806766207.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/60441i270AF5815283C6EE/image-size/medium?v=v2&amp;amp;px=400" role="button" title="txnelson_0-1705806766207.png" alt="txnelson_0-1705806766207.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );
dt = 
// Open Data Table: Big Class.jmp
// → Data Table( "Big Class" )
Open( "$SAMPLE_DATA/Big Class.jmp" );
dt:age &amp;lt;&amp;lt; modeling type( continuous );

gb = Graph Builder(
	Size( 528, 450 ),
	Show Control Panel( 0 ),
	Variables( X( :age ), Y( :height ), Overlay( :sex ) ),
	Elements( Line( X, Y, Legend( 4 ), Error Interval( "None" ) ) )
);
dtSum = dt &amp;lt;&amp;lt; Summary(
	invisible,
	Group( :sex, :age ),
	Mean( :height ),
	Std Dev( :height ),
	Freq( "None" ),
	Weight( "None" ),
	statistics column name format( "stat" ),
	Link to original data table( 0 )
);
sexList = dtSum:sex &amp;lt;&amp;lt; get values;
ageMat = dtSum:age &amp;lt;&amp;lt; get values;
meanMat = dtSum:Mean &amp;lt;&amp;lt; get values;
stdMat = dtSum:Std Dev &amp;lt;&amp;lt; get values;

close( dtSum, nosave );

gbf = Report( gb )[FrameBox( 1 )];

gbf &amp;lt;&amp;lt; add graphics script(
	
ymin=999999999999;
ymax=-999999999999;
	ls = {0, 0};
	le = {0, 0};
	For Each( {row, i }, ageMat,
		If( sexList[i] == "F",
			Pen Color( "Blue" ),
			Pen Color( "red" )
		);
		Pen Size( 1 );
		ls[1] = ageMat[i];
		ls[2] = meanMat[i] - 3 * stdMat[i];
		if(ls[2]&amp;lt;ymin, ymin=ls[2]);
		le[1] = agemat[i];
		le[2] = meanMat[i] + 3 * StdMat[i];
		if(le[2]&amp;gt;ymax, ymax=le[2]);
		Line( ls, le );
		// bottom line
		ls[1] = ageMat[i] - .1;
		le[1] = ageMat[i] + .1;
		ls[2] = meanMat[i] - 3 * stdMat[i];
		le[2] = meanMat[i] - 3 * StdMat[i];
		Line( ls, le );
		// bottom line
		ls[2] = meanMat[i] + 3 * StdMat[i];
		le[2] = meanMat[i] + 3 * StdMat[i];
		Line( ls, le );
	);
)
;
// Set the Y axis to max and min range
report(gb)[AxisBox(2)] &amp;lt;&amp;lt; Max( ymax ) &amp;lt;&amp;lt; Min(ymin);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 22 Jan 2024 12:33:51 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Build-Error-Bars-with-3-standard-deviations-from-the-mean-using/m-p/718043#M89983</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2024-01-22T12:33:51Z</dc:date>
    </item>
    <item>
      <title>Re: Build Error Bars with 3 standard deviations from the mean using 'Graph Builder'</title>
      <link>https://community.jmp.com/t5/Discussions/Build-Error-Bars-with-3-standard-deviations-from-the-mean-using/m-p/718089#M89999</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/54383"&gt;@PowerPlatypus37&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;you should be able to get this by manually calculating the value you'd like to have as error bar range.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To do so, use column formulas and the "Group by" function, in order to calculate the respective ranges.&lt;/P&gt;
&lt;P&gt;Then in Graph Builder, you can build the graph first. And then select the error bar and drag the columns containing the values of the range into the "interval" drop zone on the right side. (see here:&amp;nbsp;&lt;A href="https://www.jmp.com/support/help/en/17.2/index.shtml#page/jmp/graph-zones.shtml#" target="_blank"&gt;https://www.jmp.com/support/help/en/17.2/index.shtml#page/jmp/graph-zones.shtml#&lt;/A&gt;)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Florian_Vogt_0-1705915342617.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/60456i4F8D871F3DD15725/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Florian_Vogt_0-1705915342617.png" alt="Florian_Vogt_0-1705915342617.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;(Note I haven't calculated different values for the error bars in this example = they are the same width here).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hope this helps!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best&lt;/P&gt;
&lt;P&gt;Florian&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 22 Jan 2024 10:49:17 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Build-Error-Bars-with-3-standard-deviations-from-the-mean-using/m-p/718089#M89999</guid>
      <dc:creator>Florian_Vogt</dc:creator>
      <dc:date>2024-01-22T10:49:17Z</dc:date>
    </item>
    <item>
      <title>Re: Build Error Bars with 3 standard deviations from the mean using 'Graph Builder'</title>
      <link>https://community.jmp.com/t5/Discussions/Build-Error-Bars-with-3-standard-deviations-from-the-mean-using/m-p/718095#M90002</link>
      <description>&lt;P&gt;I learn something new about JMP almost every day. Thanks&amp;nbsp;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/17550"&gt;@Florian_Vogt&lt;/a&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 22 Jan 2024 12:22:26 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Build-Error-Bars-with-3-standard-deviations-from-the-mean-using/m-p/718095#M90002</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2024-01-22T12:22:26Z</dc:date>
    </item>
    <item>
      <title>Re: Build Error Bars with 3 standard deviations from the mean using 'Graph Builder'</title>
      <link>https://community.jmp.com/t5/Discussions/Build-Error-Bars-with-3-standard-deviations-from-the-mean-using/m-p/718100#M90005</link>
      <description>&lt;P&gt;I am very honored YOU say that&amp;nbsp;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/2687"&gt;@txnelson&lt;/a&gt;&amp;nbsp; - has only taken 4 years ;)&lt;/img&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 22 Jan 2024 13:15:35 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Build-Error-Bars-with-3-standard-deviations-from-the-mean-using/m-p/718100#M90005</guid>
      <dc:creator>Florian_Vogt</dc:creator>
      <dc:date>2024-01-22T13:15:35Z</dc:date>
    </item>
  </channel>
</rss>

