<?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: Plot graph with existing standard deviation in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Plot-graph-with-existing-standard-deviation/m-p/730501#M91348</link>
    <description>&lt;P&gt;Here is one way to do this:&lt;/P&gt;
&lt;P&gt;Give the data table&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="txnelson_0-1709829850019.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/61965i7B5E3AEC1D2F583A/image-size/medium?v=v2&amp;amp;px=400" role="button" title="txnelson_0-1709829850019.png" alt="txnelson_0-1709829850019.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;You can graph it:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="txnelson_1-1709829908132.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/61966i6AD34A1A8C4F20AF/image-size/medium?v=v2&amp;amp;px=400" role="button" title="txnelson_1-1709829908132.png" alt="txnelson_1-1709829908132.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );

New Table( "example",
	Add Rows( 3 ),
	New Column( "Sample",
		Numeric,
		"Nominal",
		Format( "Best", 12 ),
		Set Property( "Value Order", {Numerical Order( 0 )} ),
		Set Selected,
		Set Values( [1, 2, 3] ),
		Set Display Width( 97 )
	),
	New Column( " Mean", Numeric, "Continuous", Format( "Best", 12 ), Set Values( [70000, 45000, 65000] ) ),
	New Column( "Standard deviation", Numeric, "Continuous", Format( "Best", 12 ), Set Values( [25800, 19100, 41200] ) )
);

Graph Builder(
	Variables( X( :Sample ), Y( :" Mean"n ), Y( :Standard deviation ) ),
	Elements(
		Position( 1, 1 ),
		Points( X, Y, Legend( 5 ) ),
		Line( X, Y, Legend( 7 ) )
	),
	Elements(
		Position( 1, 2 ),
		Points( X, Y, Legend( 6 ) ),
		Line( X, Y, Legend( 8 ) )
	),
	SendToReport(
		Dispatch(
			{},
			"400",
			ScaleBox,
			{Legend Model( 5, Base( 0, 0, 0, Item ID( " Mean", 1 ) ) ),
			Legend Model( 6, Base( 0, 0, 0, Item ID( "Standard deviation", 1 ) ) )}
		),
		Dispatch(
			{},
			"400",
			LegendBox,
			{Legend Position( {5, [0], 7, [2], 6, [1], 8, [3]} )}
		)
	)
)&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Do you have a graphical format that is different than what I demonstrated?&amp;nbsp; If so, please provide it, and the Community will jump in to help you with that.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Note:&amp;nbsp; The creation of the data table and the graph was first done interactively, and then upon completion, I requested to JMP to provide me with the script.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Note 2:&amp;nbsp; I suggest you take the time to read the document intitled:&amp;nbsp; Discovering JMP available under the Help pull down menu.&lt;/P&gt;</description>
    <pubDate>Thu, 07 Mar 2024 16:53:46 GMT</pubDate>
    <dc:creator>txnelson</dc:creator>
    <dc:date>2024-03-07T16:53:46Z</dc:date>
    <item>
      <title>Plot graph with existing standard deviation</title>
      <link>https://community.jmp.com/t5/Discussions/Plot-graph-with-existing-standard-deviation/m-p/730497#M91347</link>
      <description>&lt;P&gt;How do I plot the graph with existing standard deviation data table?&lt;/P&gt;&lt;P&gt;For example:&lt;/P&gt;&lt;P&gt;Sample&amp;nbsp; Mean&amp;nbsp; &amp;nbsp;Standard deviation&lt;BR /&gt;1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;70000&amp;nbsp; &amp;nbsp; 25800&lt;BR /&gt;2&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;45000&amp;nbsp; &amp;nbsp; 19100&lt;BR /&gt;3&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;65000&amp;nbsp; &amp;nbsp; 41200&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;</description>
      <pubDate>Thu, 07 Mar 2024 16:35:56 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Plot-graph-with-existing-standard-deviation/m-p/730497#M91347</guid>
      <dc:creator>JMPforBio</dc:creator>
      <dc:date>2024-03-07T16:35:56Z</dc:date>
    </item>
    <item>
      <title>Re: Plot graph with existing standard deviation</title>
      <link>https://community.jmp.com/t5/Discussions/Plot-graph-with-existing-standard-deviation/m-p/730501#M91348</link>
      <description>&lt;P&gt;Here is one way to do this:&lt;/P&gt;
&lt;P&gt;Give the data table&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="txnelson_0-1709829850019.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/61965i7B5E3AEC1D2F583A/image-size/medium?v=v2&amp;amp;px=400" role="button" title="txnelson_0-1709829850019.png" alt="txnelson_0-1709829850019.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;You can graph it:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="txnelson_1-1709829908132.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/61966i6AD34A1A8C4F20AF/image-size/medium?v=v2&amp;amp;px=400" role="button" title="txnelson_1-1709829908132.png" alt="txnelson_1-1709829908132.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );

New Table( "example",
	Add Rows( 3 ),
	New Column( "Sample",
		Numeric,
		"Nominal",
		Format( "Best", 12 ),
		Set Property( "Value Order", {Numerical Order( 0 )} ),
		Set Selected,
		Set Values( [1, 2, 3] ),
		Set Display Width( 97 )
	),
	New Column( " Mean", Numeric, "Continuous", Format( "Best", 12 ), Set Values( [70000, 45000, 65000] ) ),
	New Column( "Standard deviation", Numeric, "Continuous", Format( "Best", 12 ), Set Values( [25800, 19100, 41200] ) )
);

Graph Builder(
	Variables( X( :Sample ), Y( :" Mean"n ), Y( :Standard deviation ) ),
	Elements(
		Position( 1, 1 ),
		Points( X, Y, Legend( 5 ) ),
		Line( X, Y, Legend( 7 ) )
	),
	Elements(
		Position( 1, 2 ),
		Points( X, Y, Legend( 6 ) ),
		Line( X, Y, Legend( 8 ) )
	),
	SendToReport(
		Dispatch(
			{},
			"400",
			ScaleBox,
			{Legend Model( 5, Base( 0, 0, 0, Item ID( " Mean", 1 ) ) ),
			Legend Model( 6, Base( 0, 0, 0, Item ID( "Standard deviation", 1 ) ) )}
		),
		Dispatch(
			{},
			"400",
			LegendBox,
			{Legend Position( {5, [0], 7, [2], 6, [1], 8, [3]} )}
		)
	)
)&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Do you have a graphical format that is different than what I demonstrated?&amp;nbsp; If so, please provide it, and the Community will jump in to help you with that.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Note:&amp;nbsp; The creation of the data table and the graph was first done interactively, and then upon completion, I requested to JMP to provide me with the script.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Note 2:&amp;nbsp; I suggest you take the time to read the document intitled:&amp;nbsp; Discovering JMP available under the Help pull down menu.&lt;/P&gt;</description>
      <pubDate>Thu, 07 Mar 2024 16:53:46 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Plot-graph-with-existing-standard-deviation/m-p/730501#M91348</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2024-03-07T16:53:46Z</dc:date>
    </item>
    <item>
      <title>Re: Plot graph with existing standard deviation</title>
      <link>https://community.jmp.com/t5/Discussions/Plot-graph-with-existing-standard-deviation/m-p/730506#M91349</link>
      <description>&lt;P&gt;Anyway to graph it similar to below:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="JMPforBio_0-1709830346811.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/61967i49433E36FF035975/image-size/medium?v=v2&amp;amp;px=400" role="button" title="JMPforBio_0-1709830346811.png" alt="JMPforBio_0-1709830346811.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;</description>
      <pubDate>Thu, 07 Mar 2024 16:52:52 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Plot-graph-with-existing-standard-deviation/m-p/730506#M91349</guid>
      <dc:creator>JMPforBio</dc:creator>
      <dc:date>2024-03-07T16:52:52Z</dc:date>
    </item>
    <item>
      <title>Re: Plot graph with existing standard deviation</title>
      <link>https://community.jmp.com/t5/Discussions/Plot-graph-with-existing-standard-deviation/m-p/730522#M91350</link>
      <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="txnelson_1-1709831216881.png" style="width: 725px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/61969i55CD2CF37D954935/image-dimensions/725x506?v=v2" width="725" height="506" role="button" title="txnelson_1-1709831216881.png" alt="txnelson_1-1709831216881.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;There are a couple of items that I had to do to make your data work.&lt;/P&gt;
&lt;P&gt;First, in the Columns selection area, I added in 2 new virtual columns, Upper and Lower.&amp;nbsp; They were created to give the upper and lower values for the Mean+- Standard deviation.&lt;/P&gt;
&lt;P&gt;Second, after dragging Mean, Upper and Lower to the Y drop area, I changed the points to a bar.&amp;nbsp; Since I only wanted the bar to represent the Mean value, I changed the Variables property and unselected Upper and Lower&lt;/P&gt;
&lt;P&gt;Third, I added a second Bar to the graph.&amp;nbsp; I again when to the properties area, and changed the Bar Style to Interval, and since I only wanted Upper and Lower to be included in the Interval Bar, I unselected Mean&lt;/P&gt;
&lt;P&gt;Here is the JSL to recreate the graph&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Graph Builder(
	Transform Column( "Lower", Formula( :Mean - :Standard deviation ) ),
	Transform Column( "Upper", Formula( :Mean + :Standard deviation ) ),
	Size( 744, 627 ),
	Variables(
		X( :Sample ),
		Y( :Mean ),
		Y( :Upper, Position( 1 ) ),
		Y( :Lower, Position( 1 ) )
	),
	Elements(
		Bar( X, Y( 1 ), Legend( 4 ) ),
		Bar( X, Y( 2 ), Y( 3 ), Legend( 6 ), Bar Style( "Interval" ) )
	),
	SendToReport(
		Dispatch( {"Bar"}, "", OutlineBox, {Close( 0 )} ),
		Dispatch( {"Bar"[2]}, "", OutlineBox, {Close( 0 )} ),
		Dispatch( {}, "Y title", TextEditBox, {Set Text( "Mean" )} )
	)
)&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Note:&amp;nbsp; It would be much simpler to use the raw data to create the chart you want.&amp;nbsp; JMP would generate the mean, upper and lower values for you.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 07 Mar 2024 17:18:20 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Plot-graph-with-existing-standard-deviation/m-p/730522#M91350</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2024-03-07T17:18:20Z</dc:date>
    </item>
  </channel>
</rss>

